FIX Closing ticket from public interface
This commit is contained in:
parent
ec34ce1e64
commit
feee437471
@ -237,37 +237,37 @@ if ($action == "view_ticketlist")
|
|||||||
}
|
}
|
||||||
if (!empty($search_subject)) {
|
if (!empty($search_subject)) {
|
||||||
$filter['t.subject'] = $search_subject;
|
$filter['t.subject'] = $search_subject;
|
||||||
$param .= '&search_subject=' . $search_subject;
|
$param .= '&search_subject=' .urlencode($search_subject);
|
||||||
}
|
}
|
||||||
if (!empty($search_type)) {
|
if (!empty($search_type)) {
|
||||||
$filter['t.type_code'] = $search_type;
|
$filter['t.type_code'] = $search_type;
|
||||||
$param .= '&search_type=' . $search_type;
|
$param .= '&search_type=' . urlencode($search_type);
|
||||||
}
|
}
|
||||||
if (!empty($search_category)) {
|
if (!empty($search_category)) {
|
||||||
$filter['t.category_code'] = $search_category;
|
$filter['t.category_code'] = $search_category;
|
||||||
$param .= '&search_category=' . $search_category;
|
$param .= '&search_category=' . urlencode($search_category);
|
||||||
}
|
}
|
||||||
if (!empty($search_severity)) {
|
if (!empty($search_severity)) {
|
||||||
$filter['t.severity_code'] = $search_severity;
|
$filter['t.severity_code'] = $search_severity;
|
||||||
$param .= '&search_severity=' . $search_severity;
|
$param .= '&search_severity=' . urlencode($search_severity);
|
||||||
}
|
}
|
||||||
if (!empty($search_fk_user_assign)) {
|
if (!empty($search_fk_user_assign)) {
|
||||||
// -1 value = all so no filter
|
// -1 value = all so no filter
|
||||||
if ($search_fk_user_assign > 0) {
|
if ($search_fk_user_assign > 0) {
|
||||||
$filter['t.fk_user_assign'] = $search_fk_user_assign;
|
$filter['t.fk_user_assign'] = $search_fk_user_assign;
|
||||||
$param .= '&search_fk_user_assign=' . $search_fk_user_assign;
|
$param .= '&search_fk_user_assign=' . urlencode($search_fk_user_assign);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!empty($search_fk_user_create)) {
|
if (!empty($search_fk_user_create)) {
|
||||||
// -1 value = all so no filter
|
// -1 value = all so no filter
|
||||||
if ($search_fk_user_create > 0) {
|
if ($search_fk_user_create > 0) {
|
||||||
$filter['t.fk_user_create'] = $search_fk_user_create;
|
$filter['t.fk_user_create'] = $search_fk_user_create;
|
||||||
$param .= '&search_fk_user_create=' . $search_fk_user_create;
|
$param .= '&search_fk_user_create=' . urlencode($search_fk_user_create);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((isset($search_fk_status) && $search_fk_status != '') && $search_fk_status != '-1' && $search_fk_status != 'non_closed') {
|
if ((isset($search_fk_status) && $search_fk_status != '') && $search_fk_status != '-1' && $search_fk_status != 'non_closed') {
|
||||||
$filter['t.fk_statut'] = $search_fk_status;
|
$filter['t.fk_statut'] = $search_fk_status;
|
||||||
$param .= '&search_fk_status=' . $search_fk_status;
|
$param .= '&search_fk_status=' . urlencode($search_fk_status);
|
||||||
}
|
}
|
||||||
if (isset($search_fk_status) && $search_fk_status == 'non_closed') {
|
if (isset($search_fk_status) && $search_fk_status == 'non_closed') {
|
||||||
$filter['t.fk_statut'] = array(0, 1, 3, 4, 5, 6);
|
$filter['t.fk_statut'] = array(0, 1, 3, 4, 5, 6);
|
||||||
@ -388,62 +388,7 @@ if ($action == "view_ticketlist")
|
|||||||
|
|
||||||
print '<table class="liste ' . ($moreforfilter ? "listwithfilterbefore" : "") . '">';
|
print '<table class="liste ' . ($moreforfilter ? "listwithfilterbefore" : "") . '">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
// Filter bar
|
||||||
if (!empty($arrayfields['t.datec']['checked'])) {
|
|
||||||
print_liste_field_titre($arrayfields['t.datec']['label'], $url_page_current, 't.datec', '', $param, '', $sortfield, $sortorder);
|
|
||||||
}
|
|
||||||
if (!empty($arrayfields['t.date_read']['checked'])) {
|
|
||||||
print_liste_field_titre($arrayfields['t.date_read']['label'], $url_page_current, 't.date_read', '', $param, '', $sortfield, $sortorder);
|
|
||||||
}
|
|
||||||
if (!empty($arrayfields['t.date_close']['checked'])) {
|
|
||||||
print_liste_field_titre($arrayfields['t.date_close']['label'], $url_page_current, 't.date_close', '', $param, '', $sortfield, $sortorder);
|
|
||||||
}
|
|
||||||
if (!empty($arrayfields['t.ref']['checked'])) {
|
|
||||||
print_liste_field_titre($arrayfields['t.ref']['label'], $url_page_current, 't.ref', '', $param, '', $sortfield, $sortorder);
|
|
||||||
}
|
|
||||||
if (!empty($arrayfields['t.subject']['checked'])) {
|
|
||||||
print_liste_field_titre($arrayfields['t.subject']['label']);
|
|
||||||
}
|
|
||||||
if (!empty($arrayfields['type.code']['checked'])) {
|
|
||||||
print_liste_field_titre($arrayfields['type.code']['label'], $url_page_current, 'type.code', '', $param, '', $sortfield, $sortorder);
|
|
||||||
}
|
|
||||||
if (!empty($arrayfields['category.code']['checked'])) {
|
|
||||||
print_liste_field_titre($arrayfields['category.code']['label'], $url_page_current, 'category.code', '', $param, '', $sortfield, $sortorder);
|
|
||||||
}
|
|
||||||
if (!empty($arrayfields['severity.code']['checked'])) {
|
|
||||||
print_liste_field_titre($arrayfields['severity.code']['label'], $url_page_current, 'severity.code', '', $param, '', $sortfield, $sortorder);
|
|
||||||
}
|
|
||||||
if (!empty($arrayfields['t.progress']['checked'])) {
|
|
||||||
print_liste_field_titre($arrayfields['t.progress']['label'], $url_page_current, 't.progress', '', $param, '', $sortfield, $sortorder);
|
|
||||||
}
|
|
||||||
if (!empty($arrayfields['t.fk_user_create']['checked'])) {
|
|
||||||
print_liste_field_titre($arrayfields['t.fk_user_create']['label'], $url_page_current, 't.fk_user_create', '', $param, '', $sortfield, $sortorder);
|
|
||||||
}
|
|
||||||
if (!empty($arrayfields['t.fk_user_assign']['checked'])) {
|
|
||||||
print_liste_field_titre($arrayfields['t.fk_user_assign']['label'], $url_page_current, 't.fk_user_assign', '', $param, '', $sortfield, $sortorder);
|
|
||||||
}
|
|
||||||
if (!empty($arrayfields['t.tms']['checked'])) {
|
|
||||||
print_liste_field_titre($arrayfields['t.tms']['label'], $url_page_current, 't.tms', '', $param, '', $sortfield, $sortorder);
|
|
||||||
}
|
|
||||||
// Extra fields
|
|
||||||
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
|
||||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
|
|
||||||
if (!empty($arrayfields["ef." . $key]['checked'])) {
|
|
||||||
$align = $extrafields->getAlignFlag($key);
|
|
||||||
print_liste_field_titre($extralabels[$key], $url_page_current, "ef." . $key, "", $param, ($align ? 'align="' . $align . '"' : ''), $sortfield, $sortorder);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!empty($arrayfields['t.fk_statut']['checked'])) {
|
|
||||||
print_liste_field_titre($arrayfields['t.fk_statut']['label'], $url_page_current, 't.fk_statut', '', $param, '', $sortfield, $sortorder);
|
|
||||||
}
|
|
||||||
print_liste_field_titre($selectedfields, $url_page_current, "", '', '', 'align="right"', $sortfield, $sortorder, 'maxwidthsearch ');
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Filter bar
|
|
||||||
*/
|
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|
||||||
if (!empty($arrayfields['t.datec']['checked'])) {
|
if (!empty($arrayfields['t.datec']['checked'])) {
|
||||||
@ -463,13 +408,13 @@ if ($action == "view_ticketlist")
|
|||||||
|
|
||||||
if (!empty($arrayfields['t.subject']['checked'])) {
|
if (!empty($arrayfields['t.subject']['checked'])) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input type="text" class="flat" name="search_subject" value="' . $search_subject . '" size="20">';
|
print '<input type="text" class="flat maxwidth100" name="search_subject" value="' . $search_subject . '">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($arrayfields['type.code']['checked'])) {
|
if (!empty($arrayfields['type.code']['checked'])) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
$formTicket->selectTypesTickets($search_type, 'search_type', '', 2, 1, 1);
|
$formTicket->selectTypesTickets($search_type, 'search_type', '', 2, 1, 1, 0, 'maxwidth150');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -524,6 +469,59 @@ if ($action == "view_ticketlist")
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
// Field title
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
if (!empty($arrayfields['t.datec']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['t.datec']['label'], $url_page_current, 't.datec', '', $param, '', $sortfield, $sortorder);
|
||||||
|
}
|
||||||
|
if (!empty($arrayfields['t.date_read']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['t.date_read']['label'], $url_page_current, 't.date_read', '', $param, '', $sortfield, $sortorder);
|
||||||
|
}
|
||||||
|
if (!empty($arrayfields['t.date_close']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['t.date_close']['label'], $url_page_current, 't.date_close', '', $param, '', $sortfield, $sortorder);
|
||||||
|
}
|
||||||
|
if (!empty($arrayfields['t.ref']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['t.ref']['label'], $url_page_current, 't.ref', '', $param, '', $sortfield, $sortorder);
|
||||||
|
}
|
||||||
|
if (!empty($arrayfields['t.subject']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['t.subject']['label']);
|
||||||
|
}
|
||||||
|
if (!empty($arrayfields['type.code']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['type.code']['label'], $url_page_current, 'type.code', '', $param, '', $sortfield, $sortorder);
|
||||||
|
}
|
||||||
|
if (!empty($arrayfields['category.code']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['category.code']['label'], $url_page_current, 'category.code', '', $param, '', $sortfield, $sortorder);
|
||||||
|
}
|
||||||
|
if (!empty($arrayfields['severity.code']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['severity.code']['label'], $url_page_current, 'severity.code', '', $param, '', $sortfield, $sortorder);
|
||||||
|
}
|
||||||
|
if (!empty($arrayfields['t.progress']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['t.progress']['label'], $url_page_current, 't.progress', '', $param, '', $sortfield, $sortorder);
|
||||||
|
}
|
||||||
|
if (!empty($arrayfields['t.fk_user_create']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['t.fk_user_create']['label'], $url_page_current, 't.fk_user_create', '', $param, '', $sortfield, $sortorder);
|
||||||
|
}
|
||||||
|
if (!empty($arrayfields['t.fk_user_assign']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['t.fk_user_assign']['label'], $url_page_current, 't.fk_user_assign', '', $param, '', $sortfield, $sortorder);
|
||||||
|
}
|
||||||
|
if (!empty($arrayfields['t.tms']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['t.tms']['label'], $url_page_current, 't.tms', '', $param, '', $sortfield, $sortorder);
|
||||||
|
}
|
||||||
|
// Extra fields
|
||||||
|
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||||
|
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
|
||||||
|
if (!empty($arrayfields["ef." . $key]['checked'])) {
|
||||||
|
$align = $extrafields->getAlignFlag($key);
|
||||||
|
print_liste_field_titre($extralabels[$key], $url_page_current, "ef." . $key, "", $param, ($align ? 'align="' . $align . '"' : ''), $sortfield, $sortorder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!empty($arrayfields['t.fk_statut']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['t.fk_statut']['label'], $url_page_current, 't.fk_statut', '', $param, '', $sortfield, $sortorder);
|
||||||
|
}
|
||||||
|
print_liste_field_titre($selectedfields, $url_page_current, "", '', '', 'align="right"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
while ($obj = $db->fetch_object($resql))
|
while ($obj = $db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
@ -551,7 +549,7 @@ if ($action == "view_ticketlist")
|
|||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
if (!empty($arrayfields['t.ref']['checked'])) {
|
if (!empty($arrayfields['t.ref']['checked'])) {
|
||||||
print '<td>';
|
print '<td class="nowraponall">';
|
||||||
print $obj->ref;
|
print $obj->ref;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -84,7 +84,6 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a
|
|||||||
array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("TicketTrackId")));
|
array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("TicketTrackId")));
|
||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strlen($email)) {
|
if (!strlen($email)) {
|
||||||
$error++;
|
$error++;
|
||||||
array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Email")));
|
array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Email")));
|
||||||
@ -154,6 +153,19 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! $error && $action == 'confirm_public_close' && $display_ticket)
|
||||||
|
{
|
||||||
|
if ($object->dao->close($user)) {
|
||||||
|
setEventMessages($langs->trans('TicketMarkedAsClosed'), null, 'mesgs');
|
||||||
|
|
||||||
|
$url = 'view.php?action=view_ticket&track_id=' . GETPOST('track_id', 'alpha');
|
||||||
|
header("Location: " . $url);
|
||||||
|
} else {
|
||||||
|
$action = '';
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (! $error && $action == "add_message" && $display_ticket)
|
if (! $error && $action == "add_message" && $display_ticket)
|
||||||
{
|
{
|
||||||
// TODO Add message...
|
// TODO Add message...
|
||||||
@ -290,8 +302,6 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a
|
|||||||
$fuser = new User($db);
|
$fuser = new User($db);
|
||||||
$fuser->fetch($object->dao->fk_user_assign);
|
$fuser->fetch($object->dao->fk_user_assign);
|
||||||
print $fuser->getFullName($langs, 1);
|
print $fuser->getFullName($langs, 1);
|
||||||
} else {
|
|
||||||
print $langs->trans('None');
|
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -336,12 +346,12 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a
|
|||||||
// List ticket
|
// List ticket
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="javascript:$(\'#form_view_ticket_list\').submit();">' . $langs->trans('ViewMyTicketList') . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="javascript:$(\'#form_view_ticket_list\').submit();">' . $langs->trans('ViewMyTicketList') . '</a></div>';
|
||||||
|
|
||||||
if ($object->dao->fk_statut < 8) {
|
if ($object->dao->fk_statut < Ticket::STATUS_CLOSED) {
|
||||||
// New message
|
// New message
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?action=presend&mode=init&track_id=' . $object->dao->track_id . '">' . $langs->trans('AddMessage') . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?action=presend&mode=init&track_id=' . $object->dao->track_id . '">' . $langs->trans('AddMessage') . '</a></div>';
|
||||||
|
|
||||||
// Close ticket
|
// Close ticket
|
||||||
if ($object->dao->fk_statut > 0 && $object->dao->fk_statut < 8) {
|
if ($object->dao->fk_statut >= Ticket::STATUS_NOT_READ && $object->dao->fk_statut < Ticket::STATUS_CLOSED) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?action=close&track_id=' . $object->dao->track_id . '">' . $langs->trans('CloseTicket') . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?action=close&track_id=' . $object->dao->track_id . '">' . $langs->trans('CloseTicket') . '</a></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -394,9 +394,6 @@ if ($action == "confirm_close" && GETPOST('confirm', 'alpha') == 'yes' && $user-
|
|||||||
$object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha'));
|
$object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha'));
|
||||||
|
|
||||||
if ($object->close($user)) {
|
if ($object->close($user)) {
|
||||||
// Log action in ticket logs table
|
|
||||||
$log_action = $langs->trans('TicketLogClosedBy', $user->getFullName($langs));
|
|
||||||
|
|
||||||
setEventMessages($langs->trans('TicketMarkedAsClosed'), null, 'mesgs');
|
setEventMessages($langs->trans('TicketMarkedAsClosed'), null, 'mesgs');
|
||||||
|
|
||||||
$url = 'card.php?action=view&track_id=' . GETPOST('track_id', 'alpha');
|
$url = 'card.php?action=view&track_id=' . GETPOST('track_id', 'alpha');
|
||||||
@ -409,13 +406,15 @@ if ($action == "confirm_close" && GETPOST('confirm', 'alpha') == 'yes' && $user-
|
|||||||
|
|
||||||
if ($action == "confirm_public_close" && GETPOST('confirm', 'alpha') == 'yes') {
|
if ($action == "confirm_public_close" && GETPOST('confirm', 'alpha') == 'yes') {
|
||||||
$object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha'));
|
$object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha'));
|
||||||
if (($_SESSION['email_customer'] == $object->origin_email || $_SESSION['email_customer'] == $object->thirdparty->email) && $object->close()) {
|
if ($_SESSION['email_customer'] == $object->origin_email || $_SESSION['email_customer'] == $object->thirdparty->email) {
|
||||||
|
$object->close($user);
|
||||||
|
|
||||||
// Log action in ticket logs table
|
// Log action in ticket logs table
|
||||||
$log_action = $langs->trans('TicketLogClosedBy', $_SESSION['email_customer']);
|
$log_action = $langs->trans('TicketLogClosedBy', $_SESSION['email_customer']);
|
||||||
|
|
||||||
setEventMessages('<div class="confirm">' . $langs->trans('TicketMarkedAsClosed') . '</div>', null, 'mesgs');
|
setEventMessages('<div class="confirm">' . $langs->trans('TicketMarkedAsClosed') . '</div>', null, 'mesgs');
|
||||||
|
|
||||||
$url = 'view.php?action=view_ticket&track_id=' . GETPOST('track_id', 'alpha');
|
$url = 'card.php?action=view_ticket&track_id=' . GETPOST('track_id', 'alpha');
|
||||||
header("Location: " . $url);
|
header("Location: " . $url);
|
||||||
} else {
|
} else {
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
|||||||
@ -183,7 +183,7 @@ class Ticket extends CommonObject
|
|||||||
'track_id' => array('type'=>'varchar(255)', 'label'=>'TicketTrackId', 'visible'=>-2, 'enabled'=>1, 'position'=>11, 'notnull'=>-1, 'searchall'=>1, 'help'=>"Help text"),
|
'track_id' => array('type'=>'varchar(255)', 'label'=>'TicketTrackId', 'visible'=>-2, 'enabled'=>1, 'position'=>11, 'notnull'=>-1, 'searchall'=>1, 'help'=>"Help text"),
|
||||||
'fk_user_create' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Author', 'visible'=>1, 'enabled'=>1, 'position'=>15, 'notnull'=>1, 'css'=>'nowraponall'),
|
'fk_user_create' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Author', 'visible'=>1, 'enabled'=>1, 'position'=>15, 'notnull'=>1, 'css'=>'nowraponall'),
|
||||||
'origin_email' => array('type'=>'mail', 'label'=>'OriginEmail', 'visible'=>-2, 'enabled'=>1, 'position'=>16, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object"),
|
'origin_email' => array('type'=>'mail', 'label'=>'OriginEmail', 'visible'=>-2, 'enabled'=>1, 'position'=>16, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object"),
|
||||||
'subject' => array('type'=>'varchar(255)', 'label'=>'Subject', 'visible'=>1, 'enabled'=>1, 'position'=>18, 'notnull'=>-1, 'searchall'=>1, 'help'=>""),
|
'subject' => array('type'=>'varchar(255)', 'label'=>'Subject', 'visible'=>1, 'enabled'=>1, 'position'=>18, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth75'),
|
||||||
'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth100'),
|
'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth100'),
|
||||||
'category_code' => array('type'=>'varchar(32)', 'label'=>'TicketGroup', 'visible'=>-1, 'enabled'=>1, 'position'=>21, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'),
|
'category_code' => array('type'=>'varchar(32)', 'label'=>'TicketGroup', 'visible'=>-1, 'enabled'=>1, 'position'=>21, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'),
|
||||||
'severity_code' => array('type'=>'varchar(32)', 'label'=>'Severity', 'visible'=>1, 'enabled'=>1, 'position'=>22, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'),
|
'severity_code' => array('type'=>'varchar(32)', 'label'=>'Severity', 'visible'=>1, 'enabled'=>1, 'position'=>22, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'),
|
||||||
|
|||||||
@ -499,10 +499,11 @@ print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"")
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
foreach($object->fields as $key => $val)
|
foreach($object->fields as $key => $val)
|
||||||
{
|
{
|
||||||
$cssforfield='';
|
$cssforfield=(empty($val['css'])?'':$val['css']);
|
||||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
if ($key == 'fk_statut') $cssforfield.=($cssforfield?' ':'').'center';
|
||||||
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
elseif (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
||||||
if ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
|
elseif (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||||
|
elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price'))) $cssforfield.=($cssforfield?' ':'').'right';
|
||||||
if (! empty($arrayfields['t.'.$key]['checked'])) {
|
if (! empty($arrayfields['t.'.$key]['checked'])) {
|
||||||
if ($key == 'type_code') {
|
if ($key == 'type_code') {
|
||||||
print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'">';
|
print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'">';
|
||||||
@ -562,10 +563,11 @@ print '</tr>'."\n";
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
foreach($object->fields as $key => $val)
|
foreach($object->fields as $key => $val)
|
||||||
{
|
{
|
||||||
$cssforfield='';
|
$cssforfield=(empty($val['css'])?'':$val['css']);
|
||||||
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
|
||||||
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
|
||||||
if ($key == 'fk_statut') $cssforfield.=($cssforfield?' ':'').'center';
|
if ($key == 'fk_statut') $cssforfield.=($cssforfield?' ':'').'center';
|
||||||
|
elseif (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
|
||||||
|
elseif (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
|
||||||
|
elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price'))) $cssforfield.=($cssforfield?' ':'').'right';
|
||||||
if (! empty($arrayfields['t.'.$key]['checked']))
|
if (! empty($arrayfields['t.'.$key]['checked']))
|
||||||
{
|
{
|
||||||
print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, '', $sortfield, $sortorder, ($cssforfield?$cssforfield.' ':''))."\n";
|
print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, '', $sortfield, $sortorder, ($cssforfield?$cssforfield.' ':''))."\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user