diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index 67d7e5d860e..2e46262398f 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -339,7 +339,7 @@ if (! empty($arrayfields['t.libelle']['checked'])) if (! empty($arrayfields['d.bank']['checked'])) { print ''; - print $form->select_comptes($search_account, 'search_account', 0, '', 1); + $form->select_comptes($search_account, 'search_account', 0, '', 1); print ''; } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 0f8a7c7d17b..503a3995b93 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4039,7 +4039,7 @@ abstract class CommonObject $i++; } - print "\n"; + print "\n"; } /** diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 58c26f330e6..735922837da 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -260,7 +260,7 @@ if (!empty($extrafieldsline)) ?> service->enabled) && $line->product_type == 1 && $dateSelector) { ?> -> + global->MAIN_VIEW_LINE_NUMBER)) { ?> diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 1d41d1c9f33..4a8836b34f7 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -1275,23 +1275,23 @@ class EmailCollector extends CommonObject // Make Operation dol_syslog("Execute action ".$operation['type']." actionparam=".$operation['actionparam'].' thirdpartystatic->id='.$thirdpartystatic->id.' contactstatic->id='.$contactstatic->id.' projectstatic->id='.$projectstatic->id); - $description = $descriptionfull = ''; + $actioncode = 'EMAIL_IN'; + // If we scan the Sent box, we use the code for out email + if ($this->source_directory == 'Sent') $actioncode = 'EMAIL_OUT'; + + $description = $descriptiontitle = $descriptionmeta = $descriptionfull = ''; if (in_array($operation['type'], array('recordevent', 'project', 'ticket'))) { - $description = $langs->trans("ProjectCreatedByEmailCollector", $msgid); - $description = dol_concatdesc($description, "-----"); - $description = dol_concatdesc($description, $langs->trans("Topic").' : '.$subject); - $description = dol_concatdesc($description, $langs->trans("From").' : '.$fromstring); - if ($sender) $description = dol_concatdesc($description, $langs->trans("Sender").' : '.$sender); - $description = dol_concatdesc($description, $langs->trans("To").' : '.$to); - //if ($cc) $description = dol_concatdesc($description, $langs->trans("Cc").' : '.$cc); - //if ($bcc) $description = dol_concatdesc($description, $langs->trans("Bcc").' : '.$bcc); - $description = dol_concatdesc($description, "-----"); - $description = dol_concatdesc($description, $messagetext); + if ($operation['type'] == 'project') $descriptiontitle = $langs->trans("ProjectCreatedByEmailCollector", $msgid); + elseif ($operation['type'] == 'ticket') $descriptiontitle = $langs->trans("TicketCreatedByEmailCollector", $msgid); + else $descriptiontitle = $langs->trans("ActionAC_".$actioncode).' - '.$langs->trans("MailFrom").' '.$from; - $descriptionfull = $description; - $descriptionfull = dol_concatdesc($descriptionfull, "----- Header"); - $descriptionfull = dol_concatdesc($descriptionfull, $header); + $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("Topic").' : '.$subject); + $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("From").' : '.$fromstring); + if ($sender) $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("Sender").' : '.$sender); + $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("To").' : '.$to); + //if ($cc) $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("Cc").' : '.$cc); + //if ($bcc) $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("Bcc").' : '.$bcc); } // Search and create thirdparty @@ -1327,26 +1327,42 @@ class EmailCollector extends CommonObject { if (strtolower($sourcefield) == 'body') $sourcestring=$messagetext; elseif (strtolower($sourcefield) == 'subject') $sourcestring=$subject; + elseif (strtolower($sourcefield) == 'header') $sourcestring=$header; - $regforval=array(); - if (preg_match('/'.$regexstring.'/', $sourcestring, $regforval)) // Do not use preg_quote here, string is already a regex syntax, for example string is 'Name:\s([^\s]*)' + if ($sourcestring) { - // Overwrite param $tmpproperty - $nametouseforthirdparty = $regforval[1]; + $regforval=array(); + //var_dump($regexstring);var_dump($sourcestring); + if (preg_match('/'.$regexstring.'/ms', $sourcestring, $regforval)) + { + //var_dump($regforval[1]);exit; + // Overwrite param $tmpproperty + $nametouseforthirdparty = isset($regforval[1])?trim($regforval[1]):null; + } + else + { + // Regex not found + $nametouseforthirdparty = null; + } + //var_dump($object->$tmpproperty);exit; } else { // Nothing can be done for this param + $errorforthisaction++; + $this->errors = 'The extract rule to use to load thirdparty has on an unknown source (must be HEADER, SUBJECT or BODY)'; + $this->errors[] = $this->error; } - //var_dump($sourcestring); var_dump($regexstring);var_dump($nametouseforthirdparty);exit; } elseif (preg_match('/^SET:(.*)$/', $valueforproperty, $reg)) { + //if (preg_match('/^options_/', $tmpproperty)) $object->array_options[preg_replace('/^options_/', '', $tmpproperty)] = $reg[1]; + //else $object->$tmpproperty = $reg[1]; $nametouseforthirdparty = $reg[1]; } else { - $errorforactions++; + $errorforthisaction++; $this->error = 'Bad syntax for description of action parameters: '.$actionparam; $this->errors[] = $this->error; break; @@ -1403,25 +1419,29 @@ class EmailCollector extends CommonObject // Create event elseif ($operation['type'] == 'recordevent') { - $actioncode = 'EMAIL_IN'; - // If we scan the Sent box, we use the code for out email - if ($this->source_directory == 'Sent') { - $actioncode = 'EMAIL_OUT'; - } - if ($projectstatic->id > 0) { - if ($projectfoundby) $messagetext .= ' - Project found from '.$projectfoundby; + if ($projectfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Project found from '.$projectfoundby); } if ($thirdpartystatic->id > 0) { - if ($thirdpartyfoundby) $messagetext .= ' - Third party found from '.$thirdpartyfoundby; + if ($thirdpartyfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Third party found from '.$thirdpartyfoundby); } if ($contactstatic->id > 0) { - if ($contactfoundby) $messagetext .= ' - Contact/address found from '.$contactfoundby; + if ($contactfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Contact/address found from '.$contactfoundby); } + $description = $descriptiontitle; + $description = dol_concatdesc($description, "-----"); + $description = dol_concatdesc($description, $descriptionmeta); + $description = dol_concatdesc($description, "-----"); + $description = dol_concatdesc($description, $messagetext); + + $descriptionfull = $description; + $descriptionfull = dol_concatdesc($descriptionfull, "----- Header"); + $descriptionfull = dol_concatdesc($descriptionfull, $header); + // Insert record of emails sent $actioncomm = new ActionComm($this->db); @@ -1479,14 +1499,24 @@ class EmailCollector extends CommonObject if ($thirdpartystatic->id > 0) { $projecttocreate->socid = $thirdpartystatic->id; - if ($thirdpartyfoundby) $messagetext .= dol_concatdesc($messagetext, 'Third party found from '.$thirdpartyfoundby); + if ($thirdpartyfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Third party found from '.$thirdpartyfoundby); } if ($contactstatic->id > 0) { $projecttocreate->contact_id = $contactstatic->id; - if ($contactfoundby) $messagetext .= dol_concatdesc($messagetext, 'Contact/address found from '.$contactfoundby); + if ($contactfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Contact/address found from '.$contactfoundby); } + $description = $descriptiontitle; + $description = dol_concatdesc($description, "-----"); + $description = dol_concatdesc($description, $descriptionmeta); + $description = dol_concatdesc($description, "-----"); + $description = dol_concatdesc($description, $messagetext); + + $descriptionfull = $description; + $descriptionfull = dol_concatdesc($descriptionfull, "----- Header"); + $descriptionfull = dol_concatdesc($descriptionfull, $header); + $id_opp_status = dol_getIdFromCode($this->db, 'PROSP', 'c_lead_status', 'code', 'rowid'); $percent_opp_status = dol_getIdFromCode($this->db, 'PROSP', 'c_lead_status', 'code', 'percent'); @@ -1495,7 +1525,7 @@ class EmailCollector extends CommonObject $projecttocreate->date_end = ''; $projecttocreate->opp_status = $id_opp_status; $projecttocreate->opp_percent = $percent_opp_status; - $projecttocreate->description = dol_concatdesc(dolGetFirstLineOfText(dol_string_nohtmltag($description, 2), 8), '...'.$langs->transnoentities("SeePrivateNote").'...'); + $projecttocreate->description = dol_concatdesc(dolGetFirstLineOfText(dol_string_nohtmltag($description, 2), 10), '...'.$langs->transnoentities("SeePrivateNote").'...'); $projecttocreate->note_private = dol_concatdesc($descriptionfull, dol_string_nohtmltag($descriptionfull, 2)); $projecttocreate->entity = $conf->entity; @@ -1557,19 +1587,28 @@ class EmailCollector extends CommonObject // Create event elseif ($operation['type'] == 'ticket') { - $note_private = $langs->trans("TicketCreatedByEmailCollector", $msgid); $tickettocreate = new Ticket($this->db); if ($thirdpartystatic->id > 0) { $tickettocreate->socid = $thirdpartystatic->id; - if ($thirdpartyfoundby) $note_private .= ' - Third party found from '.$thirdpartyfoundby; + if ($thirdpartyfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Third party found from '.$thirdpartyfoundby); } if ($contactstatic->id > 0) { $tickettocreate->contact_id = $contactstatic->id; - if ($contactfoundby) $note_private .= ' - Contact/address found from '.$contactfoundby; + if ($contactfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Contact/address found from '.$contactfoundby); } + $description = $descriptiontitle; + $description = dol_concatdesc($description, "-----"); + $description = dol_concatdesc($description, $descriptionmeta); + $description = dol_concatdesc($description, "-----"); + $description = dol_concatdesc($description, $messagetext); + + $descriptionfull = $description; + $descriptionfull = dol_concatdesc($descriptionfull, "----- Header"); + $descriptionfull = dol_concatdesc($descriptionfull, $header); + $tickettocreate->title = $subject; $tickettocreate->type_code = 0; $tickettocreate->category_code = 0; @@ -1623,7 +1662,7 @@ class EmailCollector extends CommonObject if (is_numeric($tickettocreate->ref) && $tickettocreate->ref <= 0) { $errorforactions++; - $this->error = 'Failed to create ticket: Can\'t get a valid value for ticket Ref'; + $this->error = "Failed to create ticket: Can't get a valid value for ticket Ref. Check the numbering module used to generate the reference in setup of module Ticket."; } else { diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index a4389339e46..0e15403e9cf 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -87,13 +87,14 @@ $morehtml.=''; if ($mine) print $langs->trans("MyProjectsDesc").'

'; else { if (! empty($user->rights->projet->all->lire) && ! $socid) print $langs->trans("ProjectsDesc").'

'; else print $langs->trans("ProjectsPublicDesc").'

'; } - +print ''; // Get list of ponderated percent for each status $listofoppstatus=array(); $listofopplabel=array(); $listofoppcode=array(); diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index c727913dc24..1a7fb9317e1 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -254,7 +254,6 @@ $formother = new FormOther($db); $formproject = new FormProjets($db); $title=$langs->trans("Projects"); -//if ($search_project_user == $user->id) $title=$langs->trans("MyProjects"); // Get list of project id allowed to user (in a string list separated by coma) @@ -467,17 +466,17 @@ print ''; print ''; print ''; -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_project', 0, $newcardbutton, '', $limit); - // Show description of content -print '
'; -if ($search_project_user == $user->id) print $langs->trans("MyProjectsDesc").'

'; +$texthelp=''; +if ($search_project_user == $user->id) $texthelp.=$langs->trans("MyProjectsDesc"); else { - if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("ProjectsDesc").'

'; - else print $langs->trans("ProjectsPublicDesc").'

'; + if ($user->rights->projet->all->lire && ! $socid) $texthelp.=$langs->trans("ProjectsDesc"); + else $texthelp.=$langs->trans("ProjectsPublicDesc"); } -print '
'; + +print_barre_liste($form->textwithpicto($title, $texthelp), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_project', 0, $newcardbutton, '', $limit); + $topicmail="Information"; $modelmail="project"; diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index baf756628a6..1279a5191fd 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -441,17 +441,16 @@ print ''; print ''; print ''; -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_project', 0, $newcardbutton, '', $limit); - // Show description of content -print '
'; -if ($search_task_user == $user->id) print $langs->trans("MyTasksDesc").'

'; +$texthelp=''; +if ($search_task_user == $user->id) $texthelp.=$langs->trans("MyTasksDesc"); else { - if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("TasksOnProjectsDesc").'

'; - else print $langs->trans("TasksOnProjectsPublicDesc").'

'; + if ($user->rights->projet->all->lire && ! $socid) $texthelp.=$langs->trans("TasksOnProjectsDesc"); + else $texthelp.=$langs->trans("TasksOnProjectsPublicDesc"); } -print '
'; + +print_barre_liste($form->textwithpicto($title, $texthelp), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_project', 0, $newcardbutton, '', $limit); $topicmail="Information"; $modelmail="task"; @@ -506,7 +505,7 @@ if (! empty($moreforfilter)) if ($massactionbutton) $selectedfields.=$form->showCheckAddButtons('checkforselect', 1); print '
'; -print ''."\n"; +print '
'."\n"; print ''; if (! empty($arrayfields['t.ref']['checked'])) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 41afdc87d56..14753f21a3a 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2590,12 +2590,17 @@ table.liste, table.noborder, table.formdoc, div.noborder { margin: 0px 0px 5px 0px; } -table.liste tr:last-of-type td, table.noborder tr:last-of-type td, table.formdoc tr:last-of-type td, div.noborder tr:last-of-type td { +#tablelines { border-bottom-width: 1px; border-bottom-color: rgb(); border-bottom-style: solid; } -div.tabBar div.ficheaddleft table.noborder:last-of-type { +table.liste tr:last-of-type td, table.noborder:not(#tablelines) tr:last-of-type td, table.formdoc tr:last-of-type td, div.noborder tr:last-of-type td { + border-bottom-width: 1px; + border-bottom-color: rgb(); + border-bottom-style: solid; +} +div.tabBar div.ficheaddleft table.noborder:not(.margintable):not(.paymenttable):last-of-type { border-bottom: 1px solid rgb(); } div.tabBar table.border>tbody>tr:last-of-type>td { @@ -2621,6 +2626,7 @@ tr.liste_titre_filter td.liste_titre { } .liste_titre_create td, .liste_titre_create th, .liste_titre_create .tagtd { + border-bottom-width: 0 !important; border-top-width: 1px; border-top-color: rgb(); border-top-style: solid; @@ -2851,8 +2857,13 @@ div.pagination li.paginationafterarrows { { background: rgb() !important; /* Must be background to be stronger than background of odd or even */ } -.tredited { +.tredited, .tredited td { background: rgb() !important; /* Must be background to be stronger than background of odd or even */ + border-bottom: 0 !important; +} +.treditedlinefordate { + background: rgb() !important; /* Must be background to be stronger than background of odd or even */ + border-bottom: 0px; } .highlight { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index dde278f86a3..68c83f968c5 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -3185,8 +3185,7 @@ input.liste_titre { .noborder tr.liste_total td, tr.liste_total td, form.liste_total div, .noborder tr.liste_total_wrap td, tr.liste_total_wrap td, form.liste_total_wrap div { color: #332266; - font-weight: normal; - padding: 4px; + /* padding: 4px; */ } .noborder tr.liste_total td, tr.liste_total td, form.liste_total div { white-space: nowrap;