';
print $langs->trans("ErrorFieldRequired", $langs->transnoentities("TicketEmailNotificationFrom")).'
';
print $langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentities("Ticket"));
- print '
';
+ print '
';
} else {
print '
'.$langs->trans('TicketPublicInfoCreateTicket').'
';
$formticket->showForm(0, 'edit', 1);
diff --git a/htdocs/public/ticket/view.php b/htdocs/public/ticket/view.php
index 3fec075160b..6485f9fcee2 100644
--- a/htdocs/public/ticket/view.php
+++ b/htdocs/public/ticket/view.php
@@ -262,8 +262,10 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a
// Category
print '
| '.$langs->trans("Category").' | ';
- print img_picto('', 'category', 'class="pictofixedwidth"');
- print dol_escape_htmltag($object->dao->category_label);
+ if ($object->dao->category_label) {
+ print img_picto('', 'category', 'class="pictofixedwidth"');
+ print dol_escape_htmltag($object->dao->category_label);
+ }
print ' |
';
// Severity
diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php
index 5faa7b201b7..bbb563a1486 100644
--- a/htdocs/ticket/card.php
+++ b/htdocs/ticket/card.php
@@ -426,10 +426,10 @@ if (empty($reshook)) {
}
}
- if ($action == "confirm_close" && GETPOST('confirm', 'alpha') == 'yes' && $user->rights->ticket->write) {
+ if (($action == "confirm_close" || $action == "confirm_abandon") && GETPOST('confirm', 'alpha') == 'yes' && $user->rights->ticket->write) {
$object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha'));
- if ($object->close($user)) {
+ if ($object->close($user, ($action == "confirm_abandon" ? 1 : 0))) {
setEventMessages($langs->trans('TicketMarkedAsClosed'), null, 'mesgs');
$url = 'card.php?action=view&track_id='.GETPOST('track_id', 'alpha');
@@ -749,7 +749,7 @@ if ($action == 'create' || $action == 'presend') {
print '
';
print ''; */
-} elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'dellink' || $action == 'presend' || $action == 'presend_addmessage' || $action == 'close' || $action == 'delete' || $action == 'editcustomer' || $action == 'progression' || $action == 'reopen'
+} elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'dellink' || $action == 'presend' || $action == 'presend_addmessage' || $action == 'close' || $action == 'abandon' || $action == 'delete' || $action == 'editcustomer' || $action == 'progression' || $action == 'reopen'
|| $action == 'editsubject' || $action == 'edit_extras' || $action == 'update_extras' || $action == 'edit_extrafields' || $action == 'set_extrafields' || $action == 'classify' || $action == 'sel_contract' || $action == 'edit_message_init' || $action == 'set_status' || $action == 'dellink') {
if ($res > 0) {
// or for unauthorized internals users
@@ -764,6 +764,13 @@ if ($action == 'create' || $action == 'presend') {
print '| '.$langs->trans("Type").' | ';
- print $langs->getLabelFromKey($db, 'TicketTypeShort'.$object->type_code, 'c_ticket_type', 'code', 'label', $object->type_code);
+ if (!empty($object->type_code)) {
+ print $langs->getLabelFromKey($db, 'TicketTypeShort'.$object->type_code, 'c_ticket_type', 'code', 'label', $object->type_code);
+ }
print ' |
';
// Group
print '| '.$langs->trans("TicketCategory").' | ';
- print $langs->getLabelFromKey($db, 'TicketCategoryShort'.$object->category_code, 'c_ticket_category', 'code', 'label', $object->category_code);
+ if (!empty($object->category_code)) {
+ print $langs->getLabelFromKey($db, 'TicketCategoryShort'.$object->category_code, 'c_ticket_category', 'code', 'label', $object->category_code);
+ }
print ' |
';
// Severity
print '| '.$langs->trans("TicketSeverity").' | ';
- print $langs->getLabelFromKey($db, 'TicketSeverityShort'.$object->severity_code, 'c_ticket_severity', 'code', 'label', $object->severity_code);
+ if (!empty($object->severity_code)) {
+ print $langs->getLabelFromKey($db, 'TicketSeverityShort'.$object->severity_code, 'c_ticket_severity', 'code', 'label', $object->severity_code);
+ }
print ' |
';
}
print ''; // End table actions
@@ -1296,8 +1309,13 @@ if ($action == 'create' || $action == 'presend') {
print '