Default Settings - Edit: Revise and simplify javascript.

This commit is contained in:
Nate
2020-03-04 18:01:52 -07:00
parent 0bfe9bfea6
commit 791c2be200

View File

@@ -723,16 +723,9 @@
}
echo "<script>\n";
//capture enter key to submit form
if (!($category == "theme" && $subcategory == "custom_css_code" && $name == "text" )) {
echo " $(window).on('keypress',function(event){\n";
echo " if (event.which == 13) { submit_form(); }\n";
echo " });\n";
}
//hide/convert password fields then submit form
//hide password fields before submit
echo " function submit_form() {\n";
echo " $('input:password').css('visibility','hidden');\n";
echo " $('input:password').attr({type:'text'});\n";
echo " hide_password_fields();\n";
echo " $('form#frm').submit();\n";
echo " }\n";
//define lowercase class
@@ -746,4 +739,4 @@
//include the footer
require_once "resources/footer.php";
?>
?>