diff --git a/plugin/ticket/src/ticket_details.php b/plugin/ticket/src/ticket_details.php index 6abaec63e5..89752e0c5b 100755 --- a/plugin/ticket/src/ticket_details.php +++ b/plugin/ticket/src/ticket_details.php @@ -31,13 +31,13 @@ $(document).ready(function(){ width: 600, modal: true, buttons: { - ' . get_lang('Accept') . ': function(){ - $("#frmResponsable").submit() - }, - ' . ucfirst(get_lang('Close')) . ': function() { - $(this).dialog("close"); - } - } + ' . get_lang('Accept') . ': function(){ + $("#frmResponsable").submit() + }, + ' . ucfirst(get_lang('Close')) . ': function() { + $(this).dialog("close"); + } + } }); $("a#assign").click(function () { @@ -224,17 +224,16 @@ if (isset($_REQUEST['action'])) { } } -$titulo = '

Ticket #' . $ticket['ticket']['ticket_code'] . '

'; +$titulo = 'Ticket #' . $ticket['ticket']['ticket_code']; $firstMessage = is_array($ticket['messages']) ? $ticket['messages'][0] : ''; - +$subTitle = ''; if (!empty($firstMessage) && isset($firstMessage['subject'])) { - $titulo .= "

".$firstMessage['subject']."

"; + $subTitle = $firstMessage['subject']; } if (!isset($_POST['compose'])) { - if (isset($_POST['close'])) { - $_GET['ticket_id'] = $_POST['ticket_id']; - TicketManager::close_ticket($_GET['ticket_id'], $user_id); + if (isset($_REQUEST['close'])) { + TicketManager::close_ticket($_REQUEST['ticket_id'], $user_id); $ticket['ticket']['status_id'] = 'CLS'; $ticket['ticket']['status'] = $plugin->get_lang('Closed'); } @@ -247,10 +246,8 @@ if (!isset($_POST['compose'])) { if ($ticket['ticket']['status_id'] != 'REE' && $ticket['ticket']['status_id'] != 'CLS' && $isAdmin) { if (intval($ticket['ticket']['assigned_last_user']) == $user_id) { if ($ticket['ticket']['status_id'] != 'CLS') { - $form_close_ticket.= '
'; - $form_close_ticket.= ' - '; - $form_close_ticket.= '
'; + $form_close_ticket.= ''; + $form_close_ticket.= get_lang('Close') . ''; } } } @@ -258,11 +255,12 @@ if (!isset($_POST['compose'])) { $img_assing = ''; if ($isAdmin && $ticket['ticket']['status_id'] != 'CLS' && $ticket['ticket']['status_id'] != 'REE') { if ($ticket['ticket']['assigned_last_user'] != 0 && $ticket['ticket']['assigned_last_user'] == $user_id) { - $img_assing = ' - + $img_assing = ' + '.get_lang('Unassign').' '; } else { - $img_assing = ''; + $img_assing = ''.get_lang('Assign').''; + } } $bold = ''; @@ -285,24 +283,26 @@ if (!isset($_POST['compose'])) { - - @@ -322,7 +322,7 @@ if (!isset($_POST['compose'])) { '; } - //select admins + // select admins $select_admins = '
- ' . $titulo . ' + + +

' . $titulo . ' '.$form_close_ticket.' '.$img_assing.'

+

'.$subTitle.'

'.$senderData.' ' . get_lang('Created') . ' '. Display::url( date_to_str_ago($ticket['ticket']['start_date_from_db']), '#', - ['title' => $ticket['ticket']['start_date'], 'data-toggle' => 'tooltip'] - ).' '.get_lang('Updated').' '. + ['title' => $ticket['ticket']['start_date'], 'class' => 'boot-tooltip'] + ).' '. + get_lang('Updated').' '. Display::url( date_to_str_ago($ticket['ticket']['sys_lastedit_datetime_from_db']), '#', - ['title' => $ticket['ticket']['sys_lastedit_datetime'], 'data-toggle' => 'tooltip'] + ['title' => $ticket['ticket']['sys_lastedit_datetime'], 'class' => 'boot-tooltip'] ).'

' . $img_assing . '' . $form_close_ticket . '

' . get_lang('Category') . ': ' . $ticket['ticket']['name'] . '