#196 Fix some "custom" template stuff

merge-requests/2/head
Mike Koch 9 years ago
parent 18411f652a
commit 9a5bc49ac1

@ -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 .= '<li>' . $hesklang['enter_valid_email'] . '</li>';
$myuser['user'] = hesk_input( hesk_POST('user') ) or $hesk_error_buffer .= '<li>' . $hesklang['enter_username'] . '</li>';
$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;

@ -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 '<option value="'.$row['id'].'" '.$selected.'>'.htmlspecialchars($row['name']).'</option>';
}
echo '<option value="N" disabled>'.htmlspecialchars($hesklang['custom']).'</option>';
$selected = $_SESSION[$session_array]['permission_template'] == '-1' ? 'selected' : '';
echo '<option value="-1" '.$selected.'>'.htmlspecialchars($hesklang['custom']).'</option>';
echo '</select>';
outputCheckboxJavascript();
?>
@ -436,7 +437,7 @@ function outputCheckboxJavascript() {
});
}
function setTemplateToCustom() {
$('#permission-tpl').val('N');
$('#permission-tpl').val('-1');
}
</script>";
}
Loading…
Cancel
Save