diff --git a/core/domains/app_languages.php b/core/domains/app_languages.php index 2b9e7b98f1..e50972c025 100644 --- a/core/domains/app_languages.php +++ b/core/domains/app_languages.php @@ -767,6 +767,26 @@ $text['header-domain_settings']['ru-ru'] = "Настройки домена"; $text['header-domain_settings']['sv-se'] = "Domän Inställning"; $text['header-domain_settings']['uk-ua'] = "Налаштування домену"; +$text['header_description-domain_settings']['en-us'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['ar-eg'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['de-at'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['de-ch'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['de-de'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['es-cl'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['es-mx'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['fr-ca'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['fr-fr'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['he-il'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['it-it'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['nl-nl'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['pl-pl'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['pt-br'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['pt-pt'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['ro-ro'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['ru-ru'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['sv-se'] = "Settings for this domain that should override those defined in Default Settings."; +$text['header_description-domain_settings']['uk-ua'] = "Settings for this domain that should override those defined in Default Settings."; + $text['header-domain_setting-edit']['en-us'] = "Domain Setting"; $text['header-domain_setting-edit']['ar-eg'] = ""; $text['header-domain_setting-edit']['de-at'] = "Domain Einstellungen"; //copied from de-de diff --git a/core/domains/domain_edit.php b/core/domains/domain_edit.php index 2b01b5961d..816ac71231 100644 --- a/core/domains/domain_edit.php +++ b/core/domains/domain_edit.php @@ -74,6 +74,21 @@ $domain_uuid = $_POST["domain_uuid"]; } + //delete the domain + if (permission_exists('domain_delete')) { + if ($_POST['action'] == 'delete' && is_uuid($domain_uuid)) { + //prepare + $array[0]['checked'] = 'true'; + $array[0]['uuid'] = $domain_uuid; + //delete + $obj = new domains; + $obj->delete($array); + //redirect + header('Location: domains.php'); + exit; + } + } + //validate the token $token = new token; if (!$token->validate($_SERVER['PHP_SELF'])) { @@ -574,7 +589,8 @@ } //show the content - echo "
\n"; + echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/core/domains/domains.php b/core/domains/domains.php index 03e03a2950..82f8d501ed 100644 --- a/core/domains/domains.php +++ b/core/domains/domains.php @@ -184,15 +184,15 @@ if (permission_exists('domain_add')) { echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'link'=>'domain_edit.php']); } - if (permission_exists('domain_copy') && $domains) { - echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'onclick'=>"if (confirm('".$text['confirm-copy']."')) { list_action_set('copy'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); - } +// if (permission_exists('domain_copy') && $domains) { +// echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'onclick'=>"if (confirm('".$text['confirm-copy']."')) { list_action_set('copy'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); +// } if (permission_exists('domain_edit') && $domains) { echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'onclick'=>"if (confirm('".$text['confirm-toggle']."')) { list_action_set('toggle'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); } - if (permission_exists('domain_delete') && $domains) { - echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); - } +// if (permission_exists('domain_delete') && $domains) { +// echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); +// } echo "\n"; echo ""; echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','style'=>($search != '' ? 'display: none;' : null)]); @@ -214,7 +214,7 @@ echo "
"; @@ -587,20 +603,23 @@ echo "\n"; if (permission_exists('domain_add')) { //only for superadmin, not admin editing their own domain - echo " \n"; + echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'link'=>'domains.php']); } if (permission_exists("domain_select") && is_array($_SESSION['domains']) && @sizeof($_SESSION['domains']) > 1) { - echo " \n"; foreach ($_SESSION['domains'] as $domain) { $selected = $domain["domain_uuid"] == $domain_uuid ? "selected='selected'" : null; - echo " \n"; + echo " \n"; } - echo " \n"; + echo ""; + } + 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 " \n"; + 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 " \n"; + echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'style'=>'margin-left: 15px;']); echo "
\n"; echo "\n"; - if (permission_exists('domain_add') || permission_exists('domain_edit') || permission_exists('domain_delete')) { + if (permission_exists('domain_edit') || permission_exists('domain_delete')) { echo " \n"; @@ -237,7 +237,7 @@ $list_row_url = "domain_edit.php?id=".urlencode($row['domain_uuid']); } echo "\n"; - if (permission_exists('domain_add') || permission_exists('domain_edit') || permission_exists('domain_delete')) { + if (permission_exists('domain_edit') || permission_exists('domain_delete')) { echo "
\n"; echo " \n"; echo "
\n"; echo " \n"; echo " \n"; @@ -284,4 +284,4 @@ //include the footer require_once "resources/footer.php"; -?> +?> \ No newline at end of file