From 9a5bc49ac158fc11a2476d76c3eabffa15d3159d Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Mon, 15 Jun 2015 23:45:56 -0400 Subject: [PATCH] #196 Fix some "custom" template stuff --- admin/manage_users.php | 2 +- inc/profile_functions.inc.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/admin/manage_users.php b/admin/manage_users.php index 910511cf..f1a22b8b 100644 --- a/admin/manage_users.php +++ b/admin/manage_users.php @@ -735,7 +735,7 @@ function hesk_validateUserInfo($pass_required = 1, $redirect_to = './manage_user $myuser['email'] = hesk_validateEmail( hesk_POST('email'), 'ERR', 0) or $hesk_error_buffer .= '
  • ' . $hesklang['enter_valid_email'] . '
  • '; $myuser['user'] = hesk_input( hesk_POST('user') ) or $hesk_error_buffer .= '
  • ' . $hesklang['enter_username'] . '
  • '; $myuser['isadmin'] = hesk_POST('template') == '1' ? 1 : 0; - $myuser['template'] = hesk_POST('template') != 'N' ? hesk_POST('template') : -1; + $myuser['template'] = hesk_POST('template'); $myuser['signature'] = hesk_input( hesk_POST('signature') ); $myuser['autoassign'] = hesk_POST('autoassign') == 'Y' ? 1 : 0; $myuser['active'] = empty($_POST['active']) ? 0 : 1; diff --git a/inc/profile_functions.inc.php b/inc/profile_functions.inc.php index 49ac4926..b7681fc8 100644 --- a/inc/profile_functions.inc.php +++ b/inc/profile_functions.inc.php @@ -150,7 +150,8 @@ function hesk_profile_tab($session_array='new',$is_profile_page=true,$action='pr $selected = $_SESSION[$session_array]['permission_template'] == $row['id'] ? 'selected' : ''; echo ''; } - echo ''; + $selected = $_SESSION[$session_array]['permission_template'] == '-1' ? 'selected' : ''; + echo ''; echo ''; outputCheckboxJavascript(); ?> @@ -436,7 +437,7 @@ function outputCheckboxJavascript() { }); } function setTemplateToCustom() { - $('#permission-tpl').val('N'); + $('#permission-tpl').val('-1'); } "; } \ No newline at end of file