Edit include/staff/ticket.view.inc.php
search: <th width="300" class="tmeta"><?php echo Format:($entry); ?></th>
replace: <th width="300" class="tmeta"><?php echo Format:($entry); ?></th>
<th width="130">
<form id="deleteNote" action="tickets.php?id=<?php echo $ticket->getId(); ?>#reply" name="deleteNote" method="post" enctype="multipart/form-data">
<?php csrf_token(); ?>
<span class="error"></span>
<input type="hidden" name="id" name="id" value="<?php echo $ticket->getId(); ?>" />
<input type="hidden" name="note_id" value="<?php echo $entry; ?>" />
<input type="hidden" name="a" value="deletenote" />
<input class="btn btn-danger btn-xs" type="submit" value="Borrar Comentario" onClick='return confirm("¿Estás seguro de querer borrar este comentario?");' />
</form>
</th>
After, edit colspan=3 by colspan=4
Edit include/class.ticket.php
search: function delete() { and above add
/* UPD 26/09/13 - Para borrar comentarios */
function deleteNote($note_id) {
$sql = 'DELETE FROM ' . TICKET_THREAD_TABLE . ' WHERE id =' . $note_id;
if (!db_query($sql) || !db_affected_rows())
return false;
return true;
}
Edit scp/tickets.php
search: case 'reply':
ADD ABOVE
case 'deletenote':
$ticket->deleteNote($_POST);
break;