mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Devices, Extensions, Gateways, Users: Bypass browser password manager prompt when saving.
This commit is contained in:
@@ -428,7 +428,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "}\n";
|
||||
echo "</script>";
|
||||
|
||||
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";
|
||||
echo "<td colspan='2'>\n";
|
||||
@@ -443,7 +443,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if ($action == "update") {
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-copy']."' onclick=\"if (confirm('".$text['confirm-copy']."')){window.location='gateway_copy.php?id=".$gateway_uuid."';}\" value='".$text['button-copy']."'>\n";
|
||||
}
|
||||
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 " <tr>";
|
||||
@@ -938,13 +938,26 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo " <input type='hidden' name='gateway_uuid' value='$gateway_uuid'>\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>";
|
||||
echo "<br><br>";
|
||||
echo "</form>";
|
||||
|
||||
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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user