Skip to content
Snippets Groups Projects
Unverified Commit ba991dd1 authored by Peter Rotich's avatar Peter Rotich Committed by GitHub
Browse files

Merge pull request #4401 from aydreeihn/issue/required-topic-error

Help Topic Required Error Message:
parents 5846d8e1 9ef8f789
No related branches found
No related tags found
No related merge requests found
...@@ -96,7 +96,7 @@ if ($_POST) ...@@ -96,7 +96,7 @@ if ($_POST)
if($topics=Topic::getHelpTopics()) { if($topics=Topic::getHelpTopics()) {
if($ticket->topic_id && !array_key_exists($ticket->topic_id, $topics)) { if($ticket->topic_id && !array_key_exists($ticket->topic_id, $topics)) {
$topics[$ticket->topic_id] = $ticket->topic; $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) { foreach($topics as $id =>$name) {
echo sprintf('<option value="%d" %s>%s</option>', echo sprintf('<option value="%d" %s>%s</option>',
...@@ -112,10 +112,8 @@ if ($_POST) ...@@ -112,10 +112,8 @@ if ($_POST)
data-title="<?php echo __('Required to close ticket'); ?>" 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'); ?>" data-content="<?php echo __('Data is required in this field in order to close the related ticket'); ?>"
></i><?php ></i><?php
} } ?>
if($warn) { ?> &nbsp;<font class="error"><b>*</b>&nbsp;<?php echo $errors['topicId']; ?></font>
&nbsp;<font class="error"><b>*</b>&nbsp;<?php echo $warn; ?></font>
<?php } ?>
</td> </td>
</tr> </tr>
<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