diff --git a/include/ajax.tickets.php b/include/ajax.tickets.php index 9ce2a85fae7c6593b3d92dc722be136a977b074d..3d93e9a9cf3585d38189e8c705dafe54246fa2aa 100644 --- a/include/ajax.tickets.php +++ b/include/ajax.tickets.php @@ -901,9 +901,9 @@ class TicketsAjaxAPI extends AjaxController { } } + $count = count($_REQUEST['tids']); if (!$errors) { $i = 0; - $count = count($_REQUEST['tids']); $comments = $_REQUEST['comments']; foreach ($_REQUEST['tids'] as $tid) { if (($ticket=Ticket::lookup($tid)) @@ -914,8 +914,8 @@ class TicketsAjaxAPI extends AjaxController { } if (!$i) - $errors['err'] = sprintf(__('Unable to set status for %s'), - _N('selected ticket', 'selected tickets', $count)); + $errors['err'] = sprintf(__('Unable to change status for %s'), + _N('the selected ticket', 'any of the selected tickets', $count)); else { // Assume success if ($i==$count) { @@ -936,6 +936,17 @@ class TicketsAjaxAPI extends AjaxController { } } + $info['title'] = sprintf('%s %s', + TicketStateField::getVerb($state), + __('Tickets')); + + if ($count) + $info['title'] .= sprintf(' — %d %s', + $count, __('selected')); + + + $info['status_id'] = $_REQUEST['status_id']; + $info['comments'] = Format::htmlchars($_REQUEST['comments']); $info['errors'] = $errors; return self::_setStatus($state, $info); } diff --git a/include/staff/templates/ticket-status.tmpl.php b/include/staff/templates/ticket-status.tmpl.php index 8646a05cf439b1f550b6b992fdeef8d72d4df1ee..7f7dc7d647edec0ff78f9217f3c111392c0e4ce2 100644 --- a/include/staff/templates/ticket-status.tmpl.php +++ b/include/staff/templates/ticket-status.tmpl.php @@ -86,7 +86,7 @@ $action = $info['action'] ?: ('#tickets/status/'. $state); cols="50" rows="3" wrap="soft" style="width:100%" class="richtext ifhtml no-bar" placeholder="<?php echo $placeholder; ?>"><?php - echo $info['notes']; ?></textarea> + echo $info['comments']; ?></textarea> </td> </tr> </tbody>