Domain Settings: List view updates, move actions to class.
This commit is contained in:
@@ -590,20 +590,22 @@
|
||||
|
||||
//show the content
|
||||
echo "<form method='post' id='frm' action=''>\n";
|
||||
echo "<input type='hidden' id='action' name='action' value=''>\n";
|
||||
echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td align='left' valign='top' width='30%' nowrap='nowrap'><b>";
|
||||
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'>";
|
||||
if ($action == "update") {
|
||||
echo $text['header-domain-edit'];
|
||||
echo "<b>".$text['header-domain']."</b>";
|
||||
}
|
||||
if ($action == "add") {
|
||||
echo $text['header-domain-add'];
|
||||
echo "<b>".$text['header-domain-add']."</b>";
|
||||
}
|
||||
echo "</b></td>\n";
|
||||
echo "<td width='70%' align='right' valign='top'>\n";
|
||||
echo " </div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
if (permission_exists('domain_add')) { //only for superadmin, not admin editing their own domain
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'link'=>'domains.php']);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'style'=>'margin-right: 15px;','link'=>'domains.php']);
|
||||
}
|
||||
if (permission_exists('domain_delete') && is_array($_SESSION['domains']) && @sizeof($_SESSION['domains']) > 1 && $domain_uuid != $_SESSION['domain_uuid']) {
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'action','value'=>'delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { document.getElementById('frm').submit(); } else { this.blur(); return false; }"]);
|
||||
}
|
||||
if (permission_exists("domain_select") && is_array($_SESSION['domains']) && @sizeof($_SESSION['domains']) > 1) {
|
||||
echo "<select id='domains' class='formfld' style='width: auto;' onchange=\"window.location.href='?id=' + document.getElementById('domains').options[document.getElementById('domains').selectedIndex].value;\">\n";
|
||||
@@ -613,26 +615,23 @@
|
||||
}
|
||||
echo "</select>";
|
||||
}
|
||||
if (permission_exists('domain_delete') && is_array($_SESSION['domains']) && @sizeof($_SESSION['domains']) > 1 && $domain_uuid != $_SESSION['domain_uuid']) {
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'action','value'=>'delete','style'=>'margin-left: 15px;','onclick'=>"if (confirm('".$text['confirm-delete']."')) { document.getElementById('frm').submit(); } else { this.blur(); return false; }"]);
|
||||
}
|
||||
if (permission_exists('domain_export')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-export'],'icon'=>$_SESSION['theme']['button_icon_export'],'link'=>PROJECT_PATH."/app/domain_export/index.php?id=".escape($domain_uuid)]);
|
||||
}
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'style'=>'margin-left: 15px;']);
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td align='left' colspan='2'>\n";
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if ($action == "update") {
|
||||
echo $text['description-domain-edit'];
|
||||
echo $text['description-domain-edit']."\n";
|
||||
}
|
||||
if ($action == "add") {
|
||||
echo $text['description-domain-add'];
|
||||
echo $text['description-domain-add']."\n";
|
||||
}
|
||||
echo "<br /><br />\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
@@ -676,8 +675,6 @@
|
||||
echo " <input type='hidden' name='domain_uuid' value='".escape($domain_uuid)."'>\n";
|
||||
}
|
||||
echo " <input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo " <br />";
|
||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
|
||||
Reference in New Issue
Block a user