User Settings - Edit: Revise and simplify javascript.

This commit is contained in:
Nate
2020-03-04 18:03:20 -07:00
parent fc759db37c
commit 3af6d3fad2

View File

@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2019
Portions created by the Initial Developer are Copyright (C) 2008-2020
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -720,14 +720,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "</form>";
echo "<script>\n";
//capture enter key to submit form
echo " $(window).on('keypress',function(event){\n";
echo " if (event.which == 13) { submit_form(); }\n";
echo " });\n";
//hide/convert password fields then submit form
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
@@ -740,4 +735,5 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
//include the footer
require_once "resources/footer.php";
?>
?>