mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-11 13:44:58 +00:00
Template, Core Apps: Update to new modal.
This commit is contained in:
@@ -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 .= " <li class='nav-item'>\n";
|
||||
$html .= " <a class='nav-link logout_icon' href='".PROJECT_PATH."/logout.php' title=\"".$text['theme-label-logout']."\" onclick=\"return confirm('".$this->text['theme-confirm-logout']."')\"><span class='fas fa-sign-out-alt'></span></a>";
|
||||
$html .= " <a class='nav-link logout_icon' href='#' title=\"".$this->text['theme-label-logout']."\" onclick=\"modal_open('modal-logout','btn_logout');\"><span class='fas fa-sign-out-alt'></span></a>";
|
||||
$html .= " </li>\n";
|
||||
unset($username_full);
|
||||
}
|
||||
@@ -1061,6 +1061,11 @@ if (!class_exists('menu')) {
|
||||
$html .= " </div>\n";
|
||||
$html .= "</nav>\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);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Copyright (C) 2010 - 2019
|
||||
Copyright (C) 2010 - 2020
|
||||
All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -32,7 +32,7 @@ if (!class_exists('modal')) {
|
||||
|
||||
$modal = "<div id='".($array['id'] ? $array['id'] : 'modal')."' class='modal-window'>\n";
|
||||
$modal .= " <div>\n";
|
||||
$modal .= " <a href='#' title=\"".$text['button-close']."\" class='modal-close'>".($array['close'] ? $array['close'] : '×')."</a>\n";
|
||||
$modal .= " <span title=\"".$text['button-close']."\" class='modal-close' onclick=\"modal_close();\">".($array['close'] ? $array['close'] : '×')."</span>\n";
|
||||
if ($array['type'] != '') {
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
@@ -51,6 +51,8 @@ if (!class_exists('modal')) {
|
||||
$array['title'] = $text['modal_title-confirmation'];
|
||||
$array['message'] = $text['confirm-delete'];
|
||||
break;
|
||||
default:
|
||||
$array['title'] = $array['title'] != '' ? $array['title'] : $text['modal_title-confirmation'];
|
||||
}
|
||||
//prefix cancel button to action
|
||||
$array['actions'] = button::create(['type'=>'button','label'=>$text['button-cancel'],'icon'=>$_SESSION['theme']['button_icon_cancel'],'collapse'=>'never','onclick'=>'modal_close();']).$array['actions'];
|
||||
@@ -69,4 +71,4 @@ if (!class_exists('modal')) {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user