Domain Settings: Add Reload button.

This commit is contained in:
Nate
2019-12-11 16:40:38 -07:00
parent aaca2bb47c
commit 9961ebb148
2 changed files with 12 additions and 2 deletions

View File

@@ -39,6 +39,7 @@ else {
$text = $language->get();
$search = $_REQUEST['search'];
$domain_uuid = $_GET['id'];
require "resources/classes/domains.php";
$domain = new domains();
@@ -46,6 +47,12 @@ $domain->db = $db;
$domain->set();
message::add($text['message-settings_reloaded']);
header("Location: default_settings.php".($search != '' ? "?search=".$search : null));
if (is_uuid($domain_uuid)) {
$location = PROJECT_PATH.'/core/domains/domain_edit.php?id='.$domain_uuid;
}
else {
$location = 'default_settings.php'.($search != '' ? "?search=".$search : null);
}
header("Location: ".$location);
?>

View File

@@ -385,7 +385,7 @@
echo "<div style='float: right;'>\n";
if (permission_exists('domain_setting_add')) {
echo " <a href='".PROJECT_PATH."/core/domain_settings/domain_setting_edit.php?domain_uuid=".urlencode($domain_uuid)."' alt=\"".$text['button-add']."\"><button type='button' class='btn btn-default'><span class='fas fa-plus'></span> ".$text['button-add']."</button></a>";
echo "<a href='".PROJECT_PATH."/core/domain_settings/domain_setting_edit.php?domain_uuid=".urlencode($domain_uuid)."' alt=\"".$text['button-add']."\"><button type='button' class='btn btn-default'><span class='fas fa-plus'></span> ".$text['button-add']."</button></a>";
}
if (is_array($result) && @sizeof($result) != 0) {
if (permission_exists("domain_select") && permission_exists("domain_setting_add") && count($_SESSION['domains']) > 1) {
@@ -411,6 +411,9 @@
echo " <button type='submit' name='action' class='btn btn-default' alt=\"".$text['button-delete']."\" value='delete' onclick=\"if (!confirm('".$text['confirm-delete']."')) { this.blur(); return false; }\"><span class='fas fa-trash'></span> ".$text['button-delete']."</button>";
}
}
if (permission_exists('default_setting_view') && is_array($result) && @sizeof($result) != 0) {
echo button::create(['type'=>'button','label'=>$text['button-reload'],'icon'=>$_SESSION['theme']['button_icon_reload'],'style'=>'margin-left: 15px;','link'=>PROJECT_PATH.'/core/default_settings/default_settings_reload.php?id='.$domain_uuid]);
}
echo "</div>\n";
echo "<b>".$text['header-domain_settings']."</b>";
echo "<br><br>\n";