Template, Core Apps: Update to new modal.

This commit is contained in:
Nate
2020-03-25 16:48:12 -06:00
parent 52f4626452
commit 97eec1da04
20 changed files with 213 additions and 120 deletions

View File

@@ -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);