diff --git a/include/class.list.php b/include/class.list.php index fb6a2d45acd5444a69b998b01293ff05705f53ef..df431b9efe231fbeaa36a8a7f93630c97e32cf62 100644 --- a/include/class.list.php +++ b/include/class.list.php @@ -1003,7 +1003,7 @@ class TicketStatus extends VerySimpleModel implements CustomListItem { return $this->getName(); } function getLocalName() { - return $this->getLocal('value'); + return $this->getLocal('value', $this->getName()); } function getAbbrev() { @@ -1030,10 +1030,10 @@ class TicketStatus extends VerySimpleModel implements CustomListItem { function getTranslateTag($subtag) { return _H(sprintf('status.%s.%s', $subtag, $this->id)); } - function getLocal($subtag) { + function getLocal($subtag, $default) { $tag = $this->getTranslateTag($subtag); $T = CustomDataTranslation::translate($tag); - return $T != $tag ? $T : $this->get($subtag); + return $T != $tag ? $T : $default; } static function getLocalById($id, $subtag, $default) { $tag = _H(sprintf('status.%s.%s', $subtag, $id)); diff --git a/include/client/register.inc.php b/include/client/register.inc.php index deb3c5d978fef96242b55eb22faa350f771ae8b2..6ac754b8a07b412a43fa1f931c32504337d3f1ef 100644 --- a/include/client/register.inc.php +++ b/include/client/register.inc.php @@ -111,7 +111,7 @@ $('#timezone-dropdown').chosen({ </script> <?php if (!isset($info['timezone'])) { ?> <!-- Auto detect client's timezone where possible --> -<script type="text/javascript" src="<?php echo ROOT_PATH; ?>/js/jstz.min.js"></script> +<script type="text/javascript" src="<?php echo ROOT_PATH; ?>js/jstz.min.js"></script> <script type="text/javascript"> $(function() { var zone = jstz.determine(); diff --git a/include/client/templates/dynamic-form.tmpl.php b/include/client/templates/dynamic-form.tmpl.php index 14bcf5432cff883ab27b256b52d650d962a5eb08..a333ac2eef0d7aff31ee0a35d7cc18f4717c3bc5 100644 --- a/include/client/templates/dynamic-form.tmpl.php +++ b/include/client/templates/dynamic-form.tmpl.php @@ -16,7 +16,7 @@ // 'private' are not included in the output for clients global $thisclient; foreach ($form->getFields() as $field) { - if (!$field->isEditableToUsers()) + if (!$field->isVisibleToUsers() && !$field->isEditableToUsers()) continue; ?> <tr> diff --git a/include/staff/category.inc.php b/include/staff/category.inc.php index dc0eaf086d51d997ba2659f985d93b873d408b61..0aa2bbf99d3fe558f964674882c16c3b3fd92723 100644 --- a/include/staff/category.inc.php +++ b/include/staff/category.inc.php @@ -97,7 +97,7 @@ if (count($langs) > 1) { ?> $cname = "trans[$code][$cname]"; $dname = "trans[$code][$dname]"; } ?> - <div class="tab_content" style="margin:0 45px" style="<?php + <div class="tab_content" style="margin:0 48px;<?php if ($code != $cfg->getPrimaryLanguage()) echo "display:none;"; ?>" id="lang-<?php echo $tag; ?>" <?php if ($i['direction'] == 'rtl') echo 'dir="rtl" class="rtl"'; ?> diff --git a/include/staff/profile.inc.php b/include/staff/profile.inc.php index 665cf53d533126179e02726f512e434cb0280f3d..55e13a4752109ffff38952d04db3ddd10997fcf0 100644 --- a/include/staff/profile.inc.php +++ b/include/staff/profile.inc.php @@ -97,7 +97,7 @@ $info['id']=$staff->getId(); </select> <button class="action-button" onclick="javascript: $('head').append($('<script>').attr('src', '<?php - echo ROOT_PATH; ?>/js/jstz.min.js')); + echo ROOT_PATH; ?>js/jstz.min.js')); var recheck = setInterval(function() { if (window.jstz !== undefined) { clearInterval(recheck); diff --git a/include/staff/settings-system.inc.php b/include/staff/settings-system.inc.php index 175a4de25429bcf93739348a1097a087424eb159..c1b573bd766c6f249a3efa949bd694b57440b913 100644 --- a/include/staff/settings-system.inc.php +++ b/include/staff/settings-system.inc.php @@ -157,7 +157,7 @@ $gmtime = Misc::gmtime(); </select> <button class="action-button" onclick="javascript: $('head').append($('<script>').attr('src', '<?php - echo ROOT_PATH; ?>/js/jstz.min.js')); + echo ROOT_PATH; ?>js/jstz.min.js')); var recheck = setInterval(function() { if (window.jstz !== undefined) { clearInterval(recheck); diff --git a/include/staff/staff.inc.php b/include/staff/staff.inc.php index 7a9c01eeedacff6d082453c7aeaf44fbe74c7fb7..f1ac113c711a521c93119409896686676a9396f1 100644 --- a/include/staff/staff.inc.php +++ b/include/staff/staff.inc.php @@ -226,24 +226,6 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <span class="error"> <?php echo $errors['isactive']; ?></span> <i class="help-tip icon-question-sign" href="#account_status"></i> </td> </tr> - <tr> - <td width="180" class="required"> - <?php echo __('Assigned Group');?>: - </td> - <td> - <select name="group_id" id="group_id"> - <option value="0">— <?php echo __('Select Group');?> —</option> - <?php - foreach (Group::getGroups() as $id=>$name) { - $sel=($info['group_id']==$id)?'selected="selected"':''; - echo sprintf('<option value="%d" %s>%s</option>', - $id, $sel, $name); - } - ?> - </select> - <span class="error">* <?php echo $errors['group_id']; ?></span> <i class="help-tip icon-question-sign" href="#assigned_group"></i> - </td> - </tr> <tr> <td width="180" class="required"> <?php echo __('Primary Department');?>: @@ -258,7 +240,16 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); } ?> </select> - + <span class="error">*</span> + <i class="help-tip icon-question-sign" href="#primary_department"></i> + <div class="error"><?php echo $errors['dept_id']; ?></div> + </td> + </tr> + <tr> + <td width="180" class="required"> + <?php echo __('Primary Role');?>: + </td> + <td> <select name="role_id"> <option value="0">— <?php echo __('Select Role');?> —</option> <?php @@ -269,11 +260,28 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); ?> </select> <span class="error">*</span> - <i class="help-tip icon-question-sign" href="#primary_department"></i> - <div class="error"><?php echo $errors['dept_id']; ?></div> + <i class="help-tip icon-question-sign" href="#primary_role"></i> <div class="error"><?php echo $errors['role_id']; ?></div> </td> </tr> + <tr> + <td width="180" class="required"> + <?php echo __('Assigned Group');?>: + </td> + <td> + <select name="group_id" id="group_id"> + <option value="0">— <?php echo __('Select Group');?> —</option> + <?php + foreach (Group::getGroups() as $id=>$name) { + $sel=($info['group_id']==$id)?'selected="selected"':''; + echo sprintf('<option value="%d" %s>%s</option>', + $id, $sel, $name); + } + ?> + </select> + <span class="error">* <?php echo $errors['group_id']; ?></span> <i class="help-tip icon-question-sign" href="#assigned_group"></i> + </td> + </tr> <tr> <td width="180"> <?php echo __('Time Zone');?>: diff --git a/scp/tickets.php b/scp/tickets.php index 2db8701c117766449d4f23e811bf4406e2bbd99a..d79a299bd4e88cf7d5582e82ea8016e59ca1fcb0 100644 --- a/scp/tickets.php +++ b/scp/tickets.php @@ -61,7 +61,7 @@ if($_POST && !$errors): $role = $thisstaff->getRole($ticket->getDeptId()); switch(strtolower($_POST['a'])): case 'reply': - if(!$role || !$role->canPostReply()) + if(!$role || !$role->canPostTicketReply()) $errors['err'] = __('Action denied. Contact admin for access'); else { diff --git a/setup/inc/class.installer.php b/setup/inc/class.installer.php index 296a081db3512c26ad9c1b3215325b7699544a93..321d64ae478e79a0726bcf9fd6ba4eda7a3e73eb 100644 --- a/setup/inc/class.installer.php +++ b/setup/inc/class.installer.php @@ -209,7 +209,7 @@ class Installer extends SetupWizard { 'alert_email_id'=>$alert_email_id, 'default_dept_id'=>$dept_id_1, 'default_sla_id'=>$sla_id_1, 'default_template_id'=>$template_id_1, - 'default_timezone' => date_default_timezone_get() + 'default_timezone' => date_default_timezone_get(), 'admin_email'=>$vars['admin_email'], 'schema_signature'=>$streams['core'], 'helpdesk_url'=>URL,