Skip to content
Snippets Groups Projects
Commit 9ef8f789 authored by aydreeihn's avatar aydreeihn
Browse files

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.
parent e1c7a8c9
No related branches found
No related tags found
No related merge requests found
......@@ -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) { ?>
&nbsp;<font class="error"><b>*</b>&nbsp;<?php echo $warn; ?></font>
<?php } ?>
} ?>
&nbsp;<font class="error"><b>*</b>&nbsp;<?php echo $errors['topicId']; ?></font>
</td>
</tr>
<tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment