@@ -146,25 +137,25 @@ function hesk_profile_tab($session_array='new',$is_profile_page=true,$action='pr
?>
-
+
-
-
- '.$hesklang['astaff'].' '.$hesklang['staff_can'];
+ // Get list of permission templates. If current user is not admin, exclude permission tpl 1
+ $excludeSql = $_SESSION['isadmin'] ? '' : " WHERE `heskprivileges` <> 'ALL'";
+ $res = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."permission_templates`".$excludeSql);
+ $templates = array();
+ echo '';
+ outputCheckboxJavascript();
?>
-
+
@@ -383,3 +374,24 @@ function hesk_profile_tab($session_array='new',$is_profile_page=true,$action='pr
+ function updateCheckboxes() {
+ ".$javascriptMarkup."
+ }
+ ";
+}
\ No newline at end of file
diff --git a/language/en/text.php b/language/en/text.php
index 6abafd15..7c438e9a 100644
--- a/language/en/text.php
+++ b/language/en/text.php
@@ -98,6 +98,9 @@ $hesklang['permission_template_no_longer_admin'] = 'Permission template is no lo
$hesklang['cannot_change_admin_staff'] = 'You cannot change admin/non-admin status for the Administrator and Staff templates!';
$hesklang['permission_tpl_man'] = 'Manage permission templates'; // Menu link
$hesklang['permission_templates'] = 'Permission Templates';
+$hesklang['can_man_permission_tpl'] = 'Can manage permission templates';
+$hesklang['permission_template_colon'] = 'Permission Template:';
+$hesklang['custom'] = 'Custom';
// ADDED OR MODIFIED IN Mods for HESK 2.2.1
$hesklang['popart_no_colon']='Top Knowledgebase Articles'; // same as $hesklang['popart'] but without a colon (:)