mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Debug v20 - fix cond to show dict, several fix in public ticket gui
This commit is contained in:
parent
d0216a4922
commit
75d1fbc49f
|
|
@ -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 '<input type="hidden" name="entity" value="'.$withentity.'">';
|
||||
}
|
||||
print '<input type="submit" class="button button-edit small" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-cancel small" name="actioncancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '<input type="submit" class="button button-edit smallpaddingimp" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-cancel smallpaddingimp" name="actioncancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td>';
|
||||
} 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));
|
||||
|
|
|
|||
|
|
@ -583,6 +583,7 @@ if (isModEnabled('product')) {
|
|||
$htmlname = "product_category_id";
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketChooseProductCategory").'</td>';
|
||||
print '<td class="left">';
|
||||
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 '</form>';
|
||||
|
||||
|
||||
/*
|
||||
* Notification
|
||||
*/
|
||||
|
||||
// Admin var of module
|
||||
print load_fiche_titre($langs->trans("Notification"), '', '');
|
||||
|
||||
|
|
|
|||
|
|
@ -243,8 +243,8 @@ class FormTicket
|
|||
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// Ref
|
||||
if ($this->withref) {
|
||||
// Ref
|
||||
$defaultref = $ticketstat->getDefaultRef();
|
||||
|
||||
if ($mode == 'edit') {
|
||||
|
|
@ -255,10 +255,10 @@ class FormTicket
|
|||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// TITLE
|
||||
// Title
|
||||
if ($this->withemail) {
|
||||
print '<tr><td class="titlefield"><label for="email"><span class="fieldrequired">'.$langs->trans("Email").'</span></label></td><td>';
|
||||
print '<input class="text minwidth200" id="email" name="email" value="'.$email.'" autofocus>';
|
||||
print '<input class="text minwidth200" id="email" name="email" value="'.$email.'" autofocus>'; // Do not use "required", it breaks button cancel
|
||||
print '</td></tr>';
|
||||
|
||||
if ($with_contact) {
|
||||
|
|
@ -382,21 +382,21 @@ class FormTicket
|
|||
|
||||
// Type of Ticket
|
||||
print '<tr><td class="titlefield"><span class="fieldrequired"><label for="selecttype_code">'.$langs->trans("TicketTypeRequest").'</span></label></td><td>';
|
||||
$this->selectTypesTickets($type_code, 'type_code', '', 2, 1, 0, 0, 'minwidth200');
|
||||
$this->selectTypesTickets($type_code, 'type_code', '', 2, 1, 0, 0, 'minwidth200 maxwidth500');
|
||||
print '</td></tr>';
|
||||
|
||||
// Group => Category
|
||||
print '<tr><td><span class="fieldrequired"><label for="selectcategory_code">'.$langs->trans("TicketCategory").'</span></label></td><td>';
|
||||
$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 '</td></tr>';
|
||||
|
||||
// Severity => Priority
|
||||
print '<tr><td><span class="fieldrequired"><label for="selectseverity_code">'.$langs->trans("TicketSeverity").'</span></label></td><td>';
|
||||
$this->selectSeveritiesTickets($severity_code, 'severity_code', '', 2, 1);
|
||||
$this->selectSeveritiesTickets($severity_code, 'severity_code', '', 2, 1, 0, 0, 'minwidth200 maxwidth500');
|
||||
print '</td></tr>';
|
||||
|
||||
if (isModEnabled('knowledgemanagement')) {
|
||||
|
|
@ -476,13 +476,13 @@ class FormTicket
|
|||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// MESSAGE
|
||||
// Message
|
||||
print '<tr><td><label for="message"><span class="fieldrequired">'.$langs->trans("Message").'</span></label></td><td>';
|
||||
|
||||
// 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 '<div class="warning hideonsmartphone">'.(getDolGlobalString("TICKET_PUBLIC_TEXT_HELP_MESSAGE", $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'))).'</div>';
|
||||
}
|
||||
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 '<tr><td class="wordbreak">'.$langs->trans("Categories").'</td><td>';
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
||||
print '<tr><td class="wordbreak"></td><td>';
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', $langs->transnoentitiesnoconv("Categories"));
|
||||
print "</td></tr>";
|
||||
}
|
||||
}
|
||||
|
|
@ -536,7 +536,7 @@ class FormTicket
|
|||
}
|
||||
|
||||
$out = '<tr>';
|
||||
$out .= '<td>'.$langs->trans("MailFile").'</td>';
|
||||
$out .= '<td></td>';
|
||||
$out .= '<td>';
|
||||
// TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript
|
||||
$out .= '<input type="hidden" class="removedfilehidden" name="removedfile" value="">'."\n";
|
||||
|
|
@ -556,8 +556,6 @@ class FormTicket
|
|||
}
|
||||
$out .= '<br></div>';
|
||||
}
|
||||
} else {
|
||||
$out .= '<span class="opacitymedium">'.$langs->trans("NoAttachedFiles").'</span><br>';
|
||||
}
|
||||
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 '<option value="'.$id.'"';
|
||||
}
|
||||
|
||||
var_dump($selected.' '.$id.' '.$arraycategories['use_default'].' '.$empty);
|
||||
// If selected is text, we compare with code, otherwise with id
|
||||
if (isset($selected) && preg_match('/[a-z]/i', $selected) && $selected == $arraycategories['code']) {
|
||||
print ' selected="selected"';
|
||||
} elseif (isset($selected) && $selected == $id) {
|
||||
print ' selected="selected"';
|
||||
} elseif ($arraycategories['use_default'] == "1" && !$selected && !$empty) {
|
||||
} elseif ($arraycategories['use_default'] == "1" && empty($selected)) {
|
||||
print ' selected="selected"';
|
||||
} elseif (count($ticketstat->cache_category_tickets) == 1) {
|
||||
} elseif (count($ticketstat->cache_category_tickets) == 1) { // If only 1 choice, we autoselect it
|
||||
print ' selected="selected"';
|
||||
}
|
||||
|
||||
|
|
@ -1001,7 +999,8 @@ class FormTicket
|
|||
$sql .= $this->db->ifsql("ctc.rowid NOT IN (SELECT ctcfather.rowid FROM ".MAIN_DB_PREFIX."c_ticket_category as ctcfather JOIN ".MAIN_DB_PREFIX."c_ticket_category as ctcjoin ON ctcfather.rowid = ctcjoin.fk_parent WHERE ctcjoin.active > 0)", "'NOTPARENT'", "'PARENT'")." as isparent";
|
||||
$sql .= " FROM ".$this->db->prefix()."c_ticket_category as ctc";
|
||||
$sql .= " WHERE ctc.active > 0 AND ctc.entity = ".((int) $conf->entity);
|
||||
if ($filtertype == 'public=1') {
|
||||
$public = ($filtertype == 'public=1' || $filtertype == '(public:=:1)');
|
||||
if ($public) {
|
||||
$sql .= " AND ctc.public = 1";
|
||||
}
|
||||
$sql .= " AND ctc.fk_parent = 0";
|
||||
|
|
@ -1063,7 +1062,8 @@ class FormTicket
|
|||
$sql .= " WHERE ctc.active > 0 AND ctc.entity = ".((int) $conf->entity);
|
||||
$sql .= " AND ctc.rowid NOT IN (".$this->db->sanitize(implode(',', $arrayidusedconcat)).")";
|
||||
|
||||
if ($filtertype == 'public=1') {
|
||||
$public = ($filtertype == 'public=1' || $filtertype == '(public:=:1)');
|
||||
if ($public) {
|
||||
$sql .= " AND ctc.public = 1";
|
||||
}
|
||||
// Add a test to take only record that are direct child
|
||||
|
|
@ -1271,7 +1271,7 @@ class FormTicket
|
|||
print ' selected="selected"';
|
||||
} elseif (isset($selected) && $selected == $id) {
|
||||
print ' selected="selected"';
|
||||
} elseif ($arrayseverities['use_default'] == "1" && !$selected && !$empty) {
|
||||
} elseif ($arrayseverities['use_default'] == "1" && empty($selected)) {
|
||||
print ' selected="selected"';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1343,7 +1343,7 @@ function unActivateModule($value, $requiredby = 1)
|
|||
*/
|
||||
function complete_dictionary_with_modules(&$taborder, &$tabname, &$tablib, &$tabsql, &$tabsqlsort, &$tabfield, &$tabfieldvalue, &$tabfieldinsert, &$tabrowid, &$tabcond, &$tabhelp, &$tabcomplete)
|
||||
{
|
||||
global $db, $modules, $conf, $langs;
|
||||
global $db, $langs;
|
||||
|
||||
dol_syslog("complete_dictionary_with_modules Search external modules to complete the list of dictionary tables", LOG_DEBUG, 1);
|
||||
|
||||
|
|
@ -1461,7 +1461,7 @@ function complete_dictionary_with_modules(&$taborder, &$tabname, &$tablib, &$tab
|
|||
$tmptablename = preg_replace('/'.MAIN_DB_PREFIX.'/', '', $tabnamerelwithkey[$key]);
|
||||
$nbtabcond++;
|
||||
$tabcond[] = $val;
|
||||
$tabcomplete[$tmptablename]['rowid'] = $val;
|
||||
$tabcomplete[$tmptablename]['cond'] = $val;
|
||||
}
|
||||
if (!empty($objMod->dictionaries['tabhelp'])) {
|
||||
foreach ($objMod->dictionaries['tabhelp'] as $key => $val) {
|
||||
|
|
|
|||
|
|
@ -2657,10 +2657,12 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||
$fields = array('name', 'lib', 'sql', 'sqlsort', 'field', 'fieldvalue', 'fieldinsert', 'rowid', 'cond', 'help', 'fieldcheck');
|
||||
|
||||
foreach ($fields as $field) {
|
||||
if (!empty($dictionaryArray[$field])) {
|
||||
if (isset($dictionaryArray[$field])) {
|
||||
$this->dictionaries['tab'.$field][] = $dictionaryArray[$field];
|
||||
}
|
||||
}
|
||||
if ($langs && !in_array($langs, $this->dictionaries[$langs])) $this->dictionaries['langs'][] = $langs;
|
||||
if ($langs && !in_array($langs, $this->dictionaries[$langs])) {
|
||||
$this->dictionaries['langs'][] = $langs;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ class modTicket extends DolibarrModules
|
|||
'fieldinsert' => 'code,label,pos,use_default,entity',
|
||||
'rowid' => 'rowid',
|
||||
'cond' => isModEnabled('ticket'),
|
||||
'help' => array('code' => $langs->trans('EnterAnyCode'), 'use_default' => $langs->trans('Enter0or1'))
|
||||
'help' => array('code' => $langs->trans('EnterAnyCode'), 'use_default' => $langs->trans('EnterYesOrNo'))
|
||||
)
|
||||
);
|
||||
|
||||
|
|
@ -165,7 +165,7 @@ class modTicket extends DolibarrModules
|
|||
'fieldinsert' => 'code,label,pos,use_default,entity',
|
||||
'rowid' => 'rowid',
|
||||
'cond' => isModEnabled('ticket'),
|
||||
'help' => array('code' => $langs->trans('EnterAnyCode'), 'use_default' => $langs->trans('Enter0or1'))
|
||||
'help' => array('code' => $langs->trans('EnterAnyCode'), 'use_default' => $langs->trans('EnterYesOrNo'))
|
||||
)
|
||||
);
|
||||
|
||||
|
|
@ -183,14 +183,14 @@ class modTicket extends DolibarrModules
|
|||
'cond' => isModEnabled('ticket'),
|
||||
'help' => array(
|
||||
'code' => $langs->trans('EnterAnyCode'),
|
||||
'use_default' => $langs->trans('Enter0or1'),
|
||||
'use_default' => $langs->trans('EnterYesOrNo'),
|
||||
'public' => $langs->trans('Enter0or1').'<br>'.$langs->trans('TicketGroupIsPublicDesc'),
|
||||
'fk_parent' => $langs->trans('IfThisCategoryIsChildOfAnother')
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// (apparently unused) Dictionary of ticket resolutions
|
||||
// Dictionary of ticket resolutions (apparently unused except if TICKET_ENABLE_RESOLUTION is on)
|
||||
$this->declareNewDictionary(
|
||||
array(
|
||||
'name' => 'c_ticket_resolution',
|
||||
|
|
|
|||
|
|
@ -2028,6 +2028,7 @@ MinimumNoticePeriod=Minimum notice period (Your leave request must be done befor
|
|||
NbAddedAutomatically=Number of days added to counters of users (automatically) each month
|
||||
EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters.
|
||||
Enter0or1=Enter 0 or 1
|
||||
EnterYesOrNo=Enter Yes or No
|
||||
UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364]
|
||||
ColorFormat=The RGB color is in HEX format, eg: FF0000
|
||||
PictoHelp=Icon name in format:<br>- image.png for an image file into the current theme directory<br>- image.png@module if file is into the directory /img/ of a module<br>- fa-xxx for a FontAwesome fa-xxx picto<br>- fontawesome_xxx_fa_color_size for a FontAwesome fa-xxx picto (with prefix, color and size set)
|
||||
|
|
|
|||
|
|
@ -2027,7 +2027,7 @@ BackgroundTableLineEvenColor=Couleur de fond pour les lignes paires des tables
|
|||
MinimumNoticePeriod=Période de préavis minimum (Votre demande de congé doit être faite avant ce délai)
|
||||
NbAddedAutomatically=Nombre de jours ajoutés aux compteurs des utilisateurs (automatiquement) chaque mois
|
||||
EnterAnyCode=Ce champ contient une référence pour identifier l'enregistrement. Entrez une valeur de votre choix, mais sans caractères spéciaux.
|
||||
Enter0or1=Saisir 0 ou 1
|
||||
Enter0or1=Saisir 0 ou 1
|
||||
UnicodeCurrency=Saisissez ici entre accolades, la liste du numéro des octets qui représentent le symbole de la monnaie. Pour exemple: pour $, entrez [36] - pour le Real Brésilien R$ [82,36] - pour l'euro €, entrez [8364]
|
||||
ColorFormat=La couleur RVB au format HEX est, par exemple: FF0000
|
||||
PictoHelp=Nom de l'icône au format : <br> - image.png pour un fichier image dans le répertoire du thème courant <br> - image.png@module si le fichier est dans le répertoire /img/ d'un module <br> - fa-xxx pour un picto FontAwesome fa-xxx <br> - fonwtawesome_xxx_fa_color_size pour un picto FontAwesome fa-xxx (avec préfixe, couleur et taille forcés)
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ if (empty($reshook)) {
|
|||
|
||||
if ($action == 'create_ticket' && GETPOST('save', 'alpha')) {
|
||||
$error = 0;
|
||||
$origin_email = GETPOST('email', 'alpha');
|
||||
$origin_email = GETPOST('email', 'email');
|
||||
if (empty($origin_email)) {
|
||||
$error++;
|
||||
array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Email")));
|
||||
|
|
@ -275,6 +275,7 @@ if (empty($reshook)) {
|
|||
$object->subject = GETPOST("subject", "alphanohtml");
|
||||
$object->message = GETPOST("message", "restricthtml");
|
||||
$object->origin_email = $origin_email;
|
||||
$object->email_from = $origin_email;
|
||||
|
||||
$object->type_code = GETPOST("type_code", 'aZ09');
|
||||
$object->category_code = GETPOST("category_code", 'aZ09');
|
||||
|
|
@ -541,7 +542,7 @@ if ($action != "infos_success") {
|
|||
print '</div>';
|
||||
} else {
|
||||
//print '<div class="info marginleftonly marginrightonly">'.$langs->trans('TicketPublicInfoCreateTicket').'</div>';
|
||||
$formticket->showForm(0, 'edit', 1, $with_contact, '', $object);
|
||||
$formticket->showForm(0, ($action ? $action : 'create'), 1, $with_contact, '', $object);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -419,7 +419,11 @@ if ($action == "view_ticketlist") {
|
|||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
print_barre_liste($langs->trans('TicketList'), $page, 'list.php', $param, $sortfield, $sortorder, '', $num, $num_total, 'ticket');
|
||||
$baseurl = getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', DOL_URL_ROOT.'/public/ticket/');
|
||||
|
||||
$newcardbutton = '<a class="marginrightonly" href="'.$baseurl . 'create_ticket.php?action=create'.(!empty($entity) && isModEnabled('multicompany')?'&entity='.$entity:'').'&token='.newToken().'" rel="nofollow noopener"><span class="fa fa-15 fa-plus-circle valignmiddle btnTitle-icon" title="'.dol_escape_htmltag($langs->trans("CreateTicket")).'"></span></a>';
|
||||
|
||||
print_barre_liste($langs->trans('TicketList'), $page, 'list.php', $param, $sortfield, $sortorder, '', $num, $num_total, 'ticket', 0, $newcardbutton);
|
||||
|
||||
// Search bar
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].(!empty($entity) && isModEnabled('multicompany') ? '?entity='.$entity : '').'" id="searchFormList" >'."\n";
|
||||
|
|
@ -472,13 +476,13 @@ if ($action == "view_ticketlist") {
|
|||
|
||||
if (!empty($arrayfields['category.code']['checked'])) {
|
||||
print '<td class="liste_titre">';
|
||||
$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 '</td>';
|
||||
}
|
||||
|
||||
if (!empty($arrayfields['severity.code']['checked'])) {
|
||||
print '<td class="liste_titre">';
|
||||
$formTicket->selectSeveritiesTickets($search_severity, 'search_severity', '', 2, 1, 1);
|
||||
$formTicket->selectSeveritiesTickets($search_severity, 'search_severity', '', 2, 1, 1, 0, 'maxwidth150');
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
|
|
@ -580,21 +584,21 @@ if ($action == "view_ticketlist") {
|
|||
// Date ticket
|
||||
if (!empty($arrayfields['t.datec']['checked'])) {
|
||||
print '<td>';
|
||||
print dol_print_date($db->jdate($obj->datec), 'dayhour');
|
||||
print dol_print_date($db->jdate($obj->datec), 'dayhour', 'tzuserrel');
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Date read
|
||||
if (!empty($arrayfields['t.date_read']['checked'])) {
|
||||
print '<td>';
|
||||
print dol_print_date($db->jdate($obj->date_read), 'dayhour');
|
||||
print dol_print_date($db->jdate($obj->date_read), 'dayhour', 'tzuserrel');
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Date close
|
||||
if (!empty($arrayfields['t.date_close']['checked'])) {
|
||||
print '<td>';
|
||||
print dol_print_date($db->jdate($obj->date_close), 'dayhour');
|
||||
print dol_print_date($db->jdate($obj->date_close), 'dayhour', 'tzuserrel');
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ class ActionsTicket extends CommonHookActions
|
|||
|| ($arraymsgs['private'] == "1" && $show_private)
|
||||
) {
|
||||
//print '<tr>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<tr class="oddeven nohover">';
|
||||
print '<td><strong>';
|
||||
print img_picto('', 'object_action', 'class="paddingright"').dol_print_date($arraymsgs['datep'], 'dayhour');
|
||||
print '<strong></td>';
|
||||
|
|
@ -316,13 +316,14 @@ class ActionsTicket extends CommonHookActions
|
|||
print $arraymsgs['fk_contact_author'];
|
||||
}
|
||||
} else {
|
||||
print $langs->trans('Customer');
|
||||
print '<span class="opacitymedium">'.$langs->trans('Unknown').'</span>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '</td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td colspan="2">';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="oddeven nohover">';
|
||||
print '<td'.($show_user ? ' colspan="2"' : '').'>';
|
||||
print $arraymsgs['message'];
|
||||
|
||||
//attachment
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user