Multiple - Add IDs to common/default action buttons.

This commit is contained in:
Nate
2020-03-05 00:05:45 -07:00
parent 7b912b92fb
commit 029c7174b4
121 changed files with 382 additions and 352 deletions
+18 -6
View File
@@ -178,7 +178,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
require_once "resources/header.php";
//show the content
echo "<form method='post' name='frm''>\n";
echo "<form method='post' name='frm' id='frm'>\n";
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'>";
@@ -190,7 +190,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
}
echo " </div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'collapse'=>'never']);
echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','collapse'=>'never','onclick'=>'submit_form();']);
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
@@ -213,7 +213,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " ".$text['label-event_socket_port']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='event_socket_port' maxlength='255' value=\"".escape($event_socket_port)."\">\n";
echo " <input class='formfld' type='text' name='event_socket_port' maxlength='255' autocomplete='new-password' value=\"".escape($event_socket_port)."\">\n";
echo " <input type='text' style='display: none;' disabled='disabled'>\n"; //help defeat browser auto-fill
echo "<br />\n";
echo $text['description-event_socket_port']."\n";
echo "</td>\n";
@@ -224,7 +225,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " ".$text['label-event_socket_password']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='password' name='event_socket_password' id='event_socket_password' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='50' value=\"".escape($event_socket_password)."\">\n";
echo " <input type='password' style='display: none;' disabled='disabled'>\n"; //help defeat browser auto-fill
echo " <input class='formfld' type='password' name='event_socket_password' id='event_socket_password' autocomplete='new-password' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='50' value=\"".escape($event_socket_password)."\">\n";
echo "<br />\n";
echo $text['description-event_socket_password']."\n";
echo "</td>\n";
@@ -268,7 +270,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " ".$text['label-xml_rpc_auth_user']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='xml_rpc_auth_user' maxlength='255' value=\"".escape($xml_rpc_auth_user)."\">\n";
echo " <input class='formfld' type='text' name='xml_rpc_auth_user' maxlength='255' autocomplete='new-password' value=\"".escape($xml_rpc_auth_user)."\">\n";
echo " <input type='text' style='display: none;' disabled='disabled'>\n"; //help defeat browser auto-fill
echo "<br />\n";
echo $text['description-xml_rpc_auth_user']."\n";
echo "</td>\n";
@@ -279,7 +282,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " ".$text['label-xml_rpc_auth_pass']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='password' name='xml_rpc_auth_pass' id='xml_rpc_auth_pass' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='50' value=\"".escape($xml_rpc_auth_pass)."\">\n";
echo " <input type='password' style='display: none;' disabled='disabled'>\n"; //help defeat browser auto-fill
echo " <input class='formfld' type='password' name='xml_rpc_auth_pass' id='xml_rpc_auth_pass' autocomplete='new-password' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='50' value=\"".escape($xml_rpc_auth_pass)."\">\n";
echo "<br />\n";
echo $text['description-xml_rpc_auth_pass']."\n";
echo "</td>\n";
@@ -345,6 +349,14 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "<input type='hidden' name='setting_uuid' value='".$setting_uuid."'>\n";
echo "</form>";
echo "<script>\n";
//hide password fields before submit
echo " function submit_form() {\n";
echo " hide_password_fields();\n";
echo " $('form#frm').submit();\n";
echo " }\n";
echo "</script>\n";
//show the footer
require_once "resources/footer.php";