Skip to content
Snippets Groups Projects
Commit 46ab79b3 authored by Jared Hancock's avatar Jared Hancock
Browse files

draft: Prefer POST submission over saved draft

parent 181934ba
No related branches found
No related tags found
No related merge requests found
...@@ -581,7 +581,7 @@ $tcount = $ticket->getThreadEntries($types)->count(); ...@@ -581,7 +581,7 @@ $tcount = $ticket->getThreadEntries($types)->count();
class="<?php if ($cfg->isRichTextEnabled()) echo 'richtext'; class="<?php if ($cfg->isRichTextEnabled()) echo 'richtext';
?> draft draft-delete" <?php ?> draft draft-delete" <?php
list($draft, $attrs) = Draft::getDraftAndDataAttrs('ticket.response', $ticket->getId(), $info['response']); list($draft, $attrs) = Draft::getDraftAndDataAttrs('ticket.response', $ticket->getId(), $info['response']);
echo $attrs; ?>><?php echo $draft ?: $info['response']; echo $attrs; ?>><?php echo $_POST ? $info['response'] : $draft;
?></textarea> ?></textarea>
<div id="reply_form_attachments" class="attachments"> <div id="reply_form_attachments" class="attachments">
<?php <?php
...@@ -698,7 +698,7 @@ $tcount = $ticket->getThreadEntries($types)->count(); ...@@ -698,7 +698,7 @@ $tcount = $ticket->getThreadEntries($types)->count();
class="<?php if ($cfg->isRichTextEnabled()) echo 'richtext'; class="<?php if ($cfg->isRichTextEnabled()) echo 'richtext';
?> draft draft-delete" <?php ?> draft draft-delete" <?php
list($draft, $attrs) = Draft::getDraftAndDataAttrs('ticket.note', $ticket->getId(), $info['note']); list($draft, $attrs) = Draft::getDraftAndDataAttrs('ticket.note', $ticket->getId(), $info['note']);
echo $attrs; ?>><?php echo $draft ?: $info['note']; echo $attrs; ?>><?php echo $_POST ? $info['note'] : $draft;
?></textarea> ?></textarea>
<div class="attachments"> <div class="attachments">
<?php <?php
......
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