From 232e49182b686b1bbb4fe9d4b89378609c75c187 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 12 Feb 2020 11:58:56 -0700 Subject: [PATCH] Users - Edit: Sticky User Settings action bar. --- core/user_settings/user_settings.php | 24 ++++++++++++++++++--- core/users/user_edit.php | 31 +++++++++++++++------------- 2 files changed, 38 insertions(+), 17 deletions(-) diff --git a/core/user_settings/user_settings.php b/core/user_settings/user_settings.php index 82270138d0..4f814eb7a3 100644 --- a/core/user_settings/user_settings.php +++ b/core/user_settings/user_settings.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2019 + Portions created by the Initial Developer are Copyright (C) 2008-2020 the Initial Developer. All Rights Reserved. Contributor(s): @@ -147,9 +147,10 @@ $token = $object->create('/core/user_settings/user_settings.php'); //show the content - echo "
\n"; - echo "
".$text['header-user_settings']."
\n"; + echo "
\n"; + echo "
".$text['header-user_settings']."
\n"; echo "
\n"; + echo button::create(['type'=>'button','id'=>'action_bar_sub_button_back','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'style'=>'margin-right: 15px; display: none;','link'=>'users.php']); if (permission_exists('user_setting_add')) { echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'link'=>PROJECT_PATH.'/core/user_settings/user_setting_edit.php?user_uuid='.urlencode($_GET['id'])]); } @@ -315,4 +316,21 @@ echo "\n"; echo "\n"; +//make sub action bar sticky + echo "\n"; + ?> \ No newline at end of file diff --git a/core/users/user_edit.php b/core/users/user_edit.php index 0f395c7580..0f7270cacc 100644 --- a/core/users/user_edit.php +++ b/core/users/user_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2019 + Portions created by the Initial Developer are Copyright (C) 2008-2020 the Initial Developer. All Rights Reserved. Contributor(s): @@ -1025,27 +1025,30 @@ echo "\n"; echo "\n"; - echo " "; - echo " "; + if ($unsaved) { + echo ""; + echo ""; + echo " ".$text['message-unsaved_changes']." "; + echo ""; + echo ""; + } + + echo ""; + echo "

"; + if ($action == 'edit') { - echo " "; + echo ""; if (permission_exists("user_edit")) { - echo " "; + echo ""; } } - echo " \n"; - echo "
"; - if ($unsaved) { - echo " ".$text['message-unsaved_changes']." "; - } - echo " "; - echo " "; - echo ""; + echo "\n"; + echo ""; if (permission_exists("user_edit") && permission_exists('user_setting_view') && $action == 'edit') { - echo "

"; require $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/core/user_settings/user_settings.php"; + echo "

"; } //uuid generation script