From 9ef8f789cb20da6b9d99d8ecc05ab065deaf9e25 Mon Sep 17 00:00:00 2001 From: aydreeihn <adriane@enhancesoft.com> Date: Thu, 2 Aug 2018 14:04:30 -0500 Subject: [PATCH] Help Topic Required Error Message: This commit addresses an issue where the validation error for trying to save a Ticket without a Help Topic was not being shown as a result of the error message that was added to ensure that the Help Topic selected is Active. --- include/staff/ticket-edit.inc.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/staff/ticket-edit.inc.php b/include/staff/ticket-edit.inc.php index b60812bea..f23adb3c3 100644 --- a/include/staff/ticket-edit.inc.php +++ b/include/staff/ticket-edit.inc.php @@ -96,7 +96,7 @@ if ($_POST) if($topics=Topic::getHelpTopics()) { if($ticket->topic_id && !array_key_exists($ticket->topic_id, $topics)) { $topics[$ticket->topic_id] = $ticket->topic; - $warn = sprintf(__('%s selected must be active'), __('Help Topic')); + $errors['topicId'] = sprintf(__('%s selected must be active'), __('Help Topic')); } foreach($topics as $id =>$name) { echo sprintf('<option value="%d" %s>%s</option>', @@ -112,10 +112,8 @@ if ($_POST) data-title="<?php echo __('Required to close ticket'); ?>" data-content="<?php echo __('Data is required in this field in order to close the related ticket'); ?>" ></i><?php - } - if($warn) { ?> - <font class="error"><b>*</b> <?php echo $warn; ?></font> - <?php } ?> + } ?> + <font class="error"><b>*</b> <?php echo $errors['topicId']; ?></font> </td> </tr> <tr> -- GitLab