From 97eec1da044f43ee5caa76116050e0ee70e2bc0c Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 25 Mar 2020 16:48:12 -0600 Subject: [PATCH] Template, Core Apps: Update to new modal. --- core/databases/database_edit.php | 6 +- core/databases/databases.php | 13 ++- core/default_settings/default_settings.php | 11 +- core/domain_settings/domain_settings.php | 12 ++- core/domains/domain_edit.php | 8 +- core/domains/domains.php | 11 +- core/groups/group_edit.php | 11 +- core/groups/groupmembers.php | 6 +- core/groups/groups.php | 16 ++- core/menu/menu.php | 6 -- core/menu/menu_item_list.php | 11 +- core/user_settings/user_setting_edit.php | 2 +- core/user_settings/user_settings.php | 11 +- core/users/users.php | 16 ++- resources/app_languages.php | 50 ++++----- resources/classes/menu.php | 7 +- resources/classes/modal.php | 8 +- resources/footer.php | 2 +- themes/default/css.php | 6 +- themes/default/template.php | 120 +++++++++++---------- 20 files changed, 213 insertions(+), 120 deletions(-) diff --git a/core/databases/database_edit.php b/core/databases/database_edit.php index d7c4ffde2b..1d99e944d7 100644 --- a/core/databases/database_edit.php +++ b/core/databases/database_edit.php @@ -233,13 +233,17 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'databases.php']); if ($action == 'update' && permission_exists('database_delete')) { - echo button::create(['type'=>'submit','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'action','value'=>'delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { document.getElementById('frm').submit(); } else { this.blur(); return false; }",'style'=>'margin-right: 15px;']); + echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','style'=>'margin-right: 15px;','onclick'=>"modal_open('modal-delete','btn_delete');"]); } echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','name'=>'action','value'=>'save']); echo "
\n"; echo "
\n"; echo "\n"; + if ($action == 'update' && permission_exists('database_delete')) { + echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'delete','onclick'=>"modal_close();"])]); + } + if ($action == "add") { echo $text['description-database-add']."\n"; } diff --git a/core/databases/databases.php b/core/databases/databases.php index ad61eb3a06..07f6752808 100644 --- a/core/databases/databases.php +++ b/core/databases/databases.php @@ -110,15 +110,24 @@ echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','link'=>'database_edit.php']); } if (permission_exists('database_add') && $databases) { - echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','onclick'=>"if (confirm('".$text['confirm-copy']."')) { list_action_set('copy'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); + echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'name'=>'btn_copy','onclick'=>"modal_open('modal-copy','btn_copy');"]); + echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('copy'); list_form_submit('form_list');"])]); } if (permission_exists('database_delete') && $databases) { - echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); + echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','onclick'=>"modal_open('modal-delete','btn_delete');"]); + echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]); } echo " \n"; echo "
\n"; echo "\n"; + if (permission_exists('database_add') && $databases) { + echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('copy'); list_form_submit('form_list');"])]); + } + if (permission_exists('database_delete') && $databases) { + echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]); + } + echo $text['description-databases']."\n"; echo "

\n"; diff --git a/core/default_settings/default_settings.php b/core/default_settings/default_settings.php index 5958a657f6..20f226cacb 100644 --- a/core/default_settings/default_settings.php +++ b/core/default_settings/default_settings.php @@ -183,10 +183,10 @@ } } if (permission_exists('default_setting_edit') && $default_settings) { - echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'id'=>'btn_toggle','onclick'=>"if (confirm('".$text['confirm-toggle']."')) { list_action_set('toggle'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); + echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'name'=>'btn_toggle','onclick'=>"modal_open('modal-toggle','btn_toggle');"]); } if (permission_exists('default_setting_delete') && $default_settings) { - echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); + echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','onclick'=>"modal_open('modal-delete','btn_delete');"]); } echo ""; } if (permission_exists('group_member_delete') && $result) { - echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','collapse'=>'hide-xs','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); + echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','collapse'=>'hide-xs','onclick'=>"modal_open('modal-delete','btn_delete');"]); } echo " \n"; echo "
\n"; echo "\n"; + if (permission_exists('group_member_delete') && $result) { + echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]); + } + echo "
\n"; echo "\n"; echo "\n"; diff --git a/core/groups/groups.php b/core/groups/groups.php index 1c9efa1434..33cf8487ae 100644 --- a/core/groups/groups.php +++ b/core/groups/groups.php @@ -156,13 +156,13 @@ echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','link'=>'group_edit.php']); } if (permission_exists('group_add') && $groups) { - echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','onclick'=>"if (confirm('".$text['confirm-copy']."')) { list_action_set('copy'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); + echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'name'=>'btn_copy','onclick'=>"modal_open('modal-copy','btn_copy');"]); } if (permission_exists('group_edit') && $groups) { - echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'id'=>'btn_toggle','onclick'=>"if (confirm('".$text['confirm-toggle']."')) { list_action_set('toggle'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); + echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'name'=>'btn_toggle','onclick'=>"modal_open('modal-toggle','btn_toggle');"]); } if (permission_exists('group_delete') && $groups) { - echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); + echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','onclick'=>"modal_open('modal-delete','btn_delete');"]); } echo "\n"; if (permission_exists('group_all')) { @@ -184,6 +184,16 @@ echo "
\n"; echo "\n"; + if (permission_exists('group_add') && $groups) { + echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('copy'); list_form_submit('form_list');"])]); + } + if (permission_exists('group_edit') && $groups) { + echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('toggle'); list_form_submit('form_list');"])]); + } + if (permission_exists('group_delete') && $groups) { + echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]); + } + echo $text['description-groups']."\n"; echo "

\n"; diff --git a/core/menu/menu.php b/core/menu/menu.php index f36c12039c..c5608bcbb6 100644 --- a/core/menu/menu.php +++ b/core/menu/menu.php @@ -110,12 +110,6 @@ if (permission_exists('menu_add')) { echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','link'=>'menu_edit.php']); } - //if (permission_exists('menu_add') && $menus) { - // echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','onclick'=>"if (confirm('".$text['confirm-copy']."')) { list_action_set('copy'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); - //} - //if (permission_exists('menu_edit') && $menus) { - // echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'id'=>'btn_toggle','onclick'=>"if (confirm('".$text['confirm-toggle']."')) { list_action_set('toggle'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); - //} if (permission_exists('menu_delete') && $menus) { echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); } diff --git a/core/menu/menu_item_list.php b/core/menu/menu_item_list.php index 4d6d288751..a5ea2190e0 100644 --- a/core/menu/menu_item_list.php +++ b/core/menu/menu_item_list.php @@ -239,15 +239,22 @@ function build_db_child_menu_list ($db, $menu_item_level, $menu_item_uuid) { echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','collapse'=>'hide-xs','link'=>'menu_item_edit.php?id='.urlencode($menu_uuid)]); } if (permission_exists('menu_item_edit') && $result) { - echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'id'=>'btn_toggle','onclick'=>"if (confirm('".$text['confirm-toggle']."')) { list_action_set('toggle'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); + echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'name'=>'btn_toggle','onclick'=>"modal_open('modal-toggle','btn_toggle');"]); } if (permission_exists('menu_item_delete') && $result) { - echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','collapse'=>'hide-xs','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); + echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','collapse'=>'hide-xs','onclick'=>"modal_open('modal-delete','btn_delete');"]); } echo " \n"; echo "
\n"; echo "\n"; + if (permission_exists('menu_item_edit') && $result) { + echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('toggle'); list_form_submit('form_list');"])]); + } + if (permission_exists('menu_item_delete') && $result) { + echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]); + } + echo "\n"; echo " "; if (permission_exists('menu_item_edit') || permission_exists('menu_item_delete')) { diff --git a/core/user_settings/user_setting_edit.php b/core/user_settings/user_setting_edit.php index 4b8f14aad4..0bb9ca102b 100644 --- a/core/user_settings/user_setting_edit.php +++ b/core/user_settings/user_setting_edit.php @@ -365,7 +365,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "
\n"; echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'style'=>'margin-right: 15px;','link'=>'/core/users/user_edit.php?id='.urlencode($user_uuid)]); - echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'onclick'=>'submit_form();']); + echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save']); echo "
\n"; echo "
\n"; echo "\n"; diff --git a/core/user_settings/user_settings.php b/core/user_settings/user_settings.php index e5ef78adfe..81a0dca8be 100644 --- a/core/user_settings/user_settings.php +++ b/core/user_settings/user_settings.php @@ -155,15 +155,22 @@ echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','link'=>PROJECT_PATH.'/core/user_settings/user_setting_edit.php?user_uuid='.urlencode($_GET['id'])]); } if (permission_exists('user_setting_edit') && $user_settings) { - echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'id'=>'btn_toggle','onclick'=>"if (confirm('".$text['confirm-toggle']."')) { list_action_set('toggle'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); + echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'name'=>'btn_toggle','onclick'=>"modal_open('modal-toggle','btn_toggle');"]); } if (permission_exists('user_setting_delete') && $user_settings) { - echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); + echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','onclick'=>"modal_open('modal-delete','btn_delete');"]); } echo " \n"; echo "
\n"; echo "\n"; + if (permission_exists('user_setting_edit') && $user_settings) { + echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('toggle'); list_form_submit('form_list');"])]); + } + if (permission_exists('user_setting_delete') && $user_settings) { + echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]); + } + echo $text['header_description-user_settings']."\n"; echo "

\n"; diff --git a/core/users/users.php b/core/users/users.php index 6a4b325201..cbf0b236bd 100644 --- a/core/users/users.php +++ b/core/users/users.php @@ -175,13 +175,13 @@ echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','link'=>'user_edit.php']); } if (permission_exists('user_add') && $users) { - echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','onclick'=>"if (confirm('".$text['confirm-copy']."')) { list_action_set('copy'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); + echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'name'=>'btn_copy','onclick'=>"modal_open('modal-copy','btn_copy');"]); } if (permission_exists('user_edit') && $users) { - echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'id'=>'btn_toggle','onclick'=>"if (confirm('".$text['confirm-toggle']."')) { list_action_set('toggle'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); + echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'name'=>'btn_toggle','onclick'=>"modal_open('modal-toggle','btn_toggle');"]); } if (permission_exists('user_delete') && $users) { - echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]); + echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','onclick'=>"modal_open('modal-delete','btn_delete');"]); } echo "\n"; if (permission_exists('user_all')) { @@ -203,6 +203,16 @@ echo "
\n"; echo "\n"; + if (permission_exists('user_add') && $users) { + echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('copy'); list_form_submit('form_list');"])]); + } + if (permission_exists('user_edit') && $users) { + echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('toggle'); list_form_submit('form_list');"])]); + } + if (permission_exists('user_delete') && $users) { + echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]); + } + echo $text['description-users']."\n"; echo "

\n"; diff --git a/resources/app_languages.php b/resources/app_languages.php index a39b1c4256..89c38e2049 100644 --- a/resources/app_languages.php +++ b/resources/app_languages.php @@ -409,8 +409,8 @@ $text['message-unsupported_file_type']['ru-ru'] = "Тип файла не под $text['message-unsupported_file_type']['sv-se'] = "Inte stöds filtyp"; $text['message-unsupported_file_type']['uk-ua'] = "Тип файлу не підтримується"; -$text['confirm-delete']['en-us'] = "Do you really want to delete this?"; -$text['confirm-delete']['en-gb'] = "Do you really want to delete this?"; +$text['confirm-delete']['en-us'] = "Do you really want to DELETE this?"; +$text['confirm-delete']['en-gb'] = "Do you really want to DELETE this?"; $text['confirm-delete']['ar-eg'] = "هل تريد حقا أن تحذف هذا؟"; $text['confirm-delete']['de-at'] = "Wollen Sie das wirklich löschen?"; //copied from de-de $text['confirm-delete']['de-ch'] = "Wollen Sie das wirklich löschen?"; //copied from de-de @@ -432,8 +432,8 @@ $text['confirm-delete']['sv-se'] = "Vill du verkligen ta bort detta?"; $text['confirm-delete']['uk-ua'] = "Ви дійсно бажаєте це видалити?"; $text['confirm-delete']['tr-tr'] = "Bunu gerçekten silmek istiyor musunuz?"; -$text['confirm-copy']['en-us'] = "Do you really want to copy this?"; -$text['confirm-copy']['en-gb'] = "Do you really want to copy this?"; +$text['confirm-copy']['en-us'] = "Do you really want to COPY this?"; +$text['confirm-copy']['en-gb'] = "Do you really want to COPY this?"; $text['confirm-copy']['ar-eg'] = ""; $text['confirm-copy']['de-at'] = "Wollen Sie das wirklich kopieren?"; //copied from de-de $text['confirm-copy']['de-ch'] = "Wollen Sie das wirklich kopieren?"; //copied from de-de @@ -455,28 +455,28 @@ $text['confirm-copy']['sv-se'] = "Vill du verkligen kopiera detta?"; $text['confirm-copy']['uk-ua'] = ""; $text['confirm-copy']['tr-tr'] = "Bunu gerçekten kopyalamak istiyor musunuz?"; -$text['confirm-toggle']['en-us'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['en-gb'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['ar-eg'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['de-at'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['de-ch'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['de-de'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['el-gr'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['es-cl'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['es-mx'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['fr-ca'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['fr-fr'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['he-il'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['it-it'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['nl-nl'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['pl-pl'] = "Do you really want to toggle this?"; +$text['confirm-toggle']['en-us'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['en-gb'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['ar-eg'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['de-at'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['de-ch'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['de-de'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['el-gr'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['es-cl'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['es-mx'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['fr-ca'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['fr-fr'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['he-il'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['it-it'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['nl-nl'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['pl-pl'] = "Do you really want to TOGGLE this?"; $text['confirm-toggle']['pt-br'] = "Deseja realmente alterar?"; -$text['confirm-toggle']['pt-pt'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['ro-ro'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['ru-ru'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['sv-se'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['uk-ua'] = "Do you really want to toggle this?"; -$text['confirm-toggle']['tr-tr'] = "Do you really want to toggle this?"; +$text['confirm-toggle']['pt-pt'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['ro-ro'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['ru-ru'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['sv-se'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['uk-ua'] = "Do you really want to TOGGLE this?"; +$text['confirm-toggle']['tr-tr'] = "Do you really want to TOGGLE this?"; $text['button-apply']['en-us'] = "Apply"; $text['button-apply']['en-gb'] = "Apply"; diff --git a/resources/classes/menu.php b/resources/classes/menu.php index c46c575980..0c13823028 100644 --- a/resources/classes/menu.php +++ b/resources/classes/menu.php @@ -1051,7 +1051,7 @@ if (!class_exists('menu')) { if (isset($_SESSION['username']) && $_SESSION['username'] != '' && $_SESSION['theme']['logout_icon_visible']['text'] == "true") { $username_full = $_SESSION['username'].((count($_SESSION['domains']) > 1) ? "@".$_SESSION["user_context"] : null); $html .= " \n"; unset($username_full); } @@ -1061,6 +1061,11 @@ if (!class_exists('menu')) { $html .= " \n"; $html .= "\n"; + //modal for logout icon (above) + if (isset($_SESSION['username']) && $_SESSION['username'] != '' && $_SESSION['theme']['logout_icon_visible']['text'] == "true") { + $html .= modal::create(['id'=>'modal-logout','type'=>'general','message'=>$this->text['theme-confirm-logout'],'actions'=>button::create(['type'=>'button','label'=>$this->text['theme-label-logout'],'icon'=>'sign-out-alt','id'=>'btn_logout','style'=>'float: right; margin-left: 15px;','collapse'=>'never','link'=>PROJECT_PATH.'/logout.php','onclick'=>"modal_close();"])]); + } + return $html; unset($html); diff --git a/resources/classes/modal.php b/resources/classes/modal.php index ef02ffac83..d75868984c 100644 --- a/resources/classes/modal.php +++ b/resources/classes/modal.php @@ -18,7 +18,7 @@ The Initial Developer of the Original Code is Mark J Crane - Copyright (C) 2010 - 2019 + Copyright (C) 2010 - 2020 All Rights Reserved. Contributor(s): @@ -32,7 +32,7 @@ if (!class_exists('modal')) { $modal = "