|
@@ -206,7 +206,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|
|
}
|
|
|
|
|
|
//show the content
|
|
|
- echo "<form method='post' name='frm' action=''>\n";
|
|
|
+ echo "<form name='frm' id='frm' method='post' action=''>\n";
|
|
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
|
|
echo "<tr>\n";
|
|
|
if ($action == "add") {
|
|
@@ -217,7 +217,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|
|
}
|
|
|
echo "<td width='70%' align='right'>";
|
|
|
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='default_settings.php".(($search != '') ? "?search=".$search : null)."'\" value='".$text['button-back']."'>";
|
|
|
- echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
|
|
+ echo " <input type='button' class='btn' value='".$text['button-save']."' onclick='submit_form();'>\n";
|
|
|
echo "</td>\n";
|
|
|
echo "</tr>\n";
|
|
|
echo "<tr>\n";
|
|
@@ -585,7 +585,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|
|
echo " <input type='hidden' name='search' value='".$search."'>\n";
|
|
|
}
|
|
|
echo " <br>";
|
|
|
- echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
|
|
+ echo " <input type='button' class='btn' value='".$text['button-save']."' onclick='submit_form();'>\n";
|
|
|
echo " </td>\n";
|
|
|
echo " </tr>";
|
|
|
echo "</table>";
|
|
@@ -596,6 +596,19 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|
|
echo "<script>document.getElementById('default_setting_subcategory').focus();</script>";
|
|
|
}
|
|
|
|
|
|
+ echo "<script>\n";
|
|
|
+//capture enter key to submit form
|
|
|
+ echo " $(window).keypress(function(event){\n";
|
|
|
+ echo " if (event.which == 13) { submit_form(); }\n";
|
|
|
+ echo " });\n";
|
|
|
+// convert password fields to
|
|
|
+ echo " function submit_form() {\n";
|
|
|
+ echo " $('input:password').css('visibility','hidden');\n";
|
|
|
+ echo " $('input:password').attr({type:'text'});\n";
|
|
|
+ echo " $('form#frm').submit();\n";
|
|
|
+ echo " }\n";
|
|
|
+ echo "</script>\n";
|
|
|
+
|
|
|
//include the footer
|
|
|
require_once "resources/footer.php";
|
|
|
?>
|