Default Settings: Fix domain selection hide on copy cancel.

This commit is contained in:
Nate 2020-01-23 08:21:29 -07:00
parent 3ca46887d9
commit 38b59622f5
1 changed files with 2 additions and 1 deletions

View File

@ -153,6 +153,7 @@
echo " function hide_domains() {\n";
echo " document.getElementById('action').value = '';\n";
echo " document.getElementById('button_back').style.display = 'none'; \n";
echo " document.getElementById('target_domain_uuid').style.display = 'none'; \n";
echo " document.getElementById('target_domain_uuid').selectedIndex = 0;\n";
echo " document.getElementById('button_paste').style.display = 'none'; \n";
echo " document.getElementById('button_copy').style.display = 'inline'; \n";
@ -172,7 +173,7 @@
if (permission_exists("domain_select") && permission_exists("domain_setting_add") && count($_SESSION['domains']) > 1) {
echo button::create(['type'=>'button','label'=>$text['button-copy'],'id'=>'button_copy','icon'=>$_SESSION['theme']['button_icon_copy'],'onclick'=>'show_domains();']);
echo button::create(['type'=>'button','label'=>$text['button-back'],'id'=>'button_back','icon'=>$_SESSION['theme']['button_icon_refresh'],'style'=>'display: none;','onclick'=>'hide_domains();']);
echo "<select name='domain_uuid'; class='formfld' style='display: none; width: auto;' id='target_domain_uuid' onchange=\"document.getElementById('domain_uuid').value = this.options[this.selectedIndex].value;\">\n";
echo "<select name='domain_uuid' class='formfld' style='display: none; width: auto;' id='target_domain_uuid' onchange=\"document.getElementById('domain_uuid').value = this.options[this.selectedIndex].value;\">\n";
echo " <option value=''>".$text['label-domain']."...</option>\n";
foreach ($_SESSION['domains'] as $domain) {
echo " <option value='".escape($domain["domain_uuid"])."'>".escape($domain["domain_name"])."</option>\n";