From ef890a29ebc51c1c228808585c5b5305b414dc42 Mon Sep 17 00:00:00 2001 From: bahfir abbes Date: Fri, 24 Apr 2020 16:26:48 +0100 Subject: [PATCH 1/4] =?UTF-8?q?fix:Le=20label=20doit=20=C3=AAtre=20une=20c?= =?UTF-8?q?l=C3=A9=20de=20dictionnaire?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/modulebuilder/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 2209dbf92d4..956ceb0cfd3 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -711,7 +711,7 @@ if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray', $notnull = ($obj->Null == 'YES' ? 0 : 1); if ($fieldname == 'fk_user_modif') $notnull = -1; // label - $label = preg_replace('/_/', ' ', ucfirst($fieldname)); + $label = $fieldname; if ($fieldname == 'rowid') $label = 'TechnicalID'; if ($fieldname == 'import_key') $label = 'ImportId'; if ($fieldname == 'fk_soc') $label = 'ThirdParty'; From f01018400846e18fcd519307b052f6c08094b557 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Mon, 8 Jun 2020 11:48:31 +0200 Subject: [PATCH 2/4] FIX replace filter parameter "none" by "restricthtml" --- htdocs/takepos/admin/terminal.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php index 54e5de37a5c..49b99daf280 100644 --- a/htdocs/takepos/admin/terminal.php +++ b/htdocs/takepos/admin/terminal.php @@ -95,8 +95,8 @@ if (GETPOST('action', 'alpha') == 'set') $res = dolibarr_set_const($db, "TAKEPOS_ADDON".$terminaltouse, GETPOST('TAKEPOS_ADDON'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity); // add free text on each terminal of cash desk - $res = dolibarr_set_const($db, 'TAKEPOS_HEADER'.$terminaltouse, GETPOST('TAKEPOS_HEADER'.$terminaltouse, 'none'), 'chaine', 0, '', $conf->entity); - $res = dolibarr_set_const($db, 'TAKEPOS_FOOTER'.$terminaltouse, GETPOST('TAKEPOS_FOOTER'.$terminaltouse, 'none'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TAKEPOS_HEADER'.$terminaltouse, GETPOST('TAKEPOS_HEADER'.$terminaltouse, 'restricthtml'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TAKEPOS_FOOTER'.$terminaltouse, GETPOST('TAKEPOS_FOOTER'.$terminaltouse, 'restricthtml'), 'chaine', 0, '', $conf->entity); dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); From e628730a3f73effe351b38988343c0e94aa51e24 Mon Sep 17 00:00:00 2001 From: "DEMAREST Maxime (Indelog)" Date: Tue, 9 Jun 2020 11:32:34 +0200 Subject: [PATCH 3/4] Add show preview for mail attachement on form mail --- htdocs/core/class/html.formmail.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 29ccbde0f02..96c99ebba36 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -319,6 +319,10 @@ class FormMail extends Form // phpcs:enable global $conf, $langs, $user, $hookmanager, $form; + // Required to show preview of mail attachments + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; + $formfile = new Formfile($this->db); + if (!is_object($form)) $form = new Form($this->db); // Load translation files required by the page @@ -845,7 +849,10 @@ class FormMail extends Form foreach ($listofpaths as $key => $val) { $out .= '
'; + // Preview of attachment + preg_match('#^(/)(\w+)(/)(.+)$#', substr($val, (strlen(DOL_DATA_ROOT)-strlen($val))), $formfile_params); $out .= img_mime($listofnames[$key]).' '.$listofnames[$key]; + $out .= $formfile->showPreview(array(), $formfile_params[2], $formfile_params[4]); if (!$this->withfilereadonly) { $out .= ' '; From 4b47a270afb55ff6c85f1b39c844ec57b9f7e281 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 11 Jun 2020 23:15:00 +0200 Subject: [PATCH 4/4] Update index.php --- htdocs/modulebuilder/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 956ceb0cfd3..2ef9d991c84 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -711,7 +711,7 @@ if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray', $notnull = ($obj->Null == 'YES' ? 0 : 1); if ($fieldname == 'fk_user_modif') $notnull = -1; // label - $label = $fieldname; + $label = preg_replace('/_/', '', ucfirst($fieldname)); if ($fieldname == 'rowid') $label = 'TechnicalID'; if ($fieldname == 'import_key') $label = 'ImportId'; if ($fieldname == 'fk_soc') $label = 'ThirdParty';