<table width="100%"> <?php if ($info['extra']) { ?> <tbody> <tr><td colspan="2"><strong><?php echo $info['extra']; ?> </strong></td> </tr> </tbody> <?php } $verb = ''; if ($state) { $statuses = TicketStatusList::getStatuses(array('states' => array($state)))->all(); $verb = TicketStateField::getVerb($state); } if ($statuses) { ?> <tbody> <tr> <td colspan=2> <span> <?php if (count($statuses) > 1) { ?> <strong><?php echo __('Status'); ?> : </strong> <select name="status_id">
private function _changeTicketStatus($ticket, $state, $info = array(), $errors = array()) { $verb = TicketStateField::getVerb($state); $info['action'] = sprintf('#tickets/%d/status', $ticket->getId()); $info['title'] = sprintf(__('%1$s Ticket #%2$s'), $verb ?: $state, $ticket->getNumber()); // Deleting? if (!strcasecmp($state, 'deleted')) { $info['placeholder'] = sprintf(__('Optional reason for deleting %s'), __('this ticket')); $info['warn'] = sprintf(__('Are you sure you want to DELETE %s?'), __('this ticket')); //TODO: remove message below once we ship data retention plug $info['extra'] = sprintf('<strong>%s</strong>', __('Deleted tickets CANNOT be recovered, including any associated attachments.')); } $info['status_id'] = $info['status_id'] ?: $ticket->getStatusId(); $info['comments'] = Format::htmlchars($_REQUEST['comments']); return self::_changeStatus($state, $info, $errors); }