diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index a88a6b7dda2..38f29df1b13 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -656,7 +656,7 @@ foreach ($tabcomplete as $key => $value) { continue; } $tabcomplete[$key]['id'] = $i; - // TODO Comment the line when data is stored into the tabcomplete array + // TODO Comment this lines when data is stored into the tabcomplete array $tabcomplete[$key]['cond'] = $tabcond[$i]; $tabcomplete[$key]['rowid'] = $tabrowid[$i]; $tabcomplete[$key]['fieldinsert'] = $tabfieldinsert[$i]; @@ -2243,8 +2243,8 @@ if ($id > 0) { if (!is_null($withentity)) { print ''; } - print ''; - print ''; + print ''; + print ''; print ''; } else { $tmpaction = 'view'; @@ -2297,8 +2297,10 @@ if ($id > 0) { } elseif ($value == 'price' || preg_match('/^amount/i', $value)) { $valuetoshow = price($valuetoshow); } - if ($value == 'private') { - $valuetoshow = yn($valuetoshow); + if (in_array($value, array('private', 'joinfile', 'use_default'))) { + if ($valuetoshow) { + $valuetoshow = yn($valuetoshow); + } } elseif ($value == 'libelle_facture') { $langs->load("bills"); $key = $langs->trans("PaymentCondition".strtoupper($obj->code)); diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php index 0ad9e90d92d..6ae7405ca87 100644 --- a/htdocs/admin/ticket.php +++ b/htdocs/admin/ticket.php @@ -583,6 +583,7 @@ if (isModEnabled('product')) { $htmlname = "product_category_id"; print ''.$langs->trans("TicketChooseProductCategory").''; print ''; + print img_picto('', 'category', 'class="pictofixedwidth"'); $formcategory->selectProductCategory(getDolGlobalString('TICKET_PRODUCT_CATEGORY'), $htmlname); if ($conf->use_javascript_ajax) { print ajax_combobox('select_'.$htmlname); @@ -635,9 +636,11 @@ print $formcategory->buttonsSaveCancel("Save", '', array(), 0, 'reposition'); print ''; + /* * Notification */ + // Admin var of module print load_fiche_titre($langs->trans("Notification"), '', ''); diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index f63160d787b..65a9326662c 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -243,8 +243,8 @@ class FormTicket print ''; + // Ref if ($this->withref) { - // Ref $defaultref = $ticketstat->getDefaultRef(); if ($mode == 'edit') { @@ -255,10 +255,10 @@ class FormTicket print ''; } - // TITLE + // Title if ($this->withemail) { print ''; if ($with_contact) { @@ -382,21 +382,21 @@ class FormTicket // Type of Ticket print ''; // Group => Category print ''; // Severity => Priority print ''; if (isModEnabled('knowledgemanagement')) { @@ -476,13 +476,13 @@ class FormTicket print ''; } - // MESSAGE + // Message print '"; } } @@ -536,7 +536,7 @@ class FormTicket } $out = ''; - $out .= ''; + $out .= ''; $out .= ''; } if (!empty($arrayfields['severity.code']['checked'])) { print ''; } @@ -580,21 +584,21 @@ if ($action == "view_ticketlist") { // Date ticket if (!empty($arrayfields['t.datec']['checked'])) { print ''; } // Date read if (!empty($arrayfields['t.date_read']['checked'])) { print ''; } // Date close if (!empty($arrayfields['t.date_close']['checked'])) { print ''; } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index d1cd6b69db0..8f99b911fba 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1695,7 +1695,11 @@ table.paymenttable td.amountpaymentcomplete, table.paymenttable td.amountremaint overflow-y: hidden; -ms-overflow-style: -ms-autohiding-scrollbar; }*/ + /* Style used for most tables */ +div.fiche>div.tabBar>form>div.div-table-responsive { + min-height: 392px; +} .div-table-responsive, .div-table-responsive-no-min { overflow-x: auto; min-height: 0.01%; @@ -1703,19 +1707,20 @@ table.paymenttable td.amountpaymentcomplete, table.paymenttable td.amountremaint .div-table-responsive { line-height: var(--heightrow); } + /* Style used for full page tables with field selector and no content after table (priority before previous for such tables) */ -div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min { - overflow-x: auto; -} div.fiche>form>div.div-table-responsive { min-height: 392px; } -div.fiche>div.tabBar>form>div.div-table-responsive { +div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min { + overflow-x: auto; +} + +/* Style used for table in public ticket */ +div.ticketpublicarealist>form>div.div-table-responsive { min-height: 392px; } -div.fiche { - /* text-align: justify; */ -} + .display-flex { display: flex; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 5fce9f186c4..b6bdcb9bdcd 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1858,6 +1858,7 @@ select.flat.selectlimit { overflow-y: hidden; -ms-overflow-style: -ms-autohiding-scrollbar; }*/ + /* Style used for most tables */ div.fiche>div.tabBar>form>div.div-table-responsive { min-height: 392px; @@ -1869,13 +1870,20 @@ div.fiche>div.tabBar>form>div.div-table-responsive { .div-table-responsive { line-height: var(--heightrow); } + /* Style used for full page tables with field selector and no content after table (priority before previous for such tables) */ -div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min { - overflow-x: auto; -} div.fiche>form>div.div-table-responsive { min-height: 392px; } +div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min { + overflow-x: auto; +} + +/* Style used for table in public ticket */ +div.ticketpublicarealist>form>div.div-table-responsive { + min-height: 392px; +} + .display-flex { display: flex; diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index 7bb1dbc713a..dda526d3cf4 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -295,7 +295,7 @@ class ActionsTicket extends CommonHookActions || ($arraymsgs['private'] == "1" && $show_private) ) { //print ''; - print ''; + print ''; print ''; @@ -316,13 +316,14 @@ class ActionsTicket extends CommonHookActions print $arraymsgs['fk_contact_author']; } } else { - print $langs->trans('Customer'); + print ''.$langs->trans('Unknown').''; } print ''; } - print ''; - print ''; - print ''; + + print ''; + print ''; print $arraymsgs['message']; //attachment diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 82b2ade4504..60443e28eec 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1956,7 +1956,7 @@ class Ticket extends CommonObject $obj = $this->db->fetch_object($resql); $this->cache_msgs_ticket[$i]['id'] = $obj->rowid; $this->cache_msgs_ticket[$i]['fk_user_author'] = $obj->fk_user_author; - if ($obj->code == 'TICKET_MSG' && empty($obj->fk_user_author)) { + if (in_array($obj->code, array('TICKET_MSG', 'AC_TICKET_CREATE')) && empty($obj->fk_user_author)) { $this->cache_msgs_ticket[$i]['fk_contact_author'] = $obj->email_from; } $this->cache_msgs_ticket[$i]['datec'] = $this->db->jdate($obj->datec);
'; - print ''; + print ''; // Do not use "required", it breaks button cancel print '
'; - $this->selectTypesTickets($type_code, 'type_code', '', 2, 1, 0, 0, 'minwidth200'); + $this->selectTypesTickets($type_code, 'type_code', '', 2, 1, 0, 0, 'minwidth200 maxwidth500'); print '
'; $filter = ''; if ($public) { - $filter = 'public=1'; + $filter = '(public:=:1)'; } - $this->selectGroupTickets($category_code, 'category_code', $filter, 2, 1, 0, 0, 'minwidth200'); + $this->selectGroupTickets($category_code, 'category_code', $filter, 2, 1, 0, 0, 'minwidth200 maxwidth500'); print '
'; - $this->selectSeveritiesTickets($severity_code, 'severity_code', '', 2, 1); + $this->selectSeveritiesTickets($severity_code, 'severity_code', '', 2, 1, 0, 0, 'minwidth200 maxwidth500'); print '
'; // If public form, display more information $toolbarname = 'dolibarr_notes'; if ($this->ispublic) { - $toolbarname = 'dolibarr_details'; + $toolbarname = 'dolibarr_details'; // TODO Allow image so use can do paste of image into content but disallow file manager print '
'.(getDolGlobalString("TICKET_PUBLIC_TEXT_HELP_MESSAGE", $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'))).'
'; } include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -505,14 +505,14 @@ class FormTicket } // Categories - if (isModEnabled('category')) { + if (isModEnabled('category') && !$public) { include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $cate_arbo = $form->select_all_categories(Categorie::TYPE_TICKET, '', 'parent', 64, 0, 3); if (count($cate_arbo)) { // Categories - print '
'.$langs->trans("Categories").''; - print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); + print '
'; + print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', $langs->transnoentitiesnoconv("Categories")); print "
'.$langs->trans("MailFile").''; // TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript $out .= ''."\n"; @@ -556,8 +556,6 @@ class FormTicket } $out .= '
'; } - } else { - $out .= ''.$langs->trans("NoAttachedFiles").'
'; } if ($this->withfile == 2) { // Can add other files $maxfilesizearray = getMaxFileSizeArray(); @@ -821,7 +819,7 @@ class FormTicket print ' selected="selected"'; } elseif (in_array($id, $selected)) { print ' selected="selected"'; - } elseif ($arraytypes['use_default'] == "1" && !$selected && !$empty) { + } elseif ($arraytypes['use_default'] == "1" && empty($selected)) { print ' selected="selected"'; } @@ -857,7 +855,7 @@ class FormTicket * @param string $htmlname Name of select component * @param string $filtertype To filter on some properties in llx_c_ticket_category ('public = 1'). This parameter must not come from input of users. * @param int $format 0 = id+label, 1 = code+code, 2 = code+label, 3 = id+code - * @param int $empty 1 = can be empty, 0 = or not + * @param int $empty 1 = can be empty, 0 = or can't be empty * @param int $noadmininfo 0 = ddd admin info, 1 = disable admin info * @param int $maxlength Max length of label * @param string $morecss More CSS @@ -923,15 +921,15 @@ class FormTicket if ($format == 3) { print '
'; - $formTicket->selectGroupTickets($search_category, 'search_category', 'public=1', 2, 1, 1); + $formTicket->selectGroupTickets($search_category, 'search_category', '(public:=:1)', 2, 1, 1, 0, 'maxwidth150'); print ''; - $formTicket->selectSeveritiesTickets($search_severity, 'search_severity', '', 2, 1, 1); + $formTicket->selectSeveritiesTickets($search_severity, 'search_severity', '', 2, 1, 1, 0, 'maxwidth150'); print ''; - print dol_print_date($db->jdate($obj->datec), 'dayhour'); + print dol_print_date($db->jdate($obj->datec), 'dayhour', 'tzuserrel'); print ''; - print dol_print_date($db->jdate($obj->date_read), 'dayhour'); + print dol_print_date($db->jdate($obj->date_read), 'dayhour', 'tzuserrel'); print ''; - print dol_print_date($db->jdate($obj->date_close), 'dayhour'); + print dol_print_date($db->jdate($obj->date_close), 'dayhour', 'tzuserrel'); print '
'; print img_picto('', 'object_action', 'class="paddingright"').dol_print_date($arraymsgs['datep'], 'dayhour'); print '
'; + print '