diff --git a/include/class.forms.php b/include/class.forms.php index 7e59dd169735cd629f749fb435027923a94c79eb..465bb79d14f49f15341bb9bd0399086bfff61ca2 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -3530,7 +3530,7 @@ class ThreadEntryWidget extends Widget { class="<?php if ($cfg->isRichTextEnabled()) echo 'richtext'; ?> draft draft-delete" <?php echo $attrs; ?> cols="21" rows="8" style="width:80%;"><?php echo - $draft ?: Format::htmlchars($this->value); ?></textarea> + Format::htmlchars($this->value) ?: $draft; ?></textarea> <?php $config = $this->field->getConfiguration(); if (!$config['attachments']) diff --git a/include/class.ticket.php b/include/class.ticket.php index 48ed729d44915703e345f8663c4776c6ecf97aa5..27a677b2324e86ac36f074aa9a0198f10ddc1caa 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -3394,10 +3394,11 @@ implements RestrictedAccess, Threadable { // Ensure agent has rights to make assignment in the cited // department - if ($role - ? !$role->hasPerm(TicketModel::PERM_ASSIGN) - : !$thisstaff->hasPerm(TicketModel::PERM_ASSIGN, false) - ) { + if ($vars['assignId'] && !( + $role + ? $role->hasPerm(TicketModel::PERM_ASSIGN) + : $thisstaff->hasPerm(TicketModel::PERM_ASSIGN, false) + )) { $errors['assignId'] = __('Action Denied. You are not allowed to assign/reassign tickets.'); } diff --git a/include/staff/ticket-open.inc.php b/include/staff/ticket-open.inc.php index ffadcbe921a557082632e9ec6e7e90d3d9a8ce97..4b536cd24b2ea23be202e028667785747d62d882 100644 --- a/include/staff/ticket-open.inc.php +++ b/include/staff/ticket-open.inc.php @@ -323,7 +323,7 @@ if ($_POST) name="response" id="response" cols="21" rows="8" style="width:80%;" <?php list($draft, $attrs) = Draft::getDraftAndDataAttrs('ticket.staff.response', false, $info['response']); - echo $attrs; ?>><?php echo $draft ?: $info['response']; + echo $attrs; ?>><?php echo $_POST ? $info['response'] : $draft; ?></textarea> <div class="attachments"> <?php @@ -392,7 +392,7 @@ print $response_form->getField('attachments')->render(); placeholder="<?php echo __('Optional internal note (recommended on assignment)'); ?>" name="note" cols="21" rows="6" style="width:80%;" <?php list($draft, $attrs) = Draft::getDraftAndDataAttrs('ticket.staff.note', false, $info['note']); - echo $attrs; ?>><?php echo $draft ?: $info['note']; + echo $attrs; ?>><?php echo $_POST ? $info['note'] : $draft; ?></textarea> </td> </tr>