From 6cccd77508d2c41c5860bfa9098a1e7bd4b090da Mon Sep 17 00:00:00 2001 From: Florian Mortgat Date: Tue, 18 May 2021 17:57:23 +0200 Subject: [PATCH 01/53] FIX 13.0 - error message says MAIN_DISABLE_ALL_MAILS is set when it isn't + unhandled swiftmailer error (failed recipients due to RFC 2822 non-compliance) --- htdocs/core/actions_massactions.inc.php | 4 +++- htdocs/core/class/CMailFile.class.php | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 6b6d5854a1d..99f1271ff0b 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -559,8 +559,10 @@ if (!$error && $massaction == 'confirm_presend') { $resaction .= $langs->trans('ErrorFailedToSendMail', $from, $sendto); $resaction .= '
'.$mailfile->error.'
'; - } else { + } elseif (!empty($conf->global->MAIN_DISABLE_ALL_MAILS)) { $resaction .= '
No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS
'; + } else { + $resaction .= $langs->trans('ErrorFailedToSendMail', $from, $sendto) . '
(unhandled error)
'; } } } diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index c942127aab3..67c3387fbc8 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -894,7 +894,7 @@ class CMailFile } // send mail try { - $result = $this->mailer->send($this->message); + $result = $this->mailer->send($this->message, $failedRecipients); } catch (Exception $e) { $this->error = $e->getMessage(); } @@ -902,6 +902,9 @@ class CMailFile $res = true; if (!empty($this->error) || !$result) { + if (!empty($failedRecipients)) { + $this->error = 'Transport failed for the following addresses: "' . join('", "', $failedRecipients) . '".'; + } dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR); $res = false; } else { From 8e39eff180a2472a15d146bc5c0aab7eaf9afa11 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 May 2021 18:18:00 +0200 Subject: [PATCH 02/53] Look and feel v14 --- htdocs/comm/propal/list.php | 22 ++++++++-------- htdocs/commande/list.php | 8 +++--- htdocs/compta/facture/class/facture.class.php | 4 +-- htdocs/compta/facture/list.php | 4 +-- htdocs/contrat/list.php | 4 +-- htdocs/user/class/user.class.php | 26 ++++++++++++++----- 6 files changed, 41 insertions(+), 27 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index b810ab242b6..48ad9783367 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -176,8 +176,8 @@ $arrayfields = array( 'pr.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1)), 'pr.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1)), 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1), - 's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>1), - 's.town'=>array('label'=>"Town", 'checked'=>1), + 's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>-1), + 's.town'=>array('label'=>"Town", 'checked'=>-1), 's.zip'=>array('label'=>"Zip", 'checked'=>1), 'state.nom'=>array('label'=>"StateShort", 'checked'=>0), 'country.code_iso'=>array('label'=>"Country", 'checked'=>0), @@ -203,7 +203,7 @@ $arrayfields = array( 'p.multicurrency_total_ht_invoiced'=>array('label'=>'MulticurrencyAmountInvoicedHT', 'checked'=>0, 'enabled'=>!empty($conf->multicurrency->enabled) && !empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), 'p.multicurrency_total_invoiced'=>array('label'=>'MulticurrencyAmountInvoicedTTC', 'checked'=>0, 'enabled'=>!empty($conf->multicurrency->enabled) && !empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), 'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>10), - 'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>1), + 'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>-1), 'p.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), 'p.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), 'p.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>500), @@ -560,7 +560,7 @@ if ($search_societe_alias) { $sql .= natural_search('s.name_alias', $search_societe_alias); } if ($search_login) { - $sql .= natural_search("u.login", $search_login); + $sql .= natural_search(array("u.login", "u.firstname", "u.lastname"), $search_login); } if ($search_montant_ht != '') { $sql .= natural_search("p.total_ht", $search_montant_ht, 1); @@ -616,7 +616,7 @@ if ($search_product_category > 0) { $sql .= " AND cp.fk_categorie = ".$db->escape($search_product_category); } if ($socid > 0) { - $sql .= ' AND s.rowid = '.$socid; + $sql .= ' AND s.rowid = '.((int) $socid); } if ($search_status != '' && $search_status != '-1') { $sql .= ' AND p.fk_statut IN ('.$db->sanitize($search_status).')'; @@ -640,10 +640,10 @@ if ($search_datedelivery_end) { $sql .= " AND p.date_livraison <= '".$db->idate($search_datedelivery_end)."'"; } if ($search_sale > 0) { - $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$db->escape($search_sale); + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $search_sale); } if ($search_user > 0) { - $sql .= " AND c.fk_c_type_contact = tc.rowid AND tc.element='propal' AND tc.source='internal' AND c.element_id = p.rowid AND c.fk_socpeople = ".$db->escape($search_user); + $sql .= " AND c.fk_c_type_contact = tc.rowid AND tc.element='propal' AND tc.source='internal' AND c.element_id = p.rowid AND c.fk_socpeople = ".((int) $search_user); } // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -907,14 +907,14 @@ if ($resql) { $moreforfilter .= '
'; $tmptitle = $langs->trans('IncludingProductWithTag'); $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); - $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, (empty($conf->dol_optimize_smallscreen) ? 'maxwidth300' : 'maxwidth250'), 1); $moreforfilter .= '
'; } if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
'; $tmptitle = $langs->trans('CustomersProspectsCategoriesShort'); - $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $tmptitle); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $tmptitle, (empty($conf->dol_optimize_smallscreen) ? 'maxwidth300' : 'maxwidth250')); $moreforfilter .= '
'; } if (!empty($conf->stock->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL)) { @@ -1715,7 +1715,7 @@ if ($resql) { // Author if (!empty($arrayfields['u.login']['checked'])) { - print ''; + print ''; if ($userstatic->id) { print $userstatic->getNomUrl(-1); } @@ -1727,7 +1727,7 @@ if ($resql) { if (!empty($arrayfields['sale_representative']['checked'])) { // Sales representatives - print ''; + print ''; if ($obj->socid > 0) { $listsalesrepresentatives = $companystatic->getSalesRepresentatives($user); if ($listsalesrepresentatives < 0) { diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 3485011c1e6..f42b7c08de9 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -588,7 +588,7 @@ if ($search_multicurrency_montant_ttc != '') { $sql .= natural_search('c.multicurrency_total_ttc', $search_multicurrency_montant_ttc, 1); } if ($search_login) { - $sql .= natural_search("u.login", $search_login); + $sql .= natural_search(array("u.login", "u.firstname", "u.lastname"), $search_login); } if ($search_project_ref != '') { $sql .= natural_search("p.ref", $search_project_ref); @@ -1490,7 +1490,7 @@ if ($resql) { $totalarray['nbfield']++; } } - // Town + // Alias name if (!empty($arrayfields['s.name_alias']['checked'])) { print ''; print $obj->alias; @@ -1565,7 +1565,7 @@ if ($resql) { $totalarray['nbfield']++; } } - //Shipping Method + // Shipping Method if (!empty($arrayfields['c.fk_shipping_method']['checked'])) { print ''; $form->formSelectShippingMethod('', $obj->fk_shipping_method, 'none', 1); @@ -1690,7 +1690,7 @@ if ($resql) { // Author if (!empty($arrayfields['u.login']['checked'])) { - print ''; + print ''; if ($userstatic->id) { print $userstatic->getNomUrl(-1); } else { diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 549862c53cc..bb25da4e604 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -301,7 +301,7 @@ class Facture extends CommonInvoice 'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>50), 'datef' =>array('type'=>'date', 'label'=>'DateInvoice', 'enabled'=>1, 'visible'=>1, 'position'=>20), 'date_valid' =>array('type'=>'date', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>22), - 'date_lim_reglement' =>array('type'=>'date', 'label'=>'DateDue', 'enabled'=>1, 'visible'=>-1, 'position'=>25), + 'date_lim_reglement' =>array('type'=>'date', 'label'=>'DateDue', 'enabled'=>1, 'visible'=>1, 'position'=>25), 'date_closing' =>array('type'=>'datetime', 'label'=>'Date closing', 'enabled'=>1, 'visible'=>-1, 'position'=>30), 'paye' =>array('type'=>'smallint(6)', 'label'=>'InvoicePaidCompletely', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>80), //'amount' =>array('type'=>'double(24,8)', 'label'=>'Amount', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>85), @@ -310,7 +310,7 @@ class Facture extends CommonInvoice //'remise' =>array('type'=>'double', 'label'=>'Remise', 'enabled'=>1, 'visible'=>-1, 'position'=>100), 'close_code' =>array('type'=>'varchar(16)', 'label'=>'EarlyClosingReason', 'enabled'=>1, 'visible'=>-1, 'position'=>92), 'close_note' =>array('type'=>'varchar(128)', 'label'=>'EarlyClosingComment', 'enabled'=>1, 'visible'=>-1, 'position'=>93), - 'total_ht' =>array('type'=>'double(24,8)', 'label'=>'AmountHT', 'enabled'=>1, 'visible'=>-1, 'position'=>95, 'isameasure'=>1), + 'total_ht' =>array('type'=>'double(24,8)', 'label'=>'AmountHT', 'enabled'=>1, 'visible'=>1, 'position'=>95, 'isameasure'=>1), 'total_tva' =>array('type'=>'double(24,8)', 'label'=>'AmountVAT', 'enabled'=>1, 'visible'=>-1, 'position'=>100, 'isameasure'=>1), 'localtax1' =>array('type'=>'double(24,8)', 'label'=>'LT1', 'enabled'=>1, 'visible'=>-1, 'position'=>110, 'isameasure'=>1), 'localtax2' =>array('type'=>'double(24,8)', 'label'=>'LT2', 'enabled'=>1, 'visible'=>-1, 'position'=>120, 'isameasure'=>1), diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 7c9b71e458b..282aad95d89 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -632,7 +632,7 @@ if ($search_multicurrency_montant_ttc != '') { $sql .= natural_search('f.multicurrency_total_ttc', $search_multicurrency_montant_ttc, 1); } if ($search_login) { - $sql .= natural_search('u.login', $search_login); + $sql .= natural_search(array('u.login', 'u.firstname', 'u.lastname'), $search_login); } if ($search_categ_cus > 0) { $sql .= " AND cc.fk_categorie = ".$db->escape($search_categ_cus); @@ -1900,7 +1900,7 @@ if ($resql) { // Author if (!empty($arrayfields['u.login']['checked'])) { - print ''; + print ''; if ($userstatic->id) { print $userstatic->getNomUrl(-1); } else { diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 51b61c41830..e44c0411bea 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -133,10 +133,10 @@ $arrayfields = array( 's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'position'=>30), 's.email'=>array('label'=>$langs->trans("ThirdPartyEmail"), 'checked'=>0, 'position'=>30), 's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>0, 'position'=>31), - 's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>0, 'position'=>32), + 's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1, 'position'=>32), 'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0, 'position'=>33), 'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0, 'position'=>34), - 'sale_representative'=>array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>1, 'position'=>80), + 'sale_representative'=>array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>-1, 'position'=>80), 'c.date_contrat'=>array('label'=>$langs->trans("DateContract"), 'checked'=>1, 'position'=>45), 'c.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), 'c.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 981374996cf..b8e63ea8f19 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2558,11 +2558,13 @@ class User extends CommonObject /** * Return clickable link of login (eventualy with picto) * - * @param int $withpicto Include picto into link - * @param string $option Sur quoi pointe le lien - * @return string Chaine avec URL + * @param int $withpictoimg Include picto into link + * @param string $option On what the link point to ('leave', 'accountancy', 'nolink', ) + * @param integer $notooltip 1=Disable tooltip on picto and name + * @param string $morecss Add more css on link + * @return string String with URL */ - public function getLoginUrl($withpicto = 0, $option = '') + public function getLoginUrl($withpictoimg = 0, $option = '', $notooltip = 0, $morecss = '') { global $langs, $user; @@ -2587,11 +2589,23 @@ class User extends CommonObject } $result .= $linkstart; - if ($withpicto) { - $result .= img_object($langs->trans("ShowUser"), 'user', 'class="paddingright"'); + if ($withpictoimg) { + $paddafterimage = ''; + if (abs($withpictoimg) == 1) { + $paddafterimage = 'style="margin-'.($langs->trans("DIRECTION") == 'rtl' ? 'left' : 'right').': 3px;"'; + } + // Only picto + if ($withpictoimg > 0) { + $picto = ''.img_object('', 'user', $paddafterimage.' '.($notooltip ? '' : 'class="paddingright classfortooltip"'), 0, 0, $notooltip ? 0 : 1).''; + } else { + // Picto must be a photo + $picto = ''.Form::showphoto('userphoto', $this, 0, 0, 0, 'userphoto'.($withpictoimg == -3 ? 'small' : ''), 'mini', 0, 1).''; + } + $result .= $picto; } $result .= $this->login; $result .= $linkend; + return $result; } From 4d422356708088006496784e4c377ac507550d54 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 May 2021 20:46:14 +0200 Subject: [PATCH 03/53] Complete experimental module knowledge management --- htdocs/install/mysql/migration/13.0.0-14.0.0.sql | 2 ++ .../mysql/tables/llx_knowledgemanagement_knowledgerecord.sql | 1 + 2 files changed, 3 insertions(+) diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql index cf5da55d719..b95ea30f8fb 100644 --- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql +++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql @@ -492,12 +492,14 @@ CREATE TABLE llx_knowledgemanagement_knowledgerecord( model_pdf varchar(255), question text NOT NULL, answer text, + url varchar(255), fk_ticket integer, status integer NOT NULL -- END MODULEBUILDER FIELDS ) ENGINE=innodb; ALTER TABLE llx_knowledgemanagement_knowledgerecord ADD COLUMN fk_ticket integer; +ALTER TABLE llx_knowledgemanagement_knowledgerecord ADD COLUMN url varchar(255); create table llx_knowledgemanagement_knowledgerecord_extrafields diff --git a/htdocs/install/mysql/tables/llx_knowledgemanagement_knowledgerecord.sql b/htdocs/install/mysql/tables/llx_knowledgemanagement_knowledgerecord.sql index 5c9e4cf199f..c5332372019 100644 --- a/htdocs/install/mysql/tables/llx_knowledgemanagement_knowledgerecord.sql +++ b/htdocs/install/mysql/tables/llx_knowledgemanagement_knowledgerecord.sql @@ -28,6 +28,7 @@ CREATE TABLE llx_knowledgemanagement_knowledgerecord( model_pdf varchar(255), question text NOT NULL, answer text, + url varchar(255), fk_ticket integer, status integer NOT NULL -- END MODULEBUILDER FIELDS From dffb244776029295a1b947c4824fc71edb970b2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 18 May 2021 21:04:43 +0200 Subject: [PATCH 04/53] Update AutoLoader.php --- .../includes/restler/framework/Luracast/Restler/AutoLoader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php b/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php index 5ed160a070a..b11506ea86c 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php @@ -263,7 +263,7 @@ class AutoLoader * @return bool false unless className now exists */ private function loadLastResort($className, $loader = null) { - $loaders = array_unique(static::$rogueLoaders); + $loaders = array_unique(static::$rogueLoaders, SORT_REGULAR); if (isset($loader)) { if (false === array_search($loader, $loaders)) static::$rogueLoaders[] = $loader; From f86e10b453c06e023db5581ec749c013902ea392 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Wed, 19 May 2021 06:37:02 +0200 Subject: [PATCH 05/53] FIX wrong variable fk_code_ventilation register for addline --- htdocs/fourn/class/fournisseur.facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index f1f5c8fb969..62a734174b3 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1830,7 +1830,7 @@ class FactureFournisseur extends CommonInvoice $this->line->remise_percent = $remise_percent; $this->line->date_start = $date_start; $this->line->date_end = $date_end; - $this->line->ventil = $ventil; + $this->line->fk_code_ventilation = $ventil; $this->line->rang = $rang; $this->line->info_bits = $info_bits; From 5fd02992c0b636cbc55e2daee9f67a8a846f516e Mon Sep 17 00:00:00 2001 From: ATM john Date: Wed, 19 May 2021 10:26:04 +0200 Subject: [PATCH 06/53] Remove forgotten echo --- htdocs/product/price.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/price.php b/htdocs/product/price.php index b783ad5c002..7a758137133 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1477,7 +1477,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_defaul } print ''.$langs->trans("PriceBase").''; - print $conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL; + if (empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) print ''.$langs->trans("DefaultTaxRate").''; print ''.$langs->trans("HT").''; print ''.$langs->trans("TTC").''; From 78cf2b59c80142b2df015861fd4b1542fb622ea4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 May 2021 11:47:58 +0200 Subject: [PATCH 07/53] Debug feature copy-paste on smarpthone --- htdocs/core/js/lib_foot.js.php | 8 ++++---- htdocs/core/lib/functions.lib.php | 9 ++++++++- htdocs/theme/eldy/btn.inc.php | 7 ++++++- htdocs/theme/eldy/global.inc.php | 4 ++++ htdocs/theme/md/style.css.php | 4 ++++ 5 files changed, 26 insertions(+), 6 deletions(-) diff --git a/htdocs/core/js/lib_foot.js.php b/htdocs/core/js/lib_foot.js.php index c0a8844b572..20debf50f12 100644 --- a/htdocs/core/js/lib_foot.js.php +++ b/htdocs/core/js/lib_foot.js.php @@ -214,17 +214,17 @@ print ' print "\n/* JS CODE TO ENABLE ClipBoard copy paste*/\n"; print 'jQuery(\'.clipboardCPShowOnHover\').hover( function() { - console.log("We hover a value with a copy paste feature"); + console.log("We hover a value with a copy paste feature"); $(this).children(".clipboardCPButton, .clipboardCPText").show(); }, function() { - console.log("We hover out the value with a copy paste feature"); + console.log("We hover out the value with a copy paste feature"); $(this).children(".clipboardCPButton, .clipboardCPText").hide(); } );'; -print 'jQuery(\'.clipboardCPButton\').click(function() { +print 'jQuery(\'.clipboardCPButton, .clipboardCPValueToPrint\').click(function() { /* console.log(this.parentNode); */ - console.log("We click on a clipboardCPButton tag"); + console.log("We click on a clipboardCPButton or clipboardCPValueToPrint class"); if (window.getSelection) { selection = window.getSelection(); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 8d171a048b0..abf9c587b68 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -10236,7 +10236,8 @@ function readfileLowMemory($fullpath_original_file_osencoded, $method = -1) } /** - * Create a button to copy $valuetocopy in the clipboard + * Create a button to copy $valuetocopy in the clipboard. + * Code that handle the click is inside lib_foot.jsp.php * * @param string $valuetocopy The value to print * @param int $showonlyonhover Show the copy-paste button only on hover @@ -10245,6 +10246,12 @@ function readfileLowMemory($fullpath_original_file_osencoded, $method = -1) */ function showValueWithClipboardCPButton($valuetocopy, $showonlyonhover = 1, $texttoshow = '') { + global $conf; + + /*if (!empty($conf->dol_no_mouse_hover)) { + $showonlyonhover = 0; + }*/ + if ($texttoshow) { $result = ''.$valuetocopy.''.$texttoshow.''; } else { diff --git a/htdocs/theme/eldy/btn.inc.php b/htdocs/theme/eldy/btn.inc.php index d874266f81d..a05a8dc7952 100644 --- a/htdocs/theme/eldy/btn.inc.php +++ b/htdocs/theme/eldy/btn.inc.php @@ -51,7 +51,12 @@ if (!empty($conf->global->THEME_DARKMODEENABLED)) { }*/ div.tabsAction > a.butAction, div.tabsAction > a.butActionRefused, div.tabsAction > a.butActionDelete, div.tabsAction > span.butAction, div.tabsAction > span.butActionRefused, div.tabsAction > span.butActionDelete, -div.tabsAction > div.divButAction > span.butAction { +div.tabsAction > div.divButAction > span.butAction, +div.tabsAction > div.divButAction > span.butActionDelete, +div.tabsAction > div.divButAction > span.butActionRefused, +div.tabsAction > div.divButAction > a.butAction, +div.tabsAction > div.divButAction > a.butActionDelete, +div.tabsAction > div.divButAction > a.butActionRefused { margin-bottom: 1.4em !important; margin-right: 0px !important; } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index e451a2af30b..8a1cc74de8c 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -6770,10 +6770,14 @@ div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before /* For copy-paste feature */ /* ============================================================================== */ +span.clipboardCPValueToPrint { + display: inline-block; +} span.clipboardCPValue.hidewithsize { width: 0 !important; display: inline-block; color: transparent; + white-space: nowrap; } .clipboardCPShowOnHover .clipboardCPButton { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 1ebe047ead7..1ade055a9ef 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -6634,10 +6634,14 @@ div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before /* For copy-paste feature */ /* ============================================================================== */ +span.clipboardCPValueToPrint { + display: inline-block; +} span.clipboardCPValue.hidewithsize { width: 0 !important; display: inline-block; color: transparent; + white-space: nowrap; } .clipboardCPShowOnHover .clipboardCPButton { From 9219dcfecb048e9778cf4815297f792af5fed601 Mon Sep 17 00:00:00 2001 From: ATM john Date: Wed, 19 May 2021 11:52:34 +0200 Subject: [PATCH 08/53] Fix price log spam --- htdocs/product/class/product.class.php | 40 +++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 188bcbfd355..124990d09e1 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1534,6 +1534,38 @@ class Product extends CommonObject } } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * check if price have really change to avoid log pollution + * + * @param int $level price level to change + * @return int <0 if KO, >0 if OK + */ + private function getArrayForPriceCompare($level = 0) + { + // phpcs:enable + + $testExit = array('multiprices','multiprices_ttc','multiprices_base_type','multiprices_min','multiprices_min_ttc','multiprices_tva_tx','multiprices_recuperableonly'); + + foreach ($testExit as $field){ + if (!isset($this->$field[$level])) { + return array(); + } + } + + $lastPrice = array( + 'level' => $level ? $level : 1, + 'multiprices' => doubleval($this->multiprices[$level]), + 'multiprices_ttc' => doubleval($this->multiprices_ttc[$level]), + 'multiprices_base_type' => $this->multiprices_base_type[$level], + 'multiprices_min' => doubleval($this->multiprices_min[$level]), + 'multiprices_min_ttc' => doubleval($this->multiprices_min_ttc[$level]), + 'multiprices_tva_tx' => doubleval($this->multiprices_tva_tx[$level]), + 'multiprices_recuperableonly' => doubleval($this->multiprices_recuperableonly[$level]), + ); + + return $lastPrice; + } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -1862,6 +1894,8 @@ class Product extends CommonObject { global $conf, $langs; + $lastPriceData = $this->getArrayForPriceCompare($level); // temporary store current price before update + $id = $this->id; dol_syslog(get_class($this)."::update_price id=".$id." newprice=".$newprice." newpricebase=".$newpricebase." newminprice=".$newminprice." level=".$level." npr=".$newnpr." newdefaultvatcode=".$newdefaultvatcode); @@ -1994,7 +2028,11 @@ class Product extends CommonObject // Price by quantity $this->price_by_qty = $newpbq; - $this->_log_price($user, $level); // Save price for level into table product_price + // check if price have really change before log + $newPriceData = $this->getArrayForPriceCompare($level); + if (!empty(array_diff_assoc($newPriceData, $lastPriceData)) || empty($conf->global->PRODUIT_MULTIPRICES)) { + $this->_log_price($user, $level); // Save price for level into table product_price + } $this->level = $level; // Store level of price edited for trigger From 7b4ed859eb9f5c89466662c61b104fbc28f15090 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 May 2021 11:57:12 +0200 Subject: [PATCH 09/53] css --- htdocs/theme/eldy/global.inc.php | 4 ++-- htdocs/theme/md/style.css.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 8a1cc74de8c..988ac6b3ae3 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -902,8 +902,8 @@ span.fa.fa-plus-circle.paddingleft { height: 28px; vertical-align: middle; } -.divsocialnetwork:not(:first-child) { - padding-left: 20px; +.divsocialnetwork:not(:last-child) { + padding-: 20px; } div.divsearchfield { float: ; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 1ade055a9ef..e292b3850d1 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1002,8 +1002,8 @@ body[class*="colorblind-"] .text-success{ height: 28px; vertical-align: middle; } -.divsocialnetwork:not(:first-child) { - padding-left: 20px; +.divsocialnetwork:not(:last-child) { + padding-: 20px; } div.divsearchfield { float: ; From 1512abf96ab4412717c53f4877df56279a9b6921 Mon Sep 17 00:00:00 2001 From: ATM john Date: Wed, 19 May 2021 12:00:27 +0200 Subject: [PATCH 10/53] Remove hpcs:disable --- htdocs/product/class/product.class.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 124990d09e1..87fb839b5c9 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1534,7 +1534,6 @@ class Product extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * check if price have really change to avoid log pollution * @@ -1543,7 +1542,6 @@ class Product extends CommonObject */ private function getArrayForPriceCompare($level = 0) { - // phpcs:enable $testExit = array('multiprices','multiprices_ttc','multiprices_base_type','multiprices_min','multiprices_min_ttc','multiprices_tva_tx','multiprices_recuperableonly'); From 3bf71d456ddc80564e29631ba714fe8d6368e096 Mon Sep 17 00:00:00 2001 From: ATM john Date: Wed, 19 May 2021 12:01:47 +0200 Subject: [PATCH 11/53] fix doc --- htdocs/product/class/product.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 87fb839b5c9..685180e4659 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1535,10 +1535,10 @@ class Product extends CommonObject } /** - * check if price have really change to avoid log pollution + * used to check if price have really change to avoid log pollution * * @param int $level price level to change - * @return int <0 if KO, >0 if OK + * @return array */ private function getArrayForPriceCompare($level = 0) { From 90835eaab4a740fac3ad46207e54fec7dcdbae43 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 May 2021 12:08:17 +0200 Subject: [PATCH 12/53] css --- htdocs/theme/eldy/btn.inc.php | 17 +++++++++++++++++ htdocs/theme/md/btn.inc.php | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/htdocs/theme/eldy/btn.inc.php b/htdocs/theme/eldy/btn.inc.php index a05a8dc7952..7122c252cbe 100644 --- a/htdocs/theme/eldy/btn.inc.php +++ b/htdocs/theme/eldy/btn.inc.php @@ -308,6 +308,23 @@ div.pagination li:first-child a.btnTitle{ } } +/* rule to reduce top menu - 3rd reduction: The menu for user is on left */ +@media only screen and (max-width: global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3) ? round($nbtopmenuentries * 47, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3; ?>px) /* reduction 3 */ +{ + .butAction, .butActionRefused, .butActionDelete { + font-size: 0.9em; + } +} + +/* smartphone */ +@media only screen and (max-width: 767px) +{ + .butAction, .butActionRefused, .butActionDelete { + font-size: 0.85em; + } +} + + global->MAIN_BUTTON_HIDE_UNAUTHORIZED) && (!$user->admin)) { ?> .butActionRefused, .butActionNewRefused, .btnTitle.refused { display: none !important; diff --git a/htdocs/theme/md/btn.inc.php b/htdocs/theme/md/btn.inc.php index c0d6e2c9cd7..2517415a96f 100644 --- a/htdocs/theme/md/btn.inc.php +++ b/htdocs/theme/md/btn.inc.php @@ -379,6 +379,23 @@ div.pagination .btnTitle:hover .btnTitle-label{ } } +/* rule to reduce top menu - 3rd reduction: The menu for user is on left */ +@media only screen and (max-width: global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3) ? round($nbtopmenuentries * 47, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3; ?>px) /* reduction 3 */ +{ + .butAction, .butActionRefused, .butActionDelete { + font-size: 0.9em; + } +} + +/* smartphone */ +@media only screen and (max-width: 767px) +{ + .butAction, .butActionRefused, .butActionDelete { + font-size: 0.85em; + } +} + + global->MAIN_BUTTON_HIDE_UNAUTHORIZED) && (!$user->admin)) { ?> .butActionRefused, .butActionNewRefused, .btnTitle.refused { display: none !important; From 75f7ab41f036e123eb1f961d8e8be3f041b68df2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 May 2021 12:13:21 +0200 Subject: [PATCH 13/53] css --- htdocs/core/class/html.formfile.class.php | 2 +- htdocs/user/card.php | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 7cf9978d32b..45429512046 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -851,7 +851,7 @@ class FormFile // Show file size $size = (!empty($file['size']) ? $file['size'] : dol_filesize($filedir."/".$file["name"])); - $out .= ''.dol_print_size($size, 1, 1).''; + $out .= ''.dol_print_size($size, 1, 1).''; // Show file date $date = (!empty($file['date']) ? $file['date'] : dol_filemtime($filedir."/".$file["name"])); diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 332c98f56da..cd891126ba6 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -2718,9 +2718,8 @@ if ($action == 'create' || $action == 'adduserldap') { if ($action != 'edit' && $action != 'presend') { print '
'; - /* - * Generated documents - */ + + // Generated documents $filename = dol_sanitizeFileName($object->ref); $filedir = $conf->user->dir_output."/".dol_sanitizeFileName($object->ref); $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; @@ -2741,7 +2740,6 @@ if ($action == 'create' || $action == 'adduserldap') { $formactions = new FormActions($db); $somethingshown = $formactions->showactions($object, 'user', $socid, 1); - print '
'; } From 059c2862624efde96cc36b8aca7d26250fcbb332 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 May 2021 12:19:18 +0200 Subject: [PATCH 14/53] css --- htdocs/user/perms.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index e80cb6c8462..1d521c62b34 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -425,9 +425,9 @@ if ($result) { print ' '; } - // Label of permission + // Descrption of permission $permlabel = (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ($langs->trans("PermissionAdvanced".$obj->id) != ("PermissionAdvanced".$obj->id)) ? $langs->trans("PermissionAdvanced".$obj->id) : (($langs->trans("Permission".$obj->id) != ("Permission".$obj->id)) ? $langs->trans("Permission".$obj->id) : $langs->trans($obj->label))); - print ''; + print ''; print $permlabel; if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { if (preg_match('/_advance$/', $obj->perms)) { From e472d2d5d17dd9d768e1fd8b5128a12ca515754e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 May 2021 12:44:26 +0200 Subject: [PATCH 15/53] Fix bad permission position for external modules --- htdocs/admin/modules.php | 3 ++- htdocs/user/perms.php | 25 ++++++++++++++++++------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 142d5accb0f..1a6d99261bd 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -386,7 +386,8 @@ foreach ($modulesdir as $dir) { } $moduleposition = ($objMod->module_position ? $objMod->module_position : '50'); - if ($moduleposition == '50' && ($objMod->isCoreOrExternalModule() == 'external')) { + if ($objMod->isCoreOrExternalModule() == 'external' && $moduleposition < 100000) { + // an external module should never return a value lower than '80'. $moduleposition = '80'; // External modules at end by default } diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 1d521c62b34..cb0a093867d 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -311,21 +311,33 @@ if ($result) { while ($i < $num) { $obj = $db->fetch_object($result); - // If line is for a module that doe snot existe anymore (absent of includes/module), we ignore it + // If line is for a module that does not exist anymore (absent of includes/module), we ignore it if (empty($modules[$obj->module])) { $i++; continue; } - // Save field module_position in database if value is still zero - if (empty($obj->module_position)) { + $objMod = $modules[$obj->module]; + + // Save field module_position in database if value is wrong + if (empty($obj->module_position) || (is_object($objMod) && $objMod->isCoreOrExternalModule() == 'external' && $obj->module_position < 100000)) { if (is_object($modules[$obj->module]) && ($modules[$obj->module]->module_position > 0)) { // TODO Define familyposition - $family = $modules[$obj->module]->family_position; + //$familyposition = $modules[$obj->module]->family_position; $familyposition = 0; - $sqlupdate = 'UPDATE '.MAIN_DB_PREFIX."rights_def SET module_position = ".((int) $modules[$obj->module]->module_position).","; + + $newmoduleposition = $modules[$obj->module]->module_position; + + // Correct $newmoduleposition position for external modules + $objMod = $modules[$obj->module]; + if (is_object($objMod) && $objMod->isCoreOrExternalModule() == 'external' && $newmoduleposition < 100000) { + $newmoduleposition += 100000; + } + + $sqlupdate = 'UPDATE '.MAIN_DB_PREFIX."rights_def SET module_position = ".((int) $newmoduleposition).","; $sqlupdate .= " family_position = ".((int) $familyposition); - $sqlupdate .= " WHERE module_position = 0 AND module = '".$db->escape($obj->module)."'"; + $sqlupdate .= " WHERE module_position = ".((int) $obj->module_position)." AND module = '".$db->escape($obj->module)."'"; + $db->query($sqlupdate); } } @@ -334,7 +346,6 @@ if ($result) { $oldmod = $obj->module; // Break detected, we get objMod - $objMod = $modules[$obj->module]; $picto = ($objMod->picto ? $objMod->picto : 'generic'); // Show break line From 58ffee193f8c1ac7c54ec470191bfe7b980878c1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 May 2021 13:07:25 +0200 Subject: [PATCH 16/53] Debug v14 --- htdocs/admin/tools/listevents.php | 2 +- htdocs/core/lib/usergroups.lib.php | 2 +- htdocs/langs/en_US/other.lang | 2 +- htdocs/user/param_ihm.php | 36 ++++++++++++------------------ 4 files changed, 17 insertions(+), 25 deletions(-) diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index fbc2412a9df..b76836a8dde 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -372,7 +372,7 @@ if ($result) { print_liste_field_titre("UserAgent", $_SERVER["PHP_SELF"], "e.user_agent", "", $param, '', $sortfield, $sortorder); } if (!empty($arrayfields['e.prefix_session']['checked'])) { - print_liste_field_titre("PrefixSession", $_SERVER["PHP_SELF"], "e.prefix_session", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("SuffixSessionName", $_SERVER["PHP_SELF"], "e.prefix_session", "", $param, '', $sortfield, $sortorder); } print_liste_field_titre(''); print "\n"; diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 700c9c5ed86..6d01fcfee0a 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -339,7 +339,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) $thumbsbyrow = 6; print '
'; - print ''; + print '
'; // Title if ($foruserprofile) { diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 95297a98859..6fc8b351b77 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -263,7 +263,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.
Use a space to enter different ranges.
Example: 8-12 14-18 -PrefixSession=Prefix for session ID +SuffixSessionName=Suffix for session name ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 2856f787b52..b492e31177f 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -231,19 +231,9 @@ if ($action == 'edit') { dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin); - if (!empty($conf->use_javascript_ajax)) {/* - print '';*/ - } + print dol_get_fiche_end(); + + if (!empty($conf->use_javascript_ajax)) { print ''; $out .= $this->select_dolusers('', $htmlname, $show_empty, $exclude, $disabled, $include, $enableonly, $force_entity, $maxlength, $showstatus, $morefilter); - $out .= ' '; + $out .= ' '; $out .= '
'; } diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 8874b96eda5..bd69b812200 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -454,7 +454,7 @@ function ajax_combobox($htmlname, $events = array(), $minLengthToAutocomplete = templateResult: function (data, container) { /* Format visible output into combo list */ /* Code to add class of origin OPTION propagated to the new select2
  • tag */ if (data.element) { $(container).addClass($(data.element).attr("class")); } - console.log($(data.element).attr("data-html")); + //console.log($(data.element).attr("data-html")); if (data.id == -1 && $(data.element).attr("data-html") == undefined) { return \' \'; } diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 98fb4132bb8..c92f847a1e9 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1181,7 +1181,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { if ($type != 1 && !empty($conf->stock->enabled)) { // Default warehouse print '
  • '.$langs->trans("DefaultWarehouse").''; - print img_picto($langs->trans("DefaultWarehouse"), 'stock', 'pictofixedwidth'); + print img_picto($langs->trans("DefaultWarehouse"), 'stock', 'class="pictofixedwidth"'); print $formproduct->selectWarehouses(GETPOST('fk_default_warehouse'), 'fk_default_warehouse', 'warehouseopen', 1); print ' '; print ''; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 988ac6b3ae3..6c705c62489 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1027,6 +1027,7 @@ ul.attendees li { list-style-type: none; padding-top:1px; padding-bottom:1px; + line-height: 1.6em; } .googlerefreshcal { padding-top: 4px; @@ -1472,6 +1473,10 @@ select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-select width: calc(100% - 40px) !important; display: inline-block; } + select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-selection), input.widthcentpercentminusxx { + width: calc(100% - 70px) !important; + display: inline-block; + } .logopublicpayment #dolpaymentlogo { max-width: 260px; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index e292b3850d1..407a38ea320 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1496,6 +1496,18 @@ table[summary="list_of_modules"] .fa-cog { padding-right: 10px !important; } + .hideonsmartphone { display: none; } + .hideonsmartphoneimp { display: none !important; } + + select.minwidth100imp, select.minwidth100, select.minwidth200, select.minwidth200imp, select.minwidth300 { + width: calc(100% - 40px) !important; + display: inline-block; + } + select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-selection), input.widthcentpercentminusxx { + width: calc(100% - 70px) !important; + display: inline-block; + } + .poweredbyimg { width: 48px; } @@ -1580,8 +1592,6 @@ table[summary="list_of_modules"] .fa-cog { line-height: 1.4em; } - .hideonsmartphone { display: none; } - .hideonsmartphoneimp { display: none !important; } .noenlargeonsmartphone { width : 50px !important; display: inline !important; } .maxwidthonsmartphone, #search_newcompany.ui-autocomplete-input { max-width: 100px; } .maxwidth50onsmartphone { max-width: 40px; } From f9fb296ea6cae998a0108014b22b156ac5d45e31 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Wed, 19 May 2021 13:59:36 +0200 Subject: [PATCH 20/53] Update llx_00_c_country.sql MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit République Tchèque -> Czech Republic Danemark -> Denmark Djibouti = Djibouti Dominique -> Dominica République Dominicaine -> Dominican Republic Equateur -> Republic of Ecuador Egypte -> Egypt Salvador -> El Salvador Guinée Equatoriale -> Equatorial Guinea Erythrée -> Eritrea --- htdocs/install/mysql/data/llx_00_c_country.sql | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/install/mysql/data/llx_00_c_country.sql b/htdocs/install/mysql/data/llx_00_c_country.sql index 296b6d0e412..bc09a7fd1f6 100644 --- a/htdocs/install/mysql/data/llx_00_c_country.sql +++ b/htdocs/install/mysql/data/llx_00_c_country.sql @@ -106,16 +106,16 @@ INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (75 INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (76,'HR','HRV','Croatie',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (77,'CU','CUB','Cuba',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (78,'CY','CYP','Cyprus',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (79,'CZ','CZE','République Tchèque',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (80,'DK','DNK','Danemark',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (79,'CZ','CZE','Czech Republic',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (80,'DK','DNK','Denmark',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (81,'DJ','DJI','Djibouti',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (82,'DM','DMA','Dominique',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (83,'DO','DOM','République Dominicaine',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (84,'EC','ECU','Equateur',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (85,'EG','EGY','Egypte',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (86,'SV','SLV','Salvador',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (87,'GQ','GNQ','Guinée Equatoriale',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (88,'ER','ERI','Erythrée',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (82,'DM','DMA','Dominica',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (83,'DO','DOM','Dominican Republic',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (84,'EC','ECU','Republic of Ecuador',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (85,'EG','EGY','Egypt',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (86,'SV','SLV','El Salvador',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (87,'GQ','GNQ','Equatorial Guinea',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (88,'ER','ERI','Eritrea',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (89,'EE','EST','Estonia',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (90,'ET','ETH','Ethiopia',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (91,'FK','FLK','Falkland Islands',1,0); From 173ef6e877a542db618db669d1793e13510b316e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 May 2021 14:04:01 +0200 Subject: [PATCH 21/53] Look and feel v14 --- htdocs/core/class/html.form.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 1366b8d5078..7fcad5b8fb4 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4946,16 +4946,16 @@ class Form $formconfirm .= ''."\n"; // Line title - $formconfirm .= ''."\n"; + $formconfirm .= ''."\n"; // Line text if (is_array($formquestion) && !empty($formquestion['text'])) { - $formconfirm .= ''."\n"; + $formconfirm .= ''."\n"; } // Line form fields if ($more) { - $formconfirm .= ''."\n"; } @@ -4963,10 +4963,10 @@ class Form // Line with question $formconfirm .= ''; $formconfirm .= ''; - $formconfirm .= ''; - $formconfirm .= ''; $formconfirm .= ''."\n"; $formconfirm .= '
    '.img_picto('', 'recent').' '.$title.'
    '.img_picto('', 'recent').' '.$title.'
    '.$formquestion['text'].'
    '.$formquestion['text'].'
    '."\n"; + $formconfirm .= '
    '."\n"; $formconfirm .= $more; $formconfirm .= '
    '.$question.''; + $formconfirm .= ''; $formconfirm .= $this->selectyesno("confirm", $newselectedchoice); + $formconfirm .= ''; $formconfirm .= '
    '."\n"; From 8f5c898daef6034358bb3ee4380cbbb55ebdfb04 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 May 2021 14:13:42 +0200 Subject: [PATCH 22/53] CSS --- htdocs/core/class/html.form.class.php | 11 +++++++---- htdocs/core/lib/functions.lib.php | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 7fcad5b8fb4..47764d448f1 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4946,7 +4946,9 @@ class Form $formconfirm .= ''."\n"; // Line title - $formconfirm .= ''."\n"; + $formconfirm .= ''."\n"; // Line text if (is_array($formquestion) && !empty($formquestion['text'])) { @@ -4964,7 +4966,7 @@ class Form $formconfirm .= ''; $formconfirm .= ''; $formconfirm .= ''; $formconfirm .= ''."\n"; @@ -7837,9 +7839,10 @@ class Form * @param bool $disabled true or false * @param int $useempty 1=Add empty line * @param int $addjscombo 1=Add js beautifier on combo box + * @param string $morecss More CSS * @return string See option */ - public function selectyesno($htmlname, $value = '', $option = 0, $disabled = false, $useempty = 0, $addjscombo = 0) + public function selectyesno($htmlname, $value = '', $option = 0, $disabled = false, $useempty = 0, $addjscombo = 0, $morecss = '') { global $langs; @@ -7852,7 +7855,7 @@ class Form $disabled = ($disabled ? ' disabled' : ''); - $resultyesno = ''."\n"; if ($useempty) { $resultyesno .= ''."\n"; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index abf9c587b68..9afa45aff26 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3516,7 +3516,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'generic', 'home', 'hrm', 'members', 'products', 'invoicing', 'partnership', 'payment', 'pencil-ruler', 'preview', 'project', 'projectpub', 'projecttask', 'refresh', 'salary', 'shipment', 'supplier_invoice', 'technic', 'ticket', 'error', 'warning', - 'reception', 'recruitmentcandidature', 'recruitmentjobposition', 'resource', + 'recent', 'reception', 'recruitmentcandidature', 'recruitmentjobposition', 'resource', 'shapes', 'supplier', 'supplier_proposal', 'supplier_order', 'supplier_invoice', 'timespent', 'title_setup', 'title_accountancy', 'title_bank', 'title_hrm', 'title_agenda', 'uncheck', 'user-cog', 'website', 'workstation', @@ -3558,7 +3558,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'other'=>'square', 'playdisabled'=>'play', 'pdf'=>'file-pdf', 'poll'=>'check-double', 'pos'=>'cash-register', 'preview'=>'binoculars', 'project'=>'project-diagram', 'projectpub'=>'project-diagram', 'projecttask'=>'tasks', 'propal'=>'file-signature', 'partnership'=>'handshake', 'payment'=>'money-check-alt', 'phoning'=>'phone', 'phoning_mobile'=>'mobile-alt', 'phoning_fax'=>'fax', 'previous'=>'arrow-alt-circle-left', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell', - 'reception'=>'dolly', 'recruitmentjobposition'=>'id-card-alt', 'recruitmentcandidature'=>'id-badge', + 'recent' => 'question', 'reception'=>'dolly', 'recruitmentjobposition'=>'id-card-alt', 'recruitmentcandidature'=>'id-badge', 'resize'=>'crop', 'supplier_order'=>'dol-order_supplier', 'supplier_proposal'=>'file-signature', 'refresh'=>'redo', 'resource'=>'laptop-house', 'security'=>'key', 'salary'=>'wallet', 'shipment'=>'dolly', 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'stripe'=>'stripe-s', From 92ccf5982a8e600cee4134ac0d8c7b12f40874a9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 May 2021 14:38:39 +0200 Subject: [PATCH 23/53] Fix responsive --- htdocs/comm/propal/card.php | 25 +++++++++++----------- htdocs/core/class/html.form.class.php | 30 ++++++++++++++------------- htdocs/core/lib/functions.lib.php | 2 +- 3 files changed, 29 insertions(+), 28 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 984d77e7263..5d9ae8d75a6 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1436,11 +1436,9 @@ if (empty($reshook)) { */ $form = new Form($db); -$formother = new FormOther($db); $formfile = new FormFile($db); $formpropal = new FormPropal($db); $formmargin = new FormMargin($db); -$companystatic = new Societe($db); if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } @@ -1582,7 +1580,7 @@ if ($action == 'create') { //$warehouse_id = $soc->warehouse_id; } else { print '
    '.img_picto('', 'recent').' '.$title.'
    '; + $formconfirm .= img_picto('', 'recent').' '.$title; + $formconfirm .= '
    '.$question.''; - $formconfirm .= $this->selectyesno("confirm", $newselectedchoice); + $formconfirm .= $this->selectyesno("confirm", $newselectedchoice, 0, false, 0, 0, 'marginleftonly marginrightonly'); $formconfirm .= ''; $formconfirm .= '
    '; - print img_picto('', 'company').$form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3) AND status=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300 maxwidth500'); + print img_picto('', 'company').$form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3) AND status=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300 maxwidth500 widthcentpercentminusxx'); // reload page to retrieve customer informations if (empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED)) { print '