From 9a8da11a8f4c80ee4bbe0c0b3b76ef8e3afbdb12 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Tue, 27 Oct 2015 13:26:13 -0400 Subject: [PATCH 01/10] #391 Add .active to customer-side nav items --- inc/header.inc.php | 32 +++++++++++++++++++++++++++----- index.php | 3 +++ knowledgebase.php | 2 ++ ticket.php | 1 + 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/inc/header.inc.php b/inc/header.inc.php index 05ce1593..deccdfda 100644 --- a/inc/header.inc.php +++ b/inc/header.inc.php @@ -147,7 +147,12 @@ if (is_dir(HESK_PATH . 'install')) { background-color: ; } - .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:focus, .navbar-default .navbar-nav > .open > a:hover { + .navbar-default .navbar-nav > .open > a, + .navbar-default .navbar-nav > .open > a:focus, + .navbar-default .navbar-nav > .open > a:hover, + .navbar-default .navbar-nav > .active > a, + .navbar-default .navbar-nav > .active > a:focus, + .navbar-default .navbar-nav > .active > a:hover { color: ; background-color: ; background-image: none; @@ -257,10 +262,22 @@ if ($modsForHesk_settings['show_icons']) { '; + echo '
'; break; /* Large text box */ @@ -825,7 +825,7 @@ function print_add_ticket()
-
'; + '; break; case 'multiselect': @@ -902,7 +902,7 @@ function print_add_ticket()
-
'; + '; break; @@ -956,7 +956,7 @@ function print_add_ticket()
-
'; + '; } } } From 967df9dbd428564fde2b074059c8d5771617c990 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Thu, 29 Oct 2015 13:28:50 -0400 Subject: [PATCH 07/10] #395 Fix custom field requirements --- index.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index bd74d58f..535f16a4 100644 --- a/index.php +++ b/index.php @@ -403,7 +403,6 @@ function print_add_ticket() $formattedId = preg_replace("/[\s_]/", "-", $formattedId); $cls = in_array($k, $_SESSION['iserror']) ? ' class="isError" ' : ''; - echo '
+ value="' . $v['value'] . '" '.$errorText. ' '.$required.' readonly> ' . $hesklang['date_format'] . '
'; @@ -706,6 +706,7 @@ function print_add_ticket() $v['name'] = $hesklang[$v['name']]; } + $required = $v['req'] ? 'required' : ''; $v['req'] = $v['req'] ? '*' : ''; if ($v['type'] == 'checkbox' || $v['type'] == 'multiselect') { @@ -857,10 +858,13 @@ function print_add_ticket()
-
'; + + + '; break; case 'date': + $errorText = $required == 'required' ? 'data-error="'.htmlspecialchars($hesklang['this_field_is_required']).'"' : ''; //Clean up multiple dashes or whitespaces $formattedId = preg_replace("/[\s-]+/", " ", $v['name']); $formattedId = preg_replace("/[\s_]/", "-", $formattedId); @@ -876,8 +880,9 @@ function print_add_ticket()
+ value="' . $v['value'] . '" '.$errorText. ' readonly="readonly" '.$required.'> ' . $hesklang['date_format'] . ' +
'; break; From b58bc19286dee61d2eee4e29e6b32bb63f17376c Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Thu, 29 Oct 2015 13:35:05 -0400 Subject: [PATCH 08/10] Validate anti-spam question --- index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 535f16a4..15af7ffd 100644 --- a/index.php +++ b/index.php @@ -1009,7 +1009,12 @@ function print_add_ticket() $value = stripslashes(hesk_input($_SESSION['c_question'])); } $cls = in_array('question', $_SESSION['iserror']) ? ' class="isError" ' : ''; - echo '
' . $hesk_settings['question_ask'] . '
'; + echo '
' . $hesk_settings['question_ask'] . '
+ +
+
'; ?> Date: Thu, 29 Oct 2015 14:08:35 -0400 Subject: [PATCH 09/10] Fix header warning --- inc/header.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/header.inc.php b/inc/header.inc.php index deccdfda..70f19ccb 100644 --- a/inc/header.inc.php +++ b/inc/header.inc.php @@ -41,6 +41,7 @@ if (!function_exists('mfh_getSettings')) { $modsForHesk_settings = array(); if (is_dir(HESK_PATH . 'install')) { + $modsForHesk_settings['navbar_title_url'] = '#'; $modsForHesk_settings['rtl'] = 0; $modsForHesk_settings['use_bootstrap_theme'] = 1; $modsForHesk_settings['show_icons'] = 1; From 2f301a1cb38d54ad36df04270638593645a01eb2 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Thu, 29 Oct 2015 14:18:05 -0400 Subject: [PATCH 10/10] #398 Parse date custom fields --- admin/export.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/admin/export.php b/admin/export.php index b73771fe..40745fe7 100644 --- a/admin/export.php +++ b/admin/export.php @@ -502,7 +502,12 @@ if (isset($_GET['w'])) { // Add custom fields foreach ($hesk_settings['custom_fields'] as $k => $v) { if ($v['use']) { - $tmp .= ' ' . "\n"; + $output = $ticket[$k]; + if ($v['type'] == 'date' && !empty($ticket[$k])) { + $dt = date('Y-m-d', $ticket[$k]); + $output = hesk_dateToString($dt, 0); + } + $tmp .= ' ' . "\n"; } }