From 0bd4b132a4ac6926b40553ca80d67cf0fde946de Mon Sep 17 00:00:00 2001 From: Adrien Raze Date: Wed, 10 Mar 2021 14:39:04 +0100 Subject: [PATCH 01/20] FIX : Update pencil should be shoxn only when no payment has been entered --- htdocs/compta/sociales/card.php | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 430df926859..55684a23c7d 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -444,15 +444,28 @@ if ($id > 0) { $morehtmlref .= $form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1); // Employee - if ($action != 'editfk_user') { - $morehtmlref .= '
' . $form->editfieldkey("Employee", 'fk_user', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1); - - if (!empty($object->fk_user)) { + if($action != 'editfk_user') { + if ($object->getSommePaiement() > 0 && !empty($object->fk_user)){ $userstatic = new User($db); - $userstatic->fetch($object->fk_user); - $morehtmlref .= $userstatic->getNomUrl(1); + $result = $userstatic->fetch($object->fk_user); + if ($result > 0){ + $morehtmlref .= '
' .$langs->trans('Employee').' : '.$userstatic->getNomUrl(1); + } + } else { + $morehtmlref .= '
' . $form->editfieldkey("Employee", 'fk_user', $object->label, $object, $user->rights->salaries->write, 'string', '', 0, 1); + if(!empty($object->fk_user)) { + $userstatic = new User($db); + $result = $userstatic->fetch($object->fk_user); + if ($result > 0){ + $morehtmlref .= $userstatic->getNomUrl(1); + } else { + dol_print_error($db); + exit(); + } + } } } else { + $morehtmlref .= '
'.$langs->trans('Employee').' : '; $morehtmlref .= '
'; $morehtmlref .= ''; From 3a9c1613bf53baefac2afcdd688853ee3a3b2d11 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Wed, 10 Mar 2021 14:12:29 +0000 Subject: [PATCH 02/20] Fixing style errors. --- htdocs/compta/sociales/card.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 55684a23c7d..e79f4c0d0ab 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -444,19 +444,19 @@ if ($id > 0) { $morehtmlref .= $form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1); // Employee - if($action != 'editfk_user') { - if ($object->getSommePaiement() > 0 && !empty($object->fk_user)){ + if ($action != 'editfk_user') { + if ($object->getSommePaiement() > 0 && !empty($object->fk_user)) { $userstatic = new User($db); $result = $userstatic->fetch($object->fk_user); - if ($result > 0){ + if ($result > 0) { $morehtmlref .= '
' .$langs->trans('Employee').' : '.$userstatic->getNomUrl(1); } } else { $morehtmlref .= '
' . $form->editfieldkey("Employee", 'fk_user', $object->label, $object, $user->rights->salaries->write, 'string', '', 0, 1); - if(!empty($object->fk_user)) { + if (!empty($object->fk_user)) { $userstatic = new User($db); $result = $userstatic->fetch($object->fk_user); - if ($result > 0){ + if ($result > 0) { $morehtmlref .= $userstatic->getNomUrl(1); } else { dol_print_error($db); @@ -465,7 +465,6 @@ if ($id > 0) { } } } else { - $morehtmlref .= '
'.$langs->trans('Employee').' : '; $morehtmlref .= ''; $morehtmlref .= ''; From 83b06734a22ef93b20af3a1db186b8f6689f83af Mon Sep 17 00:00:00 2001 From: Adrien Raze Date: Wed, 10 Mar 2021 15:34:43 +0100 Subject: [PATCH 03/20] FIX : Travis return --- htdocs/compta/sociales/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index e79f4c0d0ab..4b4e79ababb 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -452,7 +452,7 @@ if ($id > 0) { $morehtmlref .= '
' .$langs->trans('Employee').' : '.$userstatic->getNomUrl(1); } } else { - $morehtmlref .= '
' . $form->editfieldkey("Employee", 'fk_user', $object->label, $object, $user->rights->salaries->write, 'string', '', 0, 1); + $morehtmlref .= '
' . $form->editfieldkey("Employee", 'fk_user', $object->label, $object, $user->rights->salaries->write, 'string', '', 0, 1); if (!empty($object->fk_user)) { $userstatic = new User($db); $result = $userstatic->fetch($object->fk_user); From 3669c374c253f6541af02c4d5445b06895008ff6 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sat, 20 Mar 2021 13:55:43 +0100 Subject: [PATCH 04/20] Uniformize information on modules --- htdocs/core/modules/modAccounting.class.php | 2 +- htdocs/core/modules/modAdherent.class.php | 2 +- htdocs/core/modules/modAgenda.class.php | 2 +- htdocs/core/modules/modApi.class.php | 2 +- htdocs/core/modules/modAsset.class.php | 2 +- htdocs/core/modules/modBanque.class.php | 2 +- htdocs/core/modules/modBarcode.class.php | 4 ++-- htdocs/core/modules/modBlockedLog.class.php | 2 +- htdocs/core/modules/modBom.class.php | 2 +- htdocs/core/modules/modBookmark.class.php | 2 +- htdocs/core/modules/modCashDesk.class.php | 2 +- htdocs/core/modules/modCategorie.class.php | 2 +- htdocs/core/modules/modClickToDial.class.php | 2 +- htdocs/core/modules/modCollab.class.php | 2 +- htdocs/core/modules/modCommande.class.php | 2 +- htdocs/core/modules/modComptabilite.class.php | 2 +- htdocs/core/modules/modContrat.class.php | 2 +- htdocs/core/modules/modCron.class.php | 2 +- htdocs/core/modules/modDataPolicy.class.php | 2 +- htdocs/core/modules/modDav.class.php | 2 +- htdocs/core/modules/modDebugBar.class.php | 2 +- htdocs/core/modules/modDeplacement.class.php | 2 +- htdocs/core/modules/modDocumentGeneration.class.php | 2 +- htdocs/core/modules/modDon.class.php | 2 +- htdocs/core/modules/modDynamicPrices.class.php | 2 +- htdocs/core/modules/modECM.class.php | 2 +- htdocs/core/modules/modEmailCollector.class.php | 2 +- htdocs/core/modules/modEventOrganization.class.php | 2 +- htdocs/core/modules/modExpedition.class.php | 2 +- htdocs/core/modules/modExpenseReport.class.php | 2 +- htdocs/core/modules/modExport.class.php | 2 +- htdocs/core/modules/modExternalRss.class.php | 2 +- htdocs/core/modules/modExternalSite.class.php | 2 +- htdocs/core/modules/modFTP.class.php | 2 +- htdocs/core/modules/modFacture.class.php | 6 +++--- htdocs/core/modules/modFckeditor.class.php | 2 +- htdocs/core/modules/modFicheinter.class.php | 2 +- htdocs/core/modules/modFournisseur.class.php | 2 +- htdocs/core/modules/modGeoIPMaxmind.class.php | 2 +- htdocs/core/modules/modGravatar.class.php | 2 +- htdocs/core/modules/modHRM.class.php | 2 +- htdocs/core/modules/modHoliday.class.php | 2 +- htdocs/core/modules/modImport.class.php | 2 +- htdocs/core/modules/modIncoterm.class.php | 2 +- htdocs/core/modules/modIntracommreport.class.php | 2 +- htdocs/core/modules/modLabel.class.php | 2 +- htdocs/core/modules/modLdap.class.php | 2 +- htdocs/core/modules/modLoan.class.php | 2 +- htdocs/core/modules/modMailing.class.php | 2 +- htdocs/core/modules/modMailmanSpip.class.php | 2 +- htdocs/core/modules/modMargin.class.php | 2 +- htdocs/core/modules/modModuleBuilder.class.php | 2 +- htdocs/core/modules/modMrp.class.php | 2 +- htdocs/core/modules/modMultiCurrency.class.php | 2 +- htdocs/core/modules/modNotification.class.php | 2 +- htdocs/core/modules/modOauth.class.php | 2 +- htdocs/core/modules/modOpenSurvey.class.php | 2 +- htdocs/core/modules/modPaybox.class.php | 2 +- htdocs/core/modules/modPaymentByBankTransfer.class.php | 2 +- htdocs/core/modules/modPaypal.class.php | 2 +- htdocs/core/modules/modPrelevement.class.php | 2 +- htdocs/core/modules/modPrinting.class.php | 2 +- htdocs/core/modules/modProduct.class.php | 2 +- htdocs/core/modules/modProductBatch.class.php | 2 +- htdocs/core/modules/modProjet.class.php | 2 +- htdocs/core/modules/modPropale.class.php | 2 +- htdocs/core/modules/modReceiptPrinter.class.php | 2 +- htdocs/core/modules/modReception.class.php | 2 +- htdocs/core/modules/modRecruitment.class.php | 2 +- htdocs/core/modules/modResource.class.php | 2 +- htdocs/core/modules/modSalaries.class.php | 2 +- htdocs/core/modules/modService.class.php | 2 +- htdocs/core/modules/modSocialNetworks.class.php | 2 +- htdocs/core/modules/modSociete.class.php | 2 +- htdocs/core/modules/modStock.class.php | 2 +- htdocs/core/modules/modStripe.class.php | 2 +- htdocs/core/modules/modSupplierProposal.class.php | 2 +- htdocs/core/modules/modSyslog.class.php | 2 +- htdocs/core/modules/modTakePos.class.php | 2 +- htdocs/core/modules/modTax.class.php | 2 +- htdocs/core/modules/modTicket.class.php | 2 +- htdocs/core/modules/modUser.class.php | 2 +- htdocs/core/modules/modVariants.class.php | 1 + htdocs/core/modules/modWebServices.class.php | 2 +- htdocs/core/modules/modWebServicesClient.class.php | 2 +- htdocs/core/modules/modWebsite.class.php | 2 +- htdocs/core/modules/modWorkflow.class.php | 2 +- htdocs/core/modules/modWorkstation.class.php | 2 +- htdocs/core/modules/modZapier.class.php | 2 +- 89 files changed, 92 insertions(+), 91 deletions(-) diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index f048f070366..15710d71dfa 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -28,7 +28,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; /** - * Description and activation class for module accounting expert + * Class to describe and enable double entry accounting module */ class modAccounting extends DolibarrModules { diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 57ec76e319d..2fce081c7b9 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -27,7 +27,7 @@ * \brief Module to manage members of a foundation * \file htdocs/core/modules/modAdherent.class.php * \ingroup member - * \brief File descriptor or module Member + * \brief Description and activation file for the module member */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modAgenda.class.php b/htdocs/core/modules/modAgenda.class.php index 7dd7a801f9d..691828cd9d2 100644 --- a/htdocs/core/modules/modAgenda.class.php +++ b/htdocs/core/modules/modAgenda.class.php @@ -28,7 +28,7 @@ * \brief Module to manage agenda and events * \file htdocs/core/modules/modAgenda.class.php * \ingroup agenda - * \brief File of class to describe and enable/disable module Agenda + * \brief Description and activation file for the module agenda */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modApi.class.php b/htdocs/core/modules/modApi.class.php index aea29d25357..0c6ebeb6f37 100644 --- a/htdocs/core/modules/modApi.class.php +++ b/htdocs/core/modules/modApi.class.php @@ -23,7 +23,7 @@ * \brief Descriptor file for Api modulee * \file htdocs/core/modules/modApi.class.php * \ingroup api - * \brief Description and activation file for module Api + * \brief Description and activation file for the module Api */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modAsset.class.php b/htdocs/core/modules/modAsset.class.php index 5dcb9f6637c..12b58bfcc38 100644 --- a/htdocs/core/modules/modAsset.class.php +++ b/htdocs/core/modules/modAsset.class.php @@ -22,7 +22,7 @@ * * \file htdocs/core/modules/modAsset.class.php * \ingroup asset - * \brief Description and activation file for module Assets + * \brief Description and activation file for the module assets */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modBanque.class.php b/htdocs/core/modules/modBanque.class.php index 66634f4ad55..3a702007ef3 100644 --- a/htdocs/core/modules/modBanque.class.php +++ b/htdocs/core/modules/modBanque.class.php @@ -24,7 +24,7 @@ * \brief Module pour gerer la tenue d'un compte bancaire et rapprochements * \file htdocs/core/modules/modBanque.class.php * \ingroup banque - * \brief Fichier de description et activation du module Banque + * \brief Description and activation file for the module bank */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modBarcode.class.php b/htdocs/core/modules/modBarcode.class.php index a3e2796aed6..fab12a0ae59 100644 --- a/htdocs/core/modules/modBarcode.class.php +++ b/htdocs/core/modules/modBarcode.class.php @@ -22,8 +22,8 @@ * \defgroup barcode Module barcode * \brief Module pour gerer les codes barres * \file htdocs/core/modules/modBarcode.class.php - * \ingroup barcode,produit - * \brief Fichier de description et activation du module Barcode + * \ingroup barcode, product + * \brief Description and activation file for the module barcode */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modBlockedLog.class.php b/htdocs/core/modules/modBlockedLog.class.php index 3f9a6473a82..16f95a5e926 100644 --- a/htdocs/core/modules/modBlockedLog.class.php +++ b/htdocs/core/modules/modBlockedLog.class.php @@ -20,7 +20,7 @@ * \brief Add a log into a block chain for some actions. * \file htdocs/core/modules/modBlockedLog.class.php * \ingroup blockedlog - * \brief Description and activation file for module BlockedLog + * \brief Description and activation file for the module BlockedLog */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modBom.class.php b/htdocs/core/modules/modBom.class.php index b040e4cec99..c303615b377 100644 --- a/htdocs/core/modules/modBom.class.php +++ b/htdocs/core/modules/modBom.class.php @@ -23,7 +23,7 @@ * * \file htdocs/core/modules/modBom.class.php * \ingroup bom - * \brief Description and activation file for module Bom + * \brief Description and activation file for the module Bom */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modBookmark.class.php b/htdocs/core/modules/modBookmark.class.php index e6ac76f0178..7b8d623bc6d 100644 --- a/htdocs/core/modules/modBookmark.class.php +++ b/htdocs/core/modules/modBookmark.class.php @@ -21,7 +21,7 @@ * \brief Module to manage Bookmarks * \file htdocs/core/modules/modBookmark.class.php * \ingroup bookmark - * \brief Fichier de description et activation du module Bookmarks + * \brief Description and activation file for the module Bookmarks */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modCashDesk.class.php b/htdocs/core/modules/modCashDesk.class.php index ca9ffa87d53..8e9ca1131b9 100644 --- a/htdocs/core/modules/modCashDesk.class.php +++ b/htdocs/core/modules/modCashDesk.class.php @@ -20,7 +20,7 @@ * \brief Module to manage points of sale * \file htdocs/core/modules/modCashDesk.class.php * \ingroup pos - * \brief File to enable/disable module Point Of Sales + * \brief Description and activation file for the module Point Of Sales */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index d1f58dd7451..990fdb44bfe 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -23,7 +23,7 @@ * \brief Module to manage categories * \file htdocs/core/modules/modCategorie.class.php * \ingroup category - * \brief Fichier de description et activation du module Categorie + * \brief Description and activation file for the module Category */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; diff --git a/htdocs/core/modules/modClickToDial.class.php b/htdocs/core/modules/modClickToDial.class.php index 80a78aba2e9..f28659bbd5d 100644 --- a/htdocs/core/modules/modClickToDial.class.php +++ b/htdocs/core/modules/modClickToDial.class.php @@ -21,7 +21,7 @@ * \brief Module pour gerer l'appel automatique * \file htdocs/core/modules/modClickToDial.class.php * \ingroup clicktodial - * \brief Fichier de description et activation du module de click to Dial + * \brief Description and activation file for the module Click to Dial */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modCollab.class.php b/htdocs/core/modules/modCollab.class.php index be82722f331..695efd6c3b1 100644 --- a/htdocs/core/modules/modCollab.class.php +++ b/htdocs/core/modules/modCollab.class.php @@ -20,7 +20,7 @@ * \brief Collab module descriptor. * \file htdocs/core/modules/modCollab.class.php * \ingroup collab - * \brief Description and activation file for module Collab + * \brief Description and activation file for the module Collab */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modCommande.class.php b/htdocs/core/modules/modCommande.class.php index 6fa8b730c24..29f4dc60515 100644 --- a/htdocs/core/modules/modCommande.class.php +++ b/htdocs/core/modules/modCommande.class.php @@ -27,7 +27,7 @@ * \brief Module pour gerer le suivi des commandes * \file htdocs/core/modules/modCommande.class.php * \ingroup commande - * \brief Fichier de description et activation du module Commande + * \brief Description and activation file for the module command */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modComptabilite.class.php b/htdocs/core/modules/modComptabilite.class.php index 7ee9fe3c70f..09f6cd85496 100644 --- a/htdocs/core/modules/modComptabilite.class.php +++ b/htdocs/core/modules/modComptabilite.class.php @@ -23,7 +23,7 @@ * \brief Module pour inclure des fonctions de comptabilite (gestion de comptes comptables et rapports) * \file htdocs/core/modules/modComptabilite.class.php * \ingroup comptabilite - * \brief Fichier de description et activation du module Comptabilite + * \brief Description and activation file for the module simple accountancy */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modContrat.class.php b/htdocs/core/modules/modContrat.class.php index 1b927346f1e..f91e54039f4 100644 --- a/htdocs/core/modules/modContrat.class.php +++ b/htdocs/core/modules/modContrat.class.php @@ -22,7 +22,7 @@ * \brief Module pour gerer la tenue de contrat de services * \file htdocs/core/modules/modContrat.class.php * \ingroup contrat - * \brief Fichier de description et activation du module Contrat + * \brief Description and activation file for the module contract */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modCron.class.php b/htdocs/core/modules/modCron.class.php index 95a3dd2c15d..60d713d5fc4 100644 --- a/htdocs/core/modules/modCron.class.php +++ b/htdocs/core/modules/modCron.class.php @@ -21,7 +21,7 @@ * \brief cron module descriptor. * \file htdocs/core/modules/modCron.class.php * \ingroup cron - * \brief Description and activation file for module Jobs + * \brief Description and activation file for the module Jobs */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modDataPolicy.class.php b/htdocs/core/modules/modDataPolicy.class.php index 8c7cb2c4275..0e2027494e7 100644 --- a/htdocs/core/modules/modDataPolicy.class.php +++ b/htdocs/core/modules/modDataPolicy.class.php @@ -23,7 +23,7 @@ * * \file htdocs/core/modules/modDataPolicy.class.php * \ingroup datapolicy - * \brief Description and activation file for module DATAPOLICY + * \brief Description and activation file for the module datapolicy */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modDav.class.php b/htdocs/core/modules/modDav.class.php index d581ce539c2..09f7d814553 100644 --- a/htdocs/core/modules/modDav.class.php +++ b/htdocs/core/modules/modDav.class.php @@ -21,7 +21,7 @@ * * \file htdocs/core/modules/modDav.class.php * \ingroup dav - * \brief Description and activation file for module dav + * \brief Description and activation file for the module dav */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modDebugBar.class.php b/htdocs/core/modules/modDebugBar.class.php index 4d38e848bbe..1b591f02da1 100644 --- a/htdocs/core/modules/modDebugBar.class.php +++ b/htdocs/core/modules/modDebugBar.class.php @@ -21,7 +21,7 @@ * * \file htdocs/core/modules/modDebugBar.class.php * \ingroup debugbar - * \brief Description and activation file for module debugbar + * \brief Description and activation file for the module debugbar */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modDeplacement.class.php b/htdocs/core/modules/modDeplacement.class.php index 860a9c8ab7e..0f92e8a7e6c 100644 --- a/htdocs/core/modules/modDeplacement.class.php +++ b/htdocs/core/modules/modDeplacement.class.php @@ -21,7 +21,7 @@ * \brief Module pour gerer les deplacements et notes de frais * \file htdocs/core/modules/modDeplacement.class.php * \ingroup deplacement - * \brief Fichier de description et activation du module Deplacement et notes de frais + * \brief Description and activation file for the module trips (deprecated) */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modDocumentGeneration.class.php b/htdocs/core/modules/modDocumentGeneration.class.php index 2c2c2ed1888..466523e7f81 100644 --- a/htdocs/core/modules/modDocumentGeneration.class.php +++ b/htdocs/core/modules/modDocumentGeneration.class.php @@ -22,7 +22,7 @@ * \brief Module pour gerer des generations de documents * \file htdocs/core/modules/modDocumentGeneration.class.php * \ingroup document - * \brief Fichier de description et activation du module Generation document + * \brief Description and activation file for the module Generation document */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modDon.class.php b/htdocs/core/modules/modDon.class.php index 64d9c045ad1..7d8a8fc9455 100644 --- a/htdocs/core/modules/modDon.class.php +++ b/htdocs/core/modules/modDon.class.php @@ -23,7 +23,7 @@ * \brief Module to manage the follow-up of the donations * \file htdocs/core/modules/modDon.class.php * \ingroup donations - * \brief Description and activation file for module Donation + * \brief Description and activation file for the module Donation */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modDynamicPrices.class.php b/htdocs/core/modules/modDynamicPrices.class.php index fc4863e1280..23a0f892014 100644 --- a/htdocs/core/modules/modDynamicPrices.class.php +++ b/htdocs/core/modules/modDynamicPrices.class.php @@ -20,7 +20,7 @@ * \brief Module to manage dynamic prices in products * \file htdocs/core/modules/modDynamicPrices.class.php * \ingroup produit - * \brief File to describe module to manage dynamic prices in products + * \brief Description and activation file for the module to manage dynamic prices in products */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modECM.class.php b/htdocs/core/modules/modECM.class.php index 222e50c76e0..8b846089a03 100644 --- a/htdocs/core/modules/modECM.class.php +++ b/htdocs/core/modules/modECM.class.php @@ -20,7 +20,7 @@ * \brief Module for ECM (Electronic Content Management) * \file htdocs/core/modules/modECM.class.php * \ingroup ecm - * \brief Description and activation file for module ECM + * \brief Description and activation file for the module ECM */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modEmailCollector.class.php b/htdocs/core/modules/modEmailCollector.class.php index bb76d2f0c1e..53223ecd705 100644 --- a/htdocs/core/modules/modEmailCollector.class.php +++ b/htdocs/core/modules/modEmailCollector.class.php @@ -21,7 +21,7 @@ * * \file htdocs/core/modules/modEmailCollector.class.php * \ingroup emailcollector - * \brief Description and activation file for module emailcollector + * \brief Description and activation file for the module emailcollector */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modEventOrganization.class.php b/htdocs/core/modules/modEventOrganization.class.php index 4f25993d9a1..386da21d798 100644 --- a/htdocs/core/modules/modEventOrganization.class.php +++ b/htdocs/core/modules/modEventOrganization.class.php @@ -21,7 +21,7 @@ * * \file htdocs/eventorganization/core/modules/modEventOrganization.class.php * \ingroup eventorganization - * \brief Description and activation file for module EventOrganization + * \brief Description and activation file for the EventOrganization */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php index b4bac22fd1a..ba8568ba13e 100644 --- a/htdocs/core/modules/modExpedition.class.php +++ b/htdocs/core/modules/modExpedition.class.php @@ -24,7 +24,7 @@ * \brief Module pour gerer les expeditions de produits * \file htdocs/core/modules/modExpedition.class.php * \ingroup expedition - * \brief Fichier de description et activation du module Expedition + * \brief Description and activation file for the module Expedition */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modExpenseReport.class.php b/htdocs/core/modules/modExpenseReport.class.php index dca32b4fad7..f727247a831 100644 --- a/htdocs/core/modules/modExpenseReport.class.php +++ b/htdocs/core/modules/modExpenseReport.class.php @@ -21,7 +21,7 @@ * \brief Module to manage expense report. Replace old module Deplacement. * \file htdocs/core/modules/modExpenseReport.class.php * \ingroup expensereport - * \brief Description and activation file for module ExpenseReport + * \brief Description and activation file for the module ExpenseReport */ include_once DOL_DOCUMENT_ROOT."/core/modules/DolibarrModules.class.php"; diff --git a/htdocs/core/modules/modExport.class.php b/htdocs/core/modules/modExport.class.php index 037283b1715..6a47b7b74fd 100644 --- a/htdocs/core/modules/modExport.class.php +++ b/htdocs/core/modules/modExport.class.php @@ -21,7 +21,7 @@ * \brief Module generique pour realiser des exports de donnees en base * \file htdocs/core/modules/modExport.class.php * \ingroup export - * \brief Fichier de description et activation du module export + * \brief Description and activation file for the module export */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modExternalRss.class.php b/htdocs/core/modules/modExternalRss.class.php index 241207998aa..6ca023a65a8 100644 --- a/htdocs/core/modules/modExternalRss.class.php +++ b/htdocs/core/modules/modExternalRss.class.php @@ -21,7 +21,7 @@ * \brief Module pour inclure des informations externes RSS * \file htdocs/core/modules/modExternalRss.class.php * \ingroup externalrss - * \brief Fichier de description et activation du module externalrss + * \brief Description and activation file for the module externalrss */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modExternalSite.class.php b/htdocs/core/modules/modExternalSite.class.php index 42c60067aa8..a996a55ddaa 100644 --- a/htdocs/core/modules/modExternalSite.class.php +++ b/htdocs/core/modules/modExternalSite.class.php @@ -22,7 +22,7 @@ * \brief Module to include an external web site/tools into Dolibarr menu and into a frame page. * \file htdocs/core/modules/modExternalSite.class.php * \ingroup externalsite - * \brief Description and activation file for module ExternalSite + * \brief Description and activation file for the module ExternalSite */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modFTP.class.php b/htdocs/core/modules/modFTP.class.php index 52944961379..3e2ccd7d049 100644 --- a/htdocs/core/modules/modFTP.class.php +++ b/htdocs/core/modules/modFTP.class.php @@ -21,7 +21,7 @@ * \brief Module for FTP client module * \file htdocs/core/modules/modFTP.class.php * \ingroup ftp - * \brief Description and activation file for module FTP + * \brief Description and activation file for the module FTP */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index eed92413c8a..efa3aeea536 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -20,11 +20,11 @@ */ /** - * \defgroup facture Module invoices - * \brief Module pour gerer les factures clients et/ou fournisseurs + * \defgroup facture Module customer invoices + * \brief Module to manage customer invoices * \file htdocs/core/modules/modFacture.class.php * \ingroup facture - * \brief Fichier de la classe de description et activation du module Facture + * \brief Description and activation file for the module customer invoices */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modFckeditor.class.php b/htdocs/core/modules/modFckeditor.class.php index f93e08c1872..7742051989e 100644 --- a/htdocs/core/modules/modFckeditor.class.php +++ b/htdocs/core/modules/modFckeditor.class.php @@ -22,7 +22,7 @@ * \brief Module pour mettre en page les zones de saisie de texte * \file htdocs/core/modules/modFckeditor.class.php * \ingroup fckeditor - * \brief Fichier de description et activation du module Fckeditor + * \brief Description and activation file for the module Fckeditor */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modFicheinter.class.php b/htdocs/core/modules/modFicheinter.class.php index 9364b75d9f7..af99e6f646f 100644 --- a/htdocs/core/modules/modFicheinter.class.php +++ b/htdocs/core/modules/modFicheinter.class.php @@ -25,7 +25,7 @@ * \brief Module to manage intervention cards * \file htdocs/core/modules/modFicheinter.class.php * \ingroup ficheinter - * \brief Fichier de description et activation du module Ficheinter + * \brief Description and activation file for the module Ficheinter */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index 040bcfbd5bd..46d6dd7bead 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -24,7 +24,7 @@ * \defgroup fournisseur Module suppliers * \file htdocs/core/modules/modFournisseur.class.php * \ingroup fournisseur - * \brief Description and activation file for module Supplier + * \brief Description and activation file for the module Supplier */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modGeoIPMaxmind.class.php b/htdocs/core/modules/modGeoIPMaxmind.class.php index 06438eefab8..41c3d8517d8 100644 --- a/htdocs/core/modules/modGeoIPMaxmind.class.php +++ b/htdocs/core/modules/modGeoIPMaxmind.class.php @@ -20,7 +20,7 @@ * \brief Module to make geoip conversions * \file htdocs/core/modules/modGeoIPMaxmind.class.php * \ingroup geoip - * \brief File of geoipmaxmind module descriptor + * \brief Description and activation file for the module geoipmaxmind */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modGravatar.class.php b/htdocs/core/modules/modGravatar.class.php index a7d8899b0c2..74ad1566e82 100644 --- a/htdocs/core/modules/modGravatar.class.php +++ b/htdocs/core/modules/modGravatar.class.php @@ -21,7 +21,7 @@ * \brief Module to use Gravatar to show photo of users * \file htdocs/core/modules/modGravatar.class.php * \ingroup gravatar - * \brief Description and activation file for module Gravatar + * \brief Description and activation file for the module Gravatar */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modHRM.class.php b/htdocs/core/modules/modHRM.class.php index edaa872a369..25f04726fd6 100644 --- a/htdocs/core/modules/modHRM.class.php +++ b/htdocs/core/modules/modHRM.class.php @@ -18,7 +18,7 @@ /** * \file htdocs/core/modules/modHRM.class.php * \ingroup HRM - * \brief Description and activation file for module HRM + * \brief Description and activation file for the module HRM */ include_once DOL_DOCUMENT_ROOT."/core/modules/DolibarrModules.class.php"; diff --git a/htdocs/core/modules/modHoliday.class.php b/htdocs/core/modules/modHoliday.class.php index 3fa92d8a7c5..8f40e698dcb 100644 --- a/htdocs/core/modules/modHoliday.class.php +++ b/htdocs/core/modules/modHoliday.class.php @@ -26,7 +26,7 @@ * \brief Module de gestion des congés * \file htdocs/core/modules/modHoliday.class.php * \ingroup holiday - * \brief Description and activation file for module holiday + * \brief Description and activation file for the module holiday */ include_once DOL_DOCUMENT_ROOT."/core/modules/DolibarrModules.class.php"; diff --git a/htdocs/core/modules/modImport.class.php b/htdocs/core/modules/modImport.class.php index d2a636e2ca6..b70806af82a 100644 --- a/htdocs/core/modules/modImport.class.php +++ b/htdocs/core/modules/modImport.class.php @@ -21,7 +21,7 @@ * \brief Module to make generic import of data into dolibarr database * \file htdocs/core/modules/modImport.class.php * \ingroup import - * \brief Fichier de description et activation du module Import + * \brief Description and activation file for the module Import */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modIncoterm.class.php b/htdocs/core/modules/modIncoterm.class.php index c73eab77c7d..a7a260dba6e 100644 --- a/htdocs/core/modules/modIncoterm.class.php +++ b/htdocs/core/modules/modIncoterm.class.php @@ -22,7 +22,7 @@ * * \file htdocs/core/modules/modIncoterm.class.php * \ingroup incoterm - * \brief Description and activation file for module MyModule + * \brief Description and activation file for the module MyModule */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modIntracommreport.class.php b/htdocs/core/modules/modIntracommreport.class.php index 36a4ced8380..077f51ab519 100644 --- a/htdocs/core/modules/modIntracommreport.class.php +++ b/htdocs/core/modules/modIntracommreport.class.php @@ -21,7 +21,7 @@ /** * \file htdocs/core/modules/modIntracommreport.class.php * \ingroup Intracomm report - * \brief Module to activate intracomm report module + * \brief Description and activation file for the module intracomm report */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modLabel.class.php b/htdocs/core/modules/modLabel.class.php index 58e735666ab..8c8756c60c7 100644 --- a/htdocs/core/modules/modLabel.class.php +++ b/htdocs/core/modules/modLabel.class.php @@ -21,7 +21,7 @@ * \brief Module pour gerer les formats d'impression des etiquettes * \file htdocs/core/modules/modLabel.class.php * \ingroup other - * \brief Fichier de description et activation du module Label + * \brief Description and activation file for the module Labels */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modLdap.class.php b/htdocs/core/modules/modLdap.class.php index 8e3463ff4d4..0774f71a583 100644 --- a/htdocs/core/modules/modLdap.class.php +++ b/htdocs/core/modules/modLdap.class.php @@ -22,7 +22,7 @@ * \brief Module to manage LDAP interfaces with contacts or users * \file htdocs/core/modules/modLdap.class.php * \ingroup ldap - * \brief File to describe and activate Ldap module + * \brief Description and activation file for the module LDAP */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modLoan.class.php b/htdocs/core/modules/modLoan.class.php index d45987e840d..30aa547cb3a 100644 --- a/htdocs/core/modules/modLoan.class.php +++ b/htdocs/core/modules/modLoan.class.php @@ -21,7 +21,7 @@ * \brief Module to include loans management * \file htdocs/core/modules/modLoan.class.php * \ingroup loan - * \brief File to activate module loan + * \brief Description and activation file for the module loan */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modMailing.class.php b/htdocs/core/modules/modMailing.class.php index 1db638e782f..9d590631fe4 100644 --- a/htdocs/core/modules/modMailing.class.php +++ b/htdocs/core/modules/modMailing.class.php @@ -22,7 +22,7 @@ * \brief Module to manage EMailings * \file htdocs/core/modules/modMailing.class.php * \ingroup mailing - * \brief Fichier de description et activation du module Mailing + * \brief Description and activation file for the module Mailing */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modMailmanSpip.class.php b/htdocs/core/modules/modMailmanSpip.class.php index bfd2e25493a..2a8d97484e7 100644 --- a/htdocs/core/modules/modMailmanSpip.class.php +++ b/htdocs/core/modules/modMailmanSpip.class.php @@ -21,7 +21,7 @@ * \brief Module to manage mailman and spip * \file htdocs/core/modules/modMailmanSpip.class.php * \ingroup mailmanspip - * \brief Fichier de description et activation du module de click to Dial + * \brief Description and activation file for the module mailmanspip */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modMargin.class.php b/htdocs/core/modules/modMargin.class.php index 185a86a86aa..cb7b4d5e602 100644 --- a/htdocs/core/modules/modMargin.class.php +++ b/htdocs/core/modules/modMargin.class.php @@ -20,7 +20,7 @@ * \brief Module to manage margins * \file htdocs/core/modules/modMargin.class.php * \ingroup margin - * \brief Description and activation file for module Margin + * \brief Description and activation file for the module Margin */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modModuleBuilder.class.php b/htdocs/core/modules/modModuleBuilder.class.php index 6060186a746..99c32e48bbd 100644 --- a/htdocs/core/modules/modModuleBuilder.class.php +++ b/htdocs/core/modules/modModuleBuilder.class.php @@ -21,7 +21,7 @@ * \brief Add a log into a block chain for some actions. * \file htdocs/core/modules/modBlockedLog.class.php * \ingroup blockedlog - * \brief Description and activation file for module ModuleBuilder + * \brief Description and activation file for the module ModuleBuilder */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modMrp.class.php b/htdocs/core/modules/modMrp.class.php index c073476efcb..0a4a7592a20 100644 --- a/htdocs/core/modules/modMrp.class.php +++ b/htdocs/core/modules/modMrp.class.php @@ -24,7 +24,7 @@ * * \file htdocs/core/modules/modMrp.class.php * \ingroup mrp - * \brief Description and activation file for module Mrp + * \brief Description and activation file for the module Mrp */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modMultiCurrency.class.php b/htdocs/core/modules/modMultiCurrency.class.php index f281c99dc37..6b05fe068aa 100644 --- a/htdocs/core/modules/modMultiCurrency.class.php +++ b/htdocs/core/modules/modMultiCurrency.class.php @@ -23,7 +23,7 @@ * \brief Handle multiple currencies on company/propal/orders ... * \file htdocs/core/modules/modMultiCurrency.class.php * \ingroup multicurrency - * \brief Description and activation file for module MultiCurrency + * \brief Description and activation file for the module MultiCurrency */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modNotification.class.php b/htdocs/core/modules/modNotification.class.php index f9191ce3c8d..e124b8304f3 100644 --- a/htdocs/core/modules/modNotification.class.php +++ b/htdocs/core/modules/modNotification.class.php @@ -21,7 +21,7 @@ * \brief Module pour gerer les notifications (par mail ou autre) * \file htdocs/core/modules/modNotification.class.php * \ingroup notification - * \brief Fichier de description et activation du module Notification + * \brief Description and activation file for the module Notification */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modOauth.class.php b/htdocs/core/modules/modOauth.class.php index 1faf3455129..f66ba404c7e 100644 --- a/htdocs/core/modules/modOauth.class.php +++ b/htdocs/core/modules/modOauth.class.php @@ -23,7 +23,7 @@ /** * \file htdocs/core/modules/modOauth.class.php * \ingroup oauth - * \brief File of class to describe and activate module Oauth + * \brief Description and activation file for the module Oauth */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modOpenSurvey.class.php b/htdocs/core/modules/modOpenSurvey.class.php index 2c01672ac42..87a4f453801 100644 --- a/htdocs/core/modules/modOpenSurvey.class.php +++ b/htdocs/core/modules/modOpenSurvey.class.php @@ -21,7 +21,7 @@ * \brief Module to OpenSurvey integration. * \file htdocs/core/modules/modOpenSurvey.class.php * \ingroup opensurvey - * \brief Description and activation file for module OpenSurvey + * \brief Description and activation file for the module OpenSurvey */ include_once DOL_DOCUMENT_ROOT."/core/modules/DolibarrModules.class.php"; diff --git a/htdocs/core/modules/modPaybox.class.php b/htdocs/core/modules/modPaybox.class.php index 1dfe76f471a..3da6ddfb695 100644 --- a/htdocs/core/modules/modPaybox.class.php +++ b/htdocs/core/modules/modPaybox.class.php @@ -21,7 +21,7 @@ * \brief Add integration with Paybox online payment system. * \file htdocs/core/modules/modPaybox.class.php * \ingroup paybox - * \brief Description and activation file for module Paybox + * \brief Description and activation file for the module Paybox */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modPaymentByBankTransfer.class.php b/htdocs/core/modules/modPaymentByBankTransfer.class.php index 5704badf854..6b51e25cdc2 100644 --- a/htdocs/core/modules/modPaymentByBankTransfer.class.php +++ b/htdocs/core/modules/modPaymentByBankTransfer.class.php @@ -23,7 +23,7 @@ * \brief Module to manage payment by bank transfer * \file htdocs/core/modules/modPaymentByBankTransfer.class.php * \ingroup paymentbybanktransfer - * \brief File to describe and activate the module PaymentByBankTransfer + * \brief Description and activation file for the module PaymentByBankTransfer */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modPaypal.class.php b/htdocs/core/modules/modPaypal.class.php index 82490dc0c4b..0ebb577e48b 100644 --- a/htdocs/core/modules/modPaypal.class.php +++ b/htdocs/core/modules/modPaypal.class.php @@ -22,7 +22,7 @@ * \brief Add integration with Paypal online payment system. * \file htdocs/core/modules/modPaypal.class.php * \ingroup paypal - * \brief Description and activation file for module Paypal + * \brief Description and activation file for the module Paypal */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modPrelevement.class.php b/htdocs/core/modules/modPrelevement.class.php index 4bee933376f..8d68b372e91 100644 --- a/htdocs/core/modules/modPrelevement.class.php +++ b/htdocs/core/modules/modPrelevement.class.php @@ -23,7 +23,7 @@ * \brief Module to manage Direct debit orders * \file htdocs/core/modules/modPrelevement.class.php * \ingroup prelevement - * \brief File to describe and enable the module Prelevement + * \brief Description and activation file for the module Prelevement */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modPrinting.class.php b/htdocs/core/modules/modPrinting.class.php index 373ca131d2b..4c104b30ecf 100644 --- a/htdocs/core/modules/modPrinting.class.php +++ b/htdocs/core/modules/modPrinting.class.php @@ -23,7 +23,7 @@ /** * \file htdocs/core/modules/modPrinting.class.php * \ingroup printing - * \brief File of class to describe and activate module Direct Printing + * \brief Description and activation file for the module Direct Printing */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index 2bd42d64e11..2599f2f19fb 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -28,7 +28,7 @@ * \brief Module to manage catalog of predefined products * \file htdocs/core/modules/modProduct.class.php * \ingroup produit - * \brief File to describe module to manage catalog of predefined products + * \brief Description and activation file for the module to manage catalog of predefined products */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modProductBatch.class.php b/htdocs/core/modules/modProductBatch.class.php index 3da2523ad40..166b8f6e637 100644 --- a/htdocs/core/modules/modProductBatch.class.php +++ b/htdocs/core/modules/modProductBatch.class.php @@ -23,7 +23,7 @@ * \brief Management module for batch number, eat-by and sell-by date for product * \file htdocs/core/modules/modProductBatch.class.php * \ingroup productbatch - * \brief Description and activation file for module productbatch + * \brief Description and activation file for the module productbatch */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index ff135a74d1d..25448f239e6 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -26,7 +26,7 @@ * \brief Module to create projects/tasks/gantt diagram. Projects can them be affected to tasks. * \file htdocs/core/modules/modProjet.class.php * \ingroup projet - * \brief Fichier de description et activation du module Projet + * \brief Description and activation file for the module project */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modPropale.class.php b/htdocs/core/modules/modPropale.class.php index a1f52bbd906..687d8ea3669 100644 --- a/htdocs/core/modules/modPropale.class.php +++ b/htdocs/core/modules/modPropale.class.php @@ -26,7 +26,7 @@ * \brief Module pour gerer la tenue de propositions commerciales * \file htdocs/core/modules/modPropale.class.php * \ingroup propale - * \brief Fichier de description et activation du module Propale + * \brief Description and activation file for the module customer proposal */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modReceiptPrinter.class.php b/htdocs/core/modules/modReceiptPrinter.class.php index fe95a89d9ce..4fe437700e4 100644 --- a/htdocs/core/modules/modReceiptPrinter.class.php +++ b/htdocs/core/modules/modReceiptPrinter.class.php @@ -23,7 +23,7 @@ /** * \file htdocs/core/modules/modReceiptPrinter.class.php * \ingroup printing - * \brief File of class to describe and activate module Receipt Printer + * \brief Description and activation file for the module Receipt Printer */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modReception.class.php b/htdocs/core/modules/modReception.class.php index 17f765d2caf..247a4faeddc 100644 --- a/htdocs/core/modules/modReception.class.php +++ b/htdocs/core/modules/modReception.class.php @@ -20,7 +20,7 @@ * \brief Module pour gerer les réceptions de produits * \file htdocs/core/modules/modReception.class.php * \ingroup reception - * \brief Fichier de description et activation du module Reception + * \brief Description and activation file for the module Reception */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modRecruitment.class.php b/htdocs/core/modules/modRecruitment.class.php index 2a3d36c46bb..f7cd37c16be 100644 --- a/htdocs/core/modules/modRecruitment.class.php +++ b/htdocs/core/modules/modRecruitment.class.php @@ -23,7 +23,7 @@ * * \file htdocs/recruitment/core/modules/modRecruitment.class.php * \ingroup recruitment - * \brief Description and activation file for module Recruitment + * \brief Description and activation file for the module Recruitment */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modResource.class.php b/htdocs/core/modules/modResource.class.php index ee3836cde26..6f2d3f8d409 100644 --- a/htdocs/core/modules/modResource.class.php +++ b/htdocs/core/modules/modResource.class.php @@ -23,7 +23,7 @@ * \brief Resource module descriptor. * \file core/modules/modResource.class.php * \ingroup resource - * \brief Description and activation file for module Resource + * \brief Description and activation file for the module Resource */ include_once DOL_DOCUMENT_ROOT."/core/modules/DolibarrModules.class.php"; diff --git a/htdocs/core/modules/modSalaries.class.php b/htdocs/core/modules/modSalaries.class.php index 131b0f2945f..759804b409e 100644 --- a/htdocs/core/modules/modSalaries.class.php +++ b/htdocs/core/modules/modSalaries.class.php @@ -27,7 +27,7 @@ * \brief Module to include salaries management * \file htdocs/core/modules/modSalaries.class.php * \ingroup salaries - * \brief File to activate module salaries + * \brief Description and activation file for the module salaries */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modService.class.php b/htdocs/core/modules/modService.class.php index 6009af638fb..13ff4618483 100644 --- a/htdocs/core/modules/modService.class.php +++ b/htdocs/core/modules/modService.class.php @@ -25,7 +25,7 @@ * \brief Module pour gerer le suivi de services predefinis * \file htdocs/core/modules/modService.class.php * \ingroup service - * \brief Fichier de description et activation du module Service + * \brief Description and activation file for the module Service */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modSocialNetworks.class.php b/htdocs/core/modules/modSocialNetworks.class.php index 368634083ee..3949de6c691 100644 --- a/htdocs/core/modules/modSocialNetworks.class.php +++ b/htdocs/core/modules/modSocialNetworks.class.php @@ -21,7 +21,7 @@ * \brief Add a SocialNetworks button. * \file htdocs/core/modules/modSocialNetworks.class.php * \ingroup socialnetworks - * \brief Description and activation file for module SocialNetworks + * \brief Description and activation file for the module SocialNetworks */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 9151673f996..38ca03ffe3b 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -25,7 +25,7 @@ * \brief Module to manage third parties (customers, prospects) * \file htdocs/core/modules/modSociete.class.php * \ingroup societe - * \brief Fichier de description et activation du module Societe + * \brief Description and activation file for the module societe (thirdparty) */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modStock.class.php b/htdocs/core/modules/modStock.class.php index ffa80d9a748..3d46d606265 100644 --- a/htdocs/core/modules/modStock.class.php +++ b/htdocs/core/modules/modStock.class.php @@ -23,7 +23,7 @@ * \brief Module pour gerer la tenue de stocks produits * \file htdocs/core/modules/modStock.class.php * \ingroup stock - * \brief Fichier de description et activation du module Stock + * \brief Description and activation file for the module Stock */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modStripe.class.php b/htdocs/core/modules/modStripe.class.php index 2cf80fc9f60..2677d3e3fa3 100644 --- a/htdocs/core/modules/modStripe.class.php +++ b/htdocs/core/modules/modStripe.class.php @@ -21,7 +21,7 @@ * \brief Add integration with Stripe online payment system. * \file htdocs/core/modules/modStripe.class.php * \ingroup stripe - * \brief Description and activation file for module Stripe + * \brief Description and activation file for the module Stripe */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modSupplierProposal.class.php b/htdocs/core/modules/modSupplierProposal.class.php index d86e06629f3..4a0fc21fa44 100644 --- a/htdocs/core/modules/modSupplierProposal.class.php +++ b/htdocs/core/modules/modSupplierProposal.class.php @@ -26,7 +26,7 @@ * * \file htdocs/core/modules/modSupplierProposal.class.php * \ingroup supplier_proposal - * \brief File to describe and activate module SupplierProposal + * \brief Description and activation file for the module supplier proposal */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modSyslog.class.php b/htdocs/core/modules/modSyslog.class.php index d003108726e..1d85dc2115d 100644 --- a/htdocs/core/modules/modSyslog.class.php +++ b/htdocs/core/modules/modSyslog.class.php @@ -21,7 +21,7 @@ * \brief Module pour gerer les messages d'erreur dans syslog * \file htdocs/core/modules/modSyslog.class.php * \ingroup syslog - * \brief Fichier de description et activation du module de syslog + * \brief Description and activation file for the module syslog */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modTakePos.class.php b/htdocs/core/modules/modTakePos.class.php index b4fbb1f2e97..d34213f062c 100644 --- a/htdocs/core/modules/modTakePos.class.php +++ b/htdocs/core/modules/modTakePos.class.php @@ -22,7 +22,7 @@ * * \file htdocs/core/modules/modTakePos.class.php * \ingroup takepos - * \brief Description and activation file for module TakePos + * \brief Description and activation file for the module TakePos */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modTax.class.php b/htdocs/core/modules/modTax.class.php index bf064d743f8..222b1c775c1 100644 --- a/htdocs/core/modules/modTax.class.php +++ b/htdocs/core/modules/modTax.class.php @@ -25,7 +25,7 @@ * \brief Module pour inclure des fonctions de saisies des taxes (tva) et charges sociales * \file htdocs/core/modules/modTax.class.php * \ingroup tax - * \brief Fichier de description et activation du module Taxe + * \brief Description and activation file for the module taxes */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modTicket.class.php b/htdocs/core/modules/modTicket.class.php index e186f5fdc1c..a1318266334 100644 --- a/htdocs/core/modules/modTicket.class.php +++ b/htdocs/core/modules/modTicket.class.php @@ -22,7 +22,7 @@ * \brief Module for ticket and request management. * \file core/modules/modTicket.class.php * \ingroup ticket - * \brief Description and activation file for module Ticket + * \brief Description and activation file for the module Ticket */ require_once DOL_DOCUMENT_ROOT."/core/modules/DolibarrModules.class.php"; diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php index 4c1a6bcfded..e84998635ff 100644 --- a/htdocs/core/modules/modUser.class.php +++ b/htdocs/core/modules/modUser.class.php @@ -22,7 +22,7 @@ * \brief Module pour gerer les utilisateurs * \file htdocs/core/modules/modUser.class.php * \ingroup user - * \brief Fichier de description et activation du module Utilisateur + * \brief Description and activation file for the module users */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modVariants.class.php b/htdocs/core/modules/modVariants.class.php index 22953321fbe..a6c88afc03d 100644 --- a/htdocs/core/modules/modVariants.class.php +++ b/htdocs/core/modules/modVariants.class.php @@ -24,6 +24,7 @@ * \brief Module to manage product combinations based on product attributes * \file htdocs/core/modules/modVariants.class.php * \ingroup produit + * \brief Description and activation file for the module product variants */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modWebServices.class.php b/htdocs/core/modules/modWebServices.class.php index a6362a175cc..a88db3dee26 100644 --- a/htdocs/core/modules/modWebServices.class.php +++ b/htdocs/core/modules/modWebServices.class.php @@ -20,7 +20,7 @@ * \brief Module to enable the Dolibarr server of web services * \file htdocs/core/modules/modWebServices.class.php * \ingroup webservices - * \brief File to describe webservices module + * \brief Description and activation file for the module webservices */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modWebServicesClient.class.php b/htdocs/core/modules/modWebServicesClient.class.php index b59e6cb9e13..d44d48ef13a 100644 --- a/htdocs/core/modules/modWebServicesClient.class.php +++ b/htdocs/core/modules/modWebServicesClient.class.php @@ -20,7 +20,7 @@ * \brief Module to enable client for supplier WebServices * \file htdocs/core/modules/modWebServicesClient.class.php * \ingroup webservices - * \brief File to describe client for supplier webservices module + * \brief Description and activation file for the module supplier webservices module */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modWebsite.class.php b/htdocs/core/modules/modWebsite.class.php index f16a29728be..5bb9e524bc3 100644 --- a/htdocs/core/modules/modWebsite.class.php +++ b/htdocs/core/modules/modWebsite.class.php @@ -20,7 +20,7 @@ * \brief website module descriptor. * \file htdocs/core/modules/modWebsite.class.php * \ingroup websites - * \brief Description and activation file for module Website + * \brief Description and activation file for the module Website */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modWorkflow.class.php b/htdocs/core/modules/modWorkflow.class.php index 539fd7a76d2..fbf7927ed1c 100644 --- a/htdocs/core/modules/modWorkflow.class.php +++ b/htdocs/core/modules/modWorkflow.class.php @@ -21,7 +21,7 @@ * \brief Workflow management * \file htdocs/core/modules/modWorkflow.class.php * \ingroup workflow - * \brief File to describe and activate module Workflow + * \brief Description and activation file for the module Workflow */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modWorkstation.class.php b/htdocs/core/modules/modWorkstation.class.php index ade029b1233..02f5e059297 100755 --- a/htdocs/core/modules/modWorkstation.class.php +++ b/htdocs/core/modules/modWorkstation.class.php @@ -24,7 +24,7 @@ * * \file htdocs/workstation/core/modules/modWorkstation.class.php * \ingroup workstation - * \brief Description and activation file for module Workstation + * \brief Description and activation file for the module Workstation */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modZapier.class.php b/htdocs/core/modules/modZapier.class.php index 697fa489443..816e9cca072 100644 --- a/htdocs/core/modules/modZapier.class.php +++ b/htdocs/core/modules/modZapier.class.php @@ -21,7 +21,7 @@ * * \file htdocs/core/modules/modZapier.class.php * \ingroup zapier - * \brief Description and activation file for module Zapier + * \brief Description and activation file for the module Zapier */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; From cb71936ccd9323a57906f1292e0c6aa71b696aa8 Mon Sep 17 00:00:00 2001 From: daraelmin Date: Sat, 20 Mar 2021 14:10:56 +0100 Subject: [PATCH 05/20] #Fix #16767 unremovable attached file in mailmodel #Fix #16767 make default attached file of a mail model selected removable --- htdocs/core/class/html.formmail.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index faf7ecaf3d8..8f8f8e665f7 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -417,7 +417,7 @@ class FormMail extends Form $listofmimes = array(); $keytoavoidconflict = empty($this->trackid) ? '' : '-'.$this->trackid; // this->trackid must be defined - if (GETPOST('mode', 'alpha') == 'init' || (GETPOST('modelmailselected', 'alpha') && GETPOST('modelmailselected', 'alpha') != '-1')) { + if (GETPOST('mode', 'alpha') == 'init' || (GETPOST('modelselected') && GETPOST('modelmailselected', 'alpha') && GETPOST('modelmailselected', 'alpha') != '-1')) { if (!empty($arraydefaultmessage->joinfiles) && is_array($this->param['fileinit'])) { foreach ($this->param['fileinit'] as $file) { $this->add_attached_files($file, basename($file), dol_mimetype($file)); From 8df083c95537967278af88bfeb34717be0312094 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Mar 2021 18:43:44 +0100 Subject: [PATCH 06/20] Look and feel v14 --- ChangeLog | 4 +- htdocs/user/info.php | 2 + htdocs/user/notify/card.php | 268 ++++++++++++++++++++---------------- 3 files changed, 151 insertions(+), 123 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7537a891c9b..d4a8b55625f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,8 +19,8 @@ WARNING: Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: * The ICS value for direct debit or credit transfer is now store on each bank account instead of into the global setup. * API /setup/shipment_methods has been replaced with API /setup/shipping_methods -* Field "tva" renamed into "total_tva" in llx_propal, llx_supplier_proposal, llx_commande, llx_commande_fournisseur for better field name consistency -* Field "total" renamed into "total_ttc" in llx_propal, llx_supplier_proposal for better field name consistency +* Field "tva" renamed into "total_tva" for table llx_propal, llx_supplier_proposal, llx_commande, llx_commande_fournisseur for better field name consistency +* Field "total" renamed into "total_ttc" for table lx_propal, llx_supplier_proposal for better field name consistency * If your database is PostgreSql, you must use version 9.1.0 or more (Dolibarr need the SQL function CONCAT) * If your database is MySql or MariaDB, you need at least version 5.1 diff --git a/htdocs/user/info.php b/htdocs/user/info.php index 74b7e70e582..f6a0c731e14 100644 --- a/htdocs/user/info.php +++ b/htdocs/user/info.php @@ -32,6 +32,8 @@ $langs->load("users"); // Security check $id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); + $object = new User($db); if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref, '', 1); diff --git a/htdocs/user/notify/card.php b/htdocs/user/notify/card.php index fa2cf5a5d41..228bbd7882e 100644 --- a/htdocs/user/notify/card.php +++ b/htdocs/user/notify/card.php @@ -32,9 +32,11 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/triggers/interface_50_modNotification_Notification.class.php'; // Load translation files required by page -$langs->loadLangs(array('companies', 'mails', 'admin', 'other')); +$langs->loadLangs(array('companies', 'mails', 'admin', 'other', 'errors')); $id = GETPOST("id", 'int'); +$ref = GETPOST('ref', 'alpha'); + $action = GETPOST('action', 'aZ09'); $actionid = GETPOST('actionid'); @@ -63,11 +65,24 @@ $pagenext = $page + 1; $now = dol_now(); +// Security check +$object = new User($db); +if ($id > 0 || !empty($ref)) { + $result = $object->fetch($id, $ref, '', 1); + $object->getrights(); +} + +$permissiontoadd = (($object->id == $user->id) || (!empty($user->rights->user->user->lire))); + /* * Actions */ +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; +} + // Add a notification if ($action == 'add') { $error = 0; @@ -75,6 +90,7 @@ if ($action == 'add') { if ($actionid <= 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Action")), null, 'errors'); $error++; + $action = 'create'; } if (!$error) { @@ -98,6 +114,7 @@ if ($action == 'add') { $db->commit(); } else { $db->rollback(); + $action = 'create'; } } } @@ -185,7 +202,7 @@ if ($result > 0) { // Add notification form - print load_fiche_titre($langs->trans("AddNewNotification"), '', ''); + // print load_fiche_titre($langs->trans("AddNewNotification"), '', ''); print ''; print ''; @@ -194,7 +211,7 @@ if ($result > 0) { $param = "&id=".$id; // Line with titles - print ''; + /* print '
'; print ''; print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "c.lastname,c.firstname", '', $param, 'width="45%"', $sortfield, $sortorder); print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", '', $param, 'width="35%"', $sortfield, $sortorder); @@ -202,48 +219,10 @@ if ($result > 0) { print_liste_field_titre(''); print "\n"; - - // $listofemails=$object->thirdparty_and_contact_email_array(); - if ($object->email) { - $actions = array(); - - // Load array of available notifications - $notificationtrigger = new InterfaceNotification($db); - $listofnotifiedevents = $notificationtrigger->getListOfManagedEvents(); - - foreach ($listofnotifiedevents as $notifiedevent) { - $label = ($langs->trans("Notify_".$notifiedevent['code']) != "Notify_".$notifiedevent['code'] ? $langs->trans("Notify_".$notifiedevent['code']) : $notifiedevent['label']); - $actions[$notifiedevent['rowid']] = $label; - } - print ''; - print ''; - print ''; - print ''; - print ''; - } else { - print ''; - } - print '
'; - print $object->getNomUrl(1); - if (isValidEmail($object->email)) { - print ' <'.$object->email.'>'; - } else { - $langs->load("errors"); - print '   '.img_warning().' '.$langs->trans("ErrorBadEMail", $object->email); - } - print ''; - print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$form->selectarray("actionid", $actions, '', 1); - print ''; - $type = array('email'=>$langs->trans("EMail")); - print $form->selectarray("typeid", $type); - print '
'; - print $langs->trans("YouMustAssignUserMailFirst"); - print '
'; - print ''; print '
'; - + */ // List of notifications enabled for contacts $sql = "SELECT n.rowid, n.type,"; $sql .= " a.code, a.label,"; @@ -262,8 +241,13 @@ if ($result > 0) { dol_print_error($db); } + $newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); + + $title = $langs->trans("ListOfActiveNotifications"); + // List of active notifications - print load_fiche_titre($langs->trans("ListOfActiveNotifications").' ('.$num.')', '', ''); + //print load_fiche_titre($langs->trans("ListOfActiveNotifications").' ('.$num.')', '', ''); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $num, 'email', 0, $newcardbutton, '', $limit, 0, 0, 1); // Line with titles print ''; @@ -274,99 +258,141 @@ if ($result > 0) { print_liste_field_titre('', '', ''); print ''; - $langs->load("errors"); - $langs->load("other"); - if ($num) { - $i = 0; + if ($action == 'create') { + // $listofemails=$object->thirdparty_and_contact_email_array(); + if ($object->email) { + $actions = array(); - $userstatic = new user($db); + // Load array of available notifications + $notificationtrigger = new InterfaceNotification($db); + $listofnotifiedevents = $notificationtrigger->getListOfManagedEvents(); - while ($i < $num) { - $obj = $db->fetch_object($resql); + foreach ($listofnotifiedevents as $notifiedevent) { + $label = ($langs->trans("Notify_".$notifiedevent['code']) != "Notify_".$notifiedevent['code'] ? $langs->trans("Notify_".$notifiedevent['code']) : $notifiedevent['label']); + $actions[$notifiedevent['rowid']] = $label; + } + print ''; + print ''; + print ''; + print ''; + print ''; + } else { + print ''; + } + } else { + if ($num) { + $i = 0; - $userstatic->id = $obj->userid; - $userstatic->lastname = $obj->lastname; - $userstatic->firstname = $obj->firstname; - print ''; + print ''; + print ''; + print ''; + print ''; + $i++; + } + $db->free($resql); + } + + // List of notifications enabled for fixed email + /* + foreach($conf->global as $key => $val) { + if (! preg_match('/^NOTIFICATION_FIXEDEMAIL_(.*)/', $key, $reg)) continue; + print ''; print ''; print ''; - print ''; + print ''; print ''; - $i++; - } - $db->free($resql); + }*/ + /*if ($user->admin) + { + $var = ! $var; + print ''; + }*/ } - // List of notifications enabled for fixed email - /* - foreach($conf->global as $key => $val) { - if (! preg_match('/^NOTIFICATION_FIXEDEMAIL_(.*)/', $key, $reg)) continue; - print ''; - print ''; - print ''; - print ''; - print ''; - }*/ - /*if ($user->admin) - { - $var = ! $var; - print ''; - }*/ - print '
'; + print $object->getNomUrl(1); + if (isValidEmail($object->email)) { + print ' <'.$object->email.'>'; + } else { + $langs->load("errors"); + print '   '.img_warning().' '.$langs->trans("ErrorBadEMail", $object->email); + } + print ''; + print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$form->selectarray("actionid", $actions, '', 1); + print ''; + $type = array('email'=>$langs->trans("EMail")); + print $form->selectarray("typeid", $type); + print ''; + print ''; + print ' '; + print ''; + print '
'; + print $langs->trans("YouMustAssignUserMailFirst"); + print '
'.$userstatic->getNomUrl(1); - if ($obj->type == 'email') { - if (isValidEmail($obj->email)) { - print ' <'.$obj->email.'>'; - } else { - $langs->load("errors"); - print '   '.img_warning().' '.$langs->trans("ErrorBadEMail", $obj->email); + $userstatic = new user($db); + + while ($i < $num) { + $obj = $db->fetch_object($resql); + + $userstatic->id = $obj->userid; + $userstatic->lastname = $obj->lastname; + $userstatic->firstname = $obj->firstname; + print '
'.$userstatic->getNomUrl(1); + if ($obj->type == 'email') { + if (isValidEmail($obj->email)) { + print ' <'.$obj->email.'>'; + } else { + $langs->load("errors"); + print '   '.img_warning().' '.$langs->trans("ErrorBadEMail", $obj->email); + } + } + print ''; + $label = ($langs->trans("Notify_".$obj->code) != "Notify_".$obj->code ? $langs->trans("Notify_".$obj->code) : $obj->label); + print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$label; + print ''; + if ($obj->type == 'email') { + print $langs->trans("Email"); + } + if ($obj->type == 'sms') { + print $langs->trans("SMS"); + } + print ''.img_delete().'
'; + $listtmp=explode(',',$val); + $first=1; + foreach($listtmp as $keyemail => $valemail) + { + if (! $first) print ', '; + $first=0; + $valemail=trim($valemail); + //print $keyemail.' - '.$valemail.' - '.$reg[1].'
'; + if (isValidEmail($valemail, 1)) + { + if ($valemail == '__SUPERVISOREMAIL__') print $valemail; + else print ' <'.$valemail.'>'; + } + else + { + print ' '.img_warning().' '.$langs->trans("ErrorBadEMail",$valemail); } } print '
'; - $label = ($langs->trans("Notify_".$obj->code) != "Notify_".$obj->code ? $langs->trans("Notify_".$obj->code) : $obj->label); - print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$label; + $notifcode=preg_replace('/_THRESHOLD_.*$/','',$reg[1]); + $notifcodecond=preg_replace('/^.*_(THRESHOLD_)/','$1',$reg[1]); + $label=($langs->trans("Notify_".$notifcode)!="Notify_".$notifcode?$langs->trans("Notify_".$notifcode):$notifcode); + print $label; + if (preg_match('/^THRESHOLD_HIGHER_(.*)$/',$notifcodecond,$regcond) && ($regcond[1] > 0)) + { + print ' - '.$langs->trans("IfAmountHigherThan",$regcond[1]); + } print ''; - if ($obj->type == 'email') { - print $langs->trans("Email"); - } - if ($obj->type == 'sms') { - print $langs->trans("SMS"); - } + print $langs->trans("Email"); print ''.img_delete().''.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'
'; + print '+ '.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).''; + print '
'; - $listtmp=explode(',',$val); - $first=1; - foreach($listtmp as $keyemail => $valemail) - { - if (! $first) print ', '; - $first=0; - $valemail=trim($valemail); - //print $keyemail.' - '.$valemail.' - '.$reg[1].'
'; - if (isValidEmail($valemail, 1)) - { - if ($valemail == '__SUPERVISOREMAIL__') print $valemail; - else print ' <'.$valemail.'>'; - } - else - { - print ' '.img_warning().' '.$langs->trans("ErrorBadEMail",$valemail); - } - } - print '
'; - $notifcode=preg_replace('/_THRESHOLD_.*$/','',$reg[1]); - $notifcodecond=preg_replace('/^.*_(THRESHOLD_)/','$1',$reg[1]); - $label=($langs->trans("Notify_".$notifcode)!="Notify_".$notifcode?$langs->trans("Notify_".$notifcode):$notifcode); - print $label; - if (preg_match('/^THRESHOLD_HIGHER_(.*)$/',$notifcodecond,$regcond) && ($regcond[1] > 0)) - { - print ' - '.$langs->trans("IfAmountHigherThan",$regcond[1]); - } - print ''; - print $langs->trans("Email"); - print ''.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'
'; - print '+ '.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).''; - print '
'; + print ''; + print '

'."\n"; @@ -422,7 +448,7 @@ if ($result > 0) { print ''; // List of notifications done - print_barre_liste($langs->trans("ListOfNotificationsDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit); + print_barre_liste($langs->trans("ListOfNotificationsDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'email', 0, '', '', $limit); // Line with titles print ''; From f6145a119f9074a74f4c5ae310fffc5c06383580 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Mar 2021 18:58:34 +0100 Subject: [PATCH 07/20] Fix #yogosha5679 --- htdocs/variants/admin/admin.php | 2 +- htdocs/variants/ajax/getCombinations.php | 19 ++++++++++++++++++- htdocs/variants/ajax/get_attribute_values.php | 19 ++++++++++++++++++- htdocs/variants/ajax/orderAttribute.php | 12 ++++++++++++ htdocs/variants/card.php | 12 ++++++++++++ htdocs/variants/combinations.php | 12 ++++++++++++ htdocs/variants/create.php | 12 ++++++++++++ htdocs/variants/create_val.php | 12 ++++++++++++ htdocs/variants/list.php | 12 ++++++++++++ 9 files changed, 109 insertions(+), 3 deletions(-) diff --git a/htdocs/variants/admin/admin.php b/htdocs/variants/admin/admin.php index f5467760a89..ade64ea6a7b 100644 --- a/htdocs/variants/admin/admin.php +++ b/htdocs/variants/admin/admin.php @@ -25,7 +25,7 @@ $langs->loadLangs(array("admin", "products")); $action = GETPOST('action', 'alphanohtml'); // Security check -if (!$user->admin || (empty($conf->product->enabled) && empty($conf->service->enabled))) { +if (!$user->admin || empty($conf->variants->enabled)) { accessforbidden(); } diff --git a/htdocs/variants/ajax/getCombinations.php b/htdocs/variants/ajax/getCombinations.php index adb227c2fd6..9c670fa07cc 100644 --- a/htdocs/variants/ajax/getCombinations.php +++ b/htdocs/variants/ajax/getCombinations.php @@ -36,7 +36,24 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php'; -header('Content-Type: application/json'); +$permissiontoread = $user->rights->produit->lire || $user->rights->service->lire; + +// Security check +if (empty($conf->variants->enabled)) { + accessforbidden('Module not enabled'); +} +if ($user->socid > 0) { // Protection if external user + accessforbidden(); +} +//$result = restrictedArea($user, 'variant'); +if (!$permissiontoread) accessforbidden(); + + +/* + * View + */ + +top_httphead('application/json'); $id = GETPOST('id', 'int'); diff --git a/htdocs/variants/ajax/get_attribute_values.php b/htdocs/variants/ajax/get_attribute_values.php index e61676339ee..1d4eab49773 100644 --- a/htdocs/variants/ajax/get_attribute_values.php +++ b/htdocs/variants/ajax/get_attribute_values.php @@ -36,7 +36,24 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductAttribute.class.php'; require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductAttributeValue.class.php'; -header('Content-Type: application/json'); +$permissiontoread = $user->rights->produit->lire || $user->rights->service->lire; + +// Security check +if (empty($conf->variants->enabled)) { + accessforbidden('Module not enabled'); +} +if ($user->socid > 0) { // Protection if external user + accessforbidden(); +} +//$result = restrictedArea($user, 'variant'); +if (!$permissiontoread) accessforbidden(); + + +/* + * View + */ + +top_httphead('application/json'); $id = GETPOST('id', 'int'); diff --git a/htdocs/variants/ajax/orderAttribute.php b/htdocs/variants/ajax/orderAttribute.php index c787517e5c7..1d9e1b8e892 100644 --- a/htdocs/variants/ajax/orderAttribute.php +++ b/htdocs/variants/ajax/orderAttribute.php @@ -37,6 +37,18 @@ if (!defined('NOREQUIRETRAN')) { require '../../main.inc.php'; +$permissiontoread = $user->rights->produit->lire || $user->rights->service->lire; + +// Security check +if (empty($conf->variants->enabled)) { + accessforbidden('Module not enabled'); +} +if ($user->socid > 0) { // Protection if external user + accessforbidden(); +} +//$result = restrictedArea($user, 'variant'); +if (!$permissiontoread) accessforbidden(); + /* * View diff --git a/htdocs/variants/card.php b/htdocs/variants/card.php index 7a15a4ede97..ed70c6325e3 100644 --- a/htdocs/variants/card.php +++ b/htdocs/variants/card.php @@ -36,6 +36,18 @@ if ($object->fetch($id) < 1) { exit(); } +$permissiontoread = $user->rights->produit->lire || $user->rights->service->lire; + +// Security check +if (empty($conf->variants->enabled)) { + accessforbidden('Module not enabled'); +} +if ($user->socid > 0) { // Protection if external user + accessforbidden(); +} +//$result = restrictedArea($user, 'variant'); +if (!$permissiontoread) accessforbidden(); + /* * Actions diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 218ee874bd6..979ec261663 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -64,6 +64,18 @@ if ($id > 0 || $ref) { $selectedvariant = $_SESSION['addvariant_'.$object->id]; +$permissiontoread = $user->rights->produit->lire || $user->rights->service->lire; + +// Security check +if (empty($conf->variants->enabled)) { + accessforbidden('Module not enabled'); +} +if ($user->socid > 0) { // Protection if external user + accessforbidden(); +} +//$result = restrictedArea($user, 'variant'); +if (!$permissiontoread) accessforbidden(); + /* * Actions diff --git a/htdocs/variants/create.php b/htdocs/variants/create.php index 8f3a1d28d9f..f87ad3ef504 100644 --- a/htdocs/variants/create.php +++ b/htdocs/variants/create.php @@ -24,6 +24,18 @@ $label = GETPOST('label', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); $action = GETPOST('action', 'alpha'); +$permissiontoread = $user->rights->produit->lire || $user->rights->service->lire; + +// Security check +if (empty($conf->variants->enabled)) { + accessforbidden('Module not enabled'); +} +if ($user->socid > 0) { // Protection if external user + accessforbidden(); +} +//$result = restrictedArea($user, 'variant'); +if (!$permissiontoread) accessforbidden(); + /* * Actions diff --git a/htdocs/variants/create_val.php b/htdocs/variants/create_val.php index 22dc2a1a110..1ca647960e2 100644 --- a/htdocs/variants/create_val.php +++ b/htdocs/variants/create_val.php @@ -36,6 +36,18 @@ if ($object->fetch($id) < 1) { exit(); } +$permissiontoread = $user->rights->produit->lire || $user->rights->service->lire; + +// Security check +if (empty($conf->variants->enabled)) { + accessforbidden('Module not enabled'); +} +if ($user->socid > 0) { // Protection if external user + accessforbidden(); +} +//$result = restrictedArea($user, 'variant'); +if (!$permissiontoread) accessforbidden(); + /* * Actions diff --git a/htdocs/variants/list.php b/htdocs/variants/list.php index dde43397671..bfe4dd0aa72 100644 --- a/htdocs/variants/list.php +++ b/htdocs/variants/list.php @@ -21,6 +21,18 @@ require DOL_DOCUMENT_ROOT.'/variants/class/ProductAttribute.class.php'; $action = GETPOST('action', 'aZ09'); $object = new ProductAttribute($db); +$permissiontoread = $user->rights->produit->lire || $user->rights->service->lire; + +// Security check +if (empty($conf->variants->enabled)) { + accessforbidden('Module not enabled'); +} +if ($user->socid > 0) { // Protection if external user + accessforbidden(); +} +//$result = restrictedArea($user, 'variant'); +if (!$permissiontoread) accessforbidden(); + /* From f6e7285949f92287372aaafe2ec5dd9e21ff7445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 20 Mar 2021 19:06:15 +0100 Subject: [PATCH 08/20] rename files from adherent to member --- htdocs/adherents/admin/{adherent.php => member.php} | 0 .../admin/{adherent_emails.php => member_emails.php} | 2 +- .../{adherent_extrafields.php => member_extrafields.php} | 2 +- ...t_type_extrafields.php => member_type_extrafields.php} | 2 +- htdocs/core/lib/member.lib.php | 8 ++++---- htdocs/core/modules/modAdherent.class.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) rename htdocs/adherents/admin/{adherent.php => member.php} (100%) rename htdocs/adherents/admin/{adherent_emails.php => member_emails.php} (98%) rename htdocs/adherents/admin/{adherent_extrafields.php => member_extrafields.php} (97%) rename htdocs/adherents/admin/{adherent_type_extrafields.php => member_type_extrafields.php} (97%) diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/member.php similarity index 100% rename from htdocs/adherents/admin/adherent.php rename to htdocs/adherents/admin/member.php diff --git a/htdocs/adherents/admin/adherent_emails.php b/htdocs/adherents/admin/member_emails.php similarity index 98% rename from htdocs/adherents/admin/adherent_emails.php rename to htdocs/adherents/admin/member_emails.php index e1867285930..207a913d841 100644 --- a/htdocs/adherents/admin/adherent_emails.php +++ b/htdocs/adherents/admin/member_emails.php @@ -24,7 +24,7 @@ */ /** - * \file htdocs/adherents/admin/adherent.php + * \file htdocs/adherents/admin/member_emails.php * \ingroup member * \brief Page to setup the module Foundation */ diff --git a/htdocs/adherents/admin/adherent_extrafields.php b/htdocs/adherents/admin/member_extrafields.php similarity index 97% rename from htdocs/adherents/admin/adherent_extrafields.php rename to htdocs/adherents/admin/member_extrafields.php index ec3b3824db7..7f5262bc7c6 100644 --- a/htdocs/adherents/admin/adherent_extrafields.php +++ b/htdocs/adherents/admin/member_extrafields.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/adherents/admin/adherent_extrafields.php + * \file htdocs/adherents/admin/member_extrafields.php * \ingroup member * \brief Page to setup extra fields of members */ diff --git a/htdocs/adherents/admin/adherent_type_extrafields.php b/htdocs/adherents/admin/member_type_extrafields.php similarity index 97% rename from htdocs/adherents/admin/adherent_type_extrafields.php rename to htdocs/adherents/admin/member_type_extrafields.php index 34175da465f..91a9233e5d0 100644 --- a/htdocs/adherents/admin/adherent_type_extrafields.php +++ b/htdocs/adherents/admin/member_type_extrafields.php @@ -22,7 +22,7 @@ */ /** - * \file htdocs/adherents/admin/adherent_type_extrafields.php + * \file htdocs/adherents/admin/member_type_extrafields.php * \ingroup member * \brief Page to setup extra fields of members */ diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php index 93378d77390..484f34c265c 100644 --- a/htdocs/core/lib/member.lib.php +++ b/htdocs/core/lib/member.lib.php @@ -177,12 +177,12 @@ function member_admin_prepare_head() $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/adherent.php'; + $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/member.php'; $head[$h][1] = $langs->trans("Miscellaneous"); $head[$h][2] = 'general'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/adherent_emails.php'; + $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/member_emails.php'; $head[$h][1] = $langs->trans("EMails"); $head[$h][2] = 'emails'; $h++; @@ -193,12 +193,12 @@ function member_admin_prepare_head() // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab complete_head_from_modules($conf, $langs, null, $head, $h, 'member_admin'); - $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/adherent_extrafields.php'; + $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/member_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFieldsMember"); $head[$h][2] = 'attributes'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/adherent_type_extrafields.php'; + $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/member_type_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFieldsMemberType"); $head[$h][2] = 'attributes_type'; $h++; diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 57ec76e319d..ec9e50f5b4e 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -66,7 +66,7 @@ class modAdherent extends DolibarrModules ); // Config pages - $this->config_page_url = array("adherent.php@adherents"); + $this->config_page_url = array("member.php@adherents"); // Dependencies $this->hidden = false; // A condition to hide module From d2f7d3064d1088e2e9c6b06e24ccfd3015d752ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 20 Mar 2021 19:09:49 +0100 Subject: [PATCH 09/20] can use $conf->member --- htdocs/core/class/conf.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 0eab527bc6b..56873fe5470 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -851,6 +851,10 @@ class Conf if (isset($this->projet) && !isset($this->project)) { $this->project = $this->projet; } + // member is new use, adherent is old use still initialised + if (isset($this->adherent) && !isset($this->member)) { + $this->member = $this->adherent; + } // Object $mc if (!defined('NOREQUIREMC') && !empty($this->multicompany->enabled)) { From 46aa01aea0cfafcb435f3c71ced044b2247e9813 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Mar 2021 19:15:15 +0100 Subject: [PATCH 10/20] Fix permission on export of BOM and website --- htdocs/core/modules/modBom.class.php | 1 + htdocs/core/modules/modWebsite.class.php | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/htdocs/core/modules/modBom.class.php b/htdocs/core/modules/modBom.class.php index b040e4cec99..1c12b6c9f45 100644 --- a/htdocs/core/modules/modBom.class.php +++ b/htdocs/core/modules/modBom.class.php @@ -286,6 +286,7 @@ class modBom extends DolibarrModules $langs->load("mrp"); $this->export_code[$r] = $this->rights_class.'_'.$r; $this->export_label[$r] = 'BomAndBomLines'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r] = array(array("bom", "read")); $this->export_icon[$r] = 'bom'; $keyforclass = 'BOM'; $keyforclassfile = '/bom/class/bom.class.php'; diff --git a/htdocs/core/modules/modWebsite.class.php b/htdocs/core/modules/modWebsite.class.php index f16a29728be..1d53ee4e15a 100644 --- a/htdocs/core/modules/modWebsite.class.php +++ b/htdocs/core/modules/modWebsite.class.php @@ -109,6 +109,12 @@ class modWebsite extends DolibarrModules $this->rights[$r][4] = 'delete'; $r++; + $this->rights[$r][0] = 10008; + $this->rights[$r][1] = 'Export website content'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'export'; + $r++; + // Main menu entries $r = 0; $this->menu[$r] = array('fk_menu'=>'0', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode @@ -130,6 +136,7 @@ class modWebsite extends DolibarrModules $this->export_code[$r] = $this->rights_class.'_'.$r; $this->export_label[$r] = 'MyWebsitePages'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r] = array(array("website", "export")); $this->export_icon[$r] = 'globe'; $keyforclass = 'WebsitePage'; $keyforclassfile = '/website/class/websitepage.class.php'; From e5a94d9257576a6b4b6b6d8002f6d25ac27d84b5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Mar 2021 19:16:44 +0100 Subject: [PATCH 11/20] Fix export --- htdocs/exports/export.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index dc23a8ab362..117cb7968d4 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -449,7 +449,7 @@ if ($step == 1 || !$datatoexport) { if ($objexport->array_export_perms[$key]) { print ''.img_picto($langs->trans("NewExport"), 'next', 'class="fa-15x"').''; } else { - print $langs->trans("NotEnoughPermissions"); + print ''.$langs->trans("NotEnoughPermissions").''; } print ''; } From 6a8f4ac8927675d879979eac4f0f81e0a7ce989b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Mar 2021 19:30:08 +0100 Subject: [PATCH 12/20] NEW Add permission "export website" --- htdocs/exports/export.php | 3 +++ htdocs/exports/index.php | 5 +++-- htdocs/website/index.php | 32 ++++++++++++++++++-------------- 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 117cb7968d4..b3d0cf49a32 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -154,6 +154,9 @@ $upload_dir = $conf->export->dir_temp.'/'.$user->id; //$usefilters=($conf->global->MAIN_FEATURES_LEVEL > 1); $usefilters = 1; +// Security check +$result = restrictedArea($user, 'export'); + /* * Actions diff --git a/htdocs/exports/index.php b/htdocs/exports/index.php index 22b1729550d..3ba5e0a3591 100644 --- a/htdocs/exports/index.php +++ b/htdocs/exports/index.php @@ -27,11 +27,12 @@ require_once DOL_DOCUMENT_ROOT.'/exports/class/export.class.php'; // Load translation files required by the page $langs->load("exports"); +$export = new Export($db); +$export->load_arrays($user); + // Security check $result = restrictedArea($user, 'export'); -$export = new Export($db); -$export->load_arrays($user); /* * View diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 034583d3440..021edc52920 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -477,7 +477,7 @@ if ($massaction == 'setcategory' && GETPOST('confirmmassaction', 'alpha') && $us } // Replacement of string into pages -if ($massaction == 'replace' && GETPOST('confirmmassaction', 'alpha')) { +if ($massaction == 'replace' && GETPOST('confirmmassaction', 'alpha') && $usercanedit) { $replacestring = GETPOST('replacestring', 'none'); if (empty($user->rights->website->writephp)) { @@ -567,7 +567,7 @@ if ($action == 'adddir' && $permtouploadfile) */ // Add site -if ($action == 'addsite') { +if ($action == 'addsite' && $usercanedit) { $db->begin(); if (GETPOST('virtualhost', 'alpha') && !preg_match('/^http/', GETPOST('virtualhost', 'alpha'))) { @@ -625,7 +625,7 @@ if ($action == 'addsite') { } // Add page/container -if ($action == 'addcontainer') { +if ($action == 'addcontainer' && $usercanedit) { dol_mkdir($pathofwebsite); $db->begin(); @@ -1148,7 +1148,7 @@ if ($action == 'addcontainer') { } // Delete site -if ($action == 'confirm_deletesite' && $confirm == 'yes') { +if ($action == 'confirm_deletesite' && $confirm == 'yes' && $permissiontodelete) { $error = 0; $db->begin(); @@ -1276,7 +1276,7 @@ if (!GETPOSTISSET('pageid')) { } // Update css Update site properties -if ($action == 'updatecss') { +if ($action == 'updatecss' && $usercanedit) { // If we tried to reload another site/page, we stay on editcss mode. if (GETPOST('refreshsite') || GETPOST('refreshsite_x') || GETPOST('refreshsite.x') || GETPOST('refreshpage') || GETPOST('refreshpage_x') || GETPOST('refreshpage.x')) { $action = 'editcss'; @@ -1523,7 +1523,7 @@ if ($action == 'updatecss') { } // Update page -if ($action == 'setashome') { +if ($action == 'setashome' && $usercanedit) { $db->begin(); $object->fetch(0, $websitekey); $website = $object; @@ -1556,7 +1556,7 @@ if ($action == 'setashome') { } // Update page properties (meta) -if ($action == 'updatemeta') { +if ($action == 'updatemeta' && $usercanedit) { $db->begin(); $result = $object->fetch(0, $websitekey); @@ -1778,8 +1778,8 @@ if ($action == 'updatemeta') { } // Update page -if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'confirm_createfromclone' || $action == 'confirm_createpagefromclone') - || ($action == 'preview' && (GETPOST('refreshsite') || GETPOST('refreshpage') || GETPOST('preview')))) { +if ($usercanedit && (($action == 'updatesource' || $action == 'updatecontent' || $action == 'confirm_createfromclone' || $action == 'confirm_createpagefromclone') + || ($action == 'preview' && (GETPOST('refreshsite') || GETPOST('refreshpage') || GETPOST('preview'))))) { $object->fetch(0, $websitekey); $website = $object; @@ -2041,7 +2041,7 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf } // Export site -if ($action == 'exportsite') { +if ($action == 'exportsite' && !empty($user->rights->website->export)) { $fileofzip = $object->exportWebSite(); if ($fileofzip) { @@ -2060,7 +2060,7 @@ if ($action == 'exportsite') { } // Regenerate site -if ($action == 'regeneratesite') { +if ($action == 'regeneratesite' && $usercanedit) { // Check symlink to medias and restore it if ko. Recreate also dir of website if not found. $pathtomedias = DOL_DATA_ROOT.'/medias'; $pathtomediasinwebsite = $pathofwebsite.'/medias'; @@ -2085,7 +2085,7 @@ if ($action == 'regeneratesite') { } // Import site -if ($action == 'importsiteconfirm') { +if ($action == 'importsiteconfirm' && $usercanedit) { if (empty($_FILES) && !GETPOSTISSET('templateuserfile')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("File")), null, 'errors'); $action = 'importsite'; @@ -2162,7 +2162,7 @@ $domainname = '0.0.0.0:8080'; $tempdir = $conf->website->dir_output.'/'.$websitekey.'/'; // Generate web site sitemaps -if ($action == 'generatesitemaps') { +if ($action == 'generatesitemaps' && $usercanedit) { $domtree = new DOMDocument('1.0', 'UTF-8'); $root = $domtree->createElementNS('http://www.sitemaps.org/schemas/sitemap/0.9', 'urlset'); $domtree->formatOutput = true; @@ -2331,6 +2331,10 @@ if (!GETPOST('hide_websitemenu')) { if (empty($user->rights->website->write)) { $disabled = ' disabled="disabled"'; } + $disabledexport = ''; + if (empty($user->rights->website->export)) { + $disabledexport = ' disabled="disabled"'; + } if ($websitekey) { $virtualurl = ''; @@ -2446,7 +2450,7 @@ if (!GETPOST('hide_websitemenu')) { } //print ''; - print ''; + print ''; print ''; From ca74fa73728eea3c99f5e51c97cf13e22cfede2d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Mar 2021 20:02:58 +0100 Subject: [PATCH 13/20] Look and feel v14 --- htdocs/theme/eldy/info-box.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index ad47245eec5..3eda0c40ee7 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -366,14 +366,14 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) { content: "\f571"; } .fa-dol-project:before { - content: "\f0e8"; + content: "\f542"; } .fa-dol-commande:before, .fa-dol-order_supplier:before { content: "\f570"; } .fa-dol-contrat:before { - content: "\f1e6"; + content: "\f0f2"; } .fa-dol-ticket:before { content: "\f3ff"; @@ -382,7 +382,7 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) { content: "\f19c"; } .fa-dol-member:before { - content: "\f0c0"; + content: "\f007"; } .fa-dol-expensereport:before { content: "\f555"; From 70be2dbcf0e51f6e4fc1d0d65b30d5b7b032f35f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Mar 2021 20:51:19 +0100 Subject: [PATCH 14/20] Fix regression in tests --- htdocs/core/lib/admin.lib.php | 2 +- htdocs/core/tpl/admin_extrafields_add.tpl.php | 4 ++-- htdocs/core/tpl/admin_extrafields_edit.tpl.php | 4 ++-- htdocs/core/tpl/admin_extrafields_view.tpl.php | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 6715ded36fa..678c895edf6 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1510,7 +1510,7 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '') print '
'; print ''; - print ''; + print ''; print '
'.$langs->trans("Description").''.$langs->trans("Description").''; $text = $langs->trans("Value"); print $form->textwithpicto($text, $helptext, 1, 'help', '', 0, 2, 'idhelptext'); diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php index b0ab3e5bb76..ddcdfdf9e4b 100644 --- a/htdocs/core/tpl/admin_extrafields_add.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php @@ -145,7 +145,7 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php
Contact:con - + @@ -205,7 +205,7 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php
Contact:con -multicompany->enabled)) { ?> +multicompany->enabled)) { ?> diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index 73721d4c0c4..c055dd1d3b5 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -181,7 +181,7 @@ if ((($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) && is_a } ?> - + @@ -295,7 +295,7 @@ if (in_array($type, array_keys($typewecanchangeinto))) { -multicompany->enabled)) { ?> +multicompany->enabled)) { ?> diff --git a/htdocs/core/tpl/admin_extrafields_view.tpl.php b/htdocs/core/tpl/admin_extrafields_view.tpl.php index 82b5db4f74b..c4a21812b01 100644 --- a/htdocs/core/tpl/admin_extrafields_view.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_view.tpl.php @@ -65,8 +65,8 @@ print ''; print ''; print ''; print ''; -if (empty($conf->multicompany->enabled)) { - print ''; +if (!empty($conf->multicompany->enabled)) { + print ''; } print ''; print "\n"; From 2b3599dba5b956ecf1879163cf0b09848ef610e9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Mar 2021 21:29:36 +0100 Subject: [PATCH 15/20] Clean code --- htdocs/adherents/admin/member_emails.php | 33 +++++++++++++++++------- htdocs/admin/notification.php | 4 +-- htdocs/core/lib/admin.lib.php | 21 +++++++-------- 3 files changed, 36 insertions(+), 22 deletions(-) diff --git a/htdocs/adherents/admin/member_emails.php b/htdocs/adherents/admin/member_emails.php index 207a913d841..45756ec2691 100644 --- a/htdocs/adherents/admin/member_emails.php +++ b/htdocs/adherents/admin/member_emails.php @@ -69,9 +69,24 @@ $constantes = array( // if ($action == 'updateall') { $db->begin(); - $res1 = $res2 = $res3 = $res4 = $res5 = $res6 = 0; - $res1 = dolibarr_set_const($db, 'XXXX', GETPOST('ADHERENT_LOGIN_NOT_REQUIRED', 'alpha'), 'chaine', 0, '', $conf->entity); - if ($res1 < 0 || $res2 < 0 || $res3 < 0 || $res4 < 0 || $res5 < 0 || $res6 < 0) { + + $res = 0; + foreach ($constantes as $constname => $value) { + $constvalue = (GETPOSTISSET('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname, 'alphanohtml') : GETPOST('constvalue')); + $consttype = (GETPOSTISSET('consttype_'.$constname) ? GETPOST('consttype_'.$constname, 'alphanohtml') : GETPOST('consttype')); + $constnote = (GETPOSTISSET('constnote_'.$constname) ? GETPOST('constnote_'.$constname, 'restricthtml') : GETPOST('constnote')); + + $typetouse = empty($oldtypetonewone[$consttype]) ? $consttype : $oldtypetonewone[$consttype]; + $constvalue = preg_replace('/:member$/', '', $constvalue); + + $res = dolibarr_set_const($db, $constname, $constvalue, $consttype, 0, $constnote, $conf->entity); + if ($res <= 0) { + $error++; + $action = 'list'; + } + } + + if ($error > 0) { setEventMessages('ErrorFailedToSaveDate', null, 'errors'); $db->rollback(); } else { @@ -126,19 +141,19 @@ $head = member_admin_prepare_head(); print dol_get_fiche_head($head, 'emails', $langs->trans("Members"), -1, 'user'); // TODO Use global form -//print '
'; -//print ''; -//print ''; +print ''; +print ''; +print ''; $helptext = '*'.$langs->trans("FollowingConstantsWillBeSubstituted").'
'; $helptext .= '__DOL_MAIN_URL_ROOT__, __ID__, __FIRSTNAME__, __LASTNAME__, __FULLNAME__, __LOGIN__, __PASSWORD__, '; $helptext .= '__COMPANY__, __ADDRESS__, __ZIP__, __TOWN__, __COUNTRY__, __EMAIL__, __BIRTH__, __PHOTO__, __TYPE__, '; //$helptext.='__YEAR__, __MONTH__, __DAY__'; // Not supported -form_constantes($constantes, 0, $helptext); +form_constantes($constantes, 3, $helptext); -//print '
'; -//print ''; +print '
'; +print ''; print dol_get_fiche_end(); diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index 1192034e052..e1cf115626f 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -92,7 +92,7 @@ if ($action == 'settemplates') { if ($action == 'setvalue' && $user->admin) { $db->begin(); - $result = dolibarr_set_const($db, "NOTIFICATION_EMAIL_FROM", GETPOST("email_from", "restricthtml"), 'chaine', 0, '', $conf->entity); + $result = dolibarr_set_const($db, "NOTIFICATION_EMAIL_FROM", GETPOST("email_from", "alphawithlgt"), 'chaine', 0, '', $conf->entity); if ($result < 0) { $error++; } @@ -270,7 +270,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { } $helptext = ''; - form_constantes($constantes, 2, $helptext); + form_constantes($constantes, 3, $helptext); } else { print '
trans("LabelOrTranslationKey"); ?>
trans("LabelOrTranslationKey"); ?>
trans("AttributeCode"); ?> (trans("AlphaNumOnlyLowerCharsAndNoSpace"); ?>)
trans("Totalizable"); ?>>
textwithpicto($langs->trans("HelpOnTooltip"), $langs->trans("HelpOnTooltipDesc")); ?>
trans("AllEntities"); ?>>
trans("LabelOrTranslationKey"); ?>
trans("LabelOrTranslationKey"); ?>
trans("AttributeCode"); ?>
textwithpicto($langs->trans("HelpOnTooltip"), $langs->trans("HelpOnTooltipDesc")); ?>
trans("AllEntities"); ?>>
'.$langs->trans("AlwaysEditable").''.$form->textwithpicto($langs->trans("Visible"), $langs->trans("VisibleDesc")).''.$form->textwithpicto($langs->trans("DisplayOnPdf"), $langs->trans("DisplayOnPdfDesc")).''.$form->textwithpicto($langs->trans("Totalizable"), $langs->trans("TotalizableDesc")).''.$langs->trans("Entities").''.$langs->trans("Entity").' 
'; print ''; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 678c895edf6..72de6036e8f 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1488,7 +1488,7 @@ function complete_elementList_with_modules(&$elementList) * * @param array $tableau Array of constants array('key'=>array('type'=>type, 'label'=>label) * where type can be 'string', 'text', 'textarea', 'html', 'yesno', 'emailtemplate:xxx', ... - * @param int $strictw3c 0=Include form into table (deprecated), 1=Form is outside table to respect W3C (deprecated), 2=No form nor button at all (form is output by caller, recommended) + * @param int $strictw3c 0=Include form into table (deprecated), 1=Form is outside table to respect W3C (deprecated), 2=No form nor button at all, 3=No form nor button at all and each field has a unique name (form is output by caller, recommended) * @param string $helptext Help * @return void */ @@ -1614,24 +1614,24 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '') foreach (array_keys($_Avery_Labels) as $codecards) { $arrayoflabels[$codecards] = $_Avery_Labels[$codecards]['name']; } - print $form->selectarray('constvalue'.(empty($strictw3c) ? '' : '[]'), $arrayoflabels, ($obj->value ? $obj->value : 'CARD'), 1, 0, 0); + print $form->selectarray('constvalue'.(empty($strictw3c) ? '' : ($strictw3c == 3 ? '_'.$const : '[]')), $arrayoflabels, ($obj->value ? $obj->value : 'CARD'), 1, 0, 0); print ''; print ''; print ''; } else { print ''; } From 0008e916ac6512df1aca9871600383240fa125fa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Mar 2021 21:36:42 +0100 Subject: [PATCH 16/20] Fix sql error --- htdocs/user/class/user.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index b27e12e3f3e..2ac519b0a26 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -604,7 +604,7 @@ class User extends CommonObject } /** - * Load default value in property ->default_values + * Load default values from database table into property ->default_values * * @return int > 0 if OK, < 0 if KO */ @@ -616,7 +616,7 @@ class User extends CommonObject require_once DOL_DOCUMENT_ROOT.'/core/class/defaultvalues.class.php'; $defaultValues = new DefaultValues($this->db); - $result = $defaultValues->fetchAll('', '', 0, 0, array('t.user_id'=>array(0, $this->id), 'entity'=>array($this->entity, $conf->entity))); // User 0 (all) + me (if defined) + $result = $defaultValues->fetchAll('', '', 0, 0, array('t.user_id'=>array(0, $this->id), 'entity'=>array((isset($this->entity) ? $this->entity : $conf->entity), $conf->entity))); // User 0 (all) + me (if defined) if (!is_array($result) && $result < 0) { setEventMessages($defaultValues->error, $defaultValues->errors, 'errors'); From fc2308d8108b77abf0b185a0250f7b4d82dcdfc6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Mar 2021 21:38:01 +0100 Subject: [PATCH 17/20] Fix trans --- htdocs/public/members/new.php | 2 +- htdocs/public/members/public_list.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index be1a574e3fe..d8c25bbebbb 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -642,7 +642,7 @@ if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { print ''."\n"; } // Birthday -print ''."\n"; // Photo diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index e6c6e040a97..a19c1212761 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -153,7 +153,7 @@ if ($result) { print ''; print ''; print ''."\n"; - //print_liste_field_titre("DateToBirth", $_SERVER["PHP_SELF"],"birth",'',$param,$sortfield,$sortorder); // est-ce nécessaire ?? + //print_liste_field_titre("DateOfBirth", $_SERVER["PHP_SELF"],"birth",'',$param,$sortfield,$sortorder); // est-ce nécessaire ?? print_liste_field_titre("EMail", $_SERVER["PHP_SELF"], "email", '', $param, '', $sortfield, $sortorder, 'public_'); print_liste_field_titre("Zip", $_SERVER["PHP_SELF"], "zip", "", $param, '', $sortfield, $sortorder, 'public_'); print_liste_field_titre("Town", $_SERVER["PHP_SELF"], "town", "", $param, '', $sortfield, $sortorder, 'public_'); From eeb1c5d884105eaff2b21c0b09a05403dcc2ef2e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Mar 2021 21:46:10 +0100 Subject: [PATCH 18/20] Replace deprecated code --- htdocs/compta/tva/card.php | 4 ++-- htdocs/core/class/html.formticket.class.php | 2 +- htdocs/salaries/paiement_salary.php | 2 +- htdocs/salaries/payment_salary/card.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 71e511397b6..35f8767aabb 100755 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -405,7 +405,7 @@ if ($action == 'create') { print ''; print "
\n"; - dol_fiche_head(); + print dol_get_fiche_head(); print '
'; - print ''; - print ''; + print ''; + print ''; if ($obj->type == 'textarea' || in_array($const, array('ADHERENT_CARD_TEXT', 'ADHERENT_CARD_TEXT_RIGHT', 'ADHERENT_ETIQUETTE_TEXT'))) { - print '\n"; } elseif ($obj->type == 'html') { require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('constvalue_'.$const.(empty($strictw3c) ? '' : '[]'), $obj->value, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%'); + $doleditor = new DolEditor('constvalue'.(empty($strictw3c) ? '' : ($strictw3c == 3 ? '_'.$const : '[]')), $obj->value, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%'); $doleditor->Create(); } elseif ($obj->type == 'yesno') { - print $form->selectyesno('constvalue'.(empty($strictw3c) ? '' : '[]'), $obj->value, 1); + print $form->selectyesno('constvalue'.(empty($strictw3c) ? '' : ($strictw3c == 3 ? '_'.$const : '[]')), $obj->value, 1); } elseif (preg_match('/emailtemplate/', $obj->type)) { include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; $formmail = new FormMail($db); @@ -1654,10 +1654,9 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '') } //var_dump($arraydefaultmessage); //var_dump($arrayofmessagename); - print $form->selectarray('constvalue_'.$obj->name, $arrayofmessagename, $obj->value.':'.$tmp[1], 'None', 0, 0, '', 0, 0, 0, '', '', 1); - } else // type = 'string' ou 'chaine' - { - print ''; + print $form->selectarray('constvalue'.(empty($strictw3c) ? '' : ($strictw3c == 3 ? '_'.$const : '[]')), $arrayofmessagename, $obj->value.':'.$tmp[1], 'None', 0, 0, '', 0, 0, 0, '', '', 1); + } else { // type = 'string' ou 'chaine' + print ''; } print '
'.$langs->trans("PasswordAgain").' *
'.$langs->trans("DateToBirth").''; +print '
'.$langs->trans("DateOfBirth").''; print $form->selectDate($birthday, 'birth', 0, 0, 1, "newmember", 1, 0); print '
'.dolGetFirstLastname($langs->trans("Firstname"), $langs->trans("Lastname")).''.$langs->trans("Company").'
'; @@ -512,7 +512,7 @@ if ($id) { print ''; } - dol_fiche_head($head, 'card', $langs->trans("VATPayment"), -1, 'payment'); + print dol_get_fiche_head($head, 'card', $langs->trans("VATPayment"), -1, 'payment'); $morehtmlref = '
'; // Label of social contribution diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 7edaada2f1c..445686340e8 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -124,7 +124,7 @@ class FormTicket /** * Show the form to input ticket * - * @param int $withdolfichehead With dol_fiche_head + * @param int $withdolfichehead With dol_get_fiche_head() and dol_get_fiche_end() * @param string $mode Mode ('create' or 'edit') * @return void */ diff --git a/htdocs/salaries/paiement_salary.php b/htdocs/salaries/paiement_salary.php index 44b6aae4503..6c171441072 100644 --- a/htdocs/salaries/paiement_salary.php +++ b/htdocs/salaries/paiement_salary.php @@ -174,7 +174,7 @@ if ($action == 'create') { print ''; print ''; - dol_fiche_head('', ''); + print dol_get_fiche_end(); print '
'; diff --git a/htdocs/salaries/payment_salary/card.php b/htdocs/salaries/payment_salary/card.php index 3a8eb998fff..3d65fec02d1 100644 --- a/htdocs/salaries/payment_salary/card.php +++ b/htdocs/salaries/payment_salary/card.php @@ -97,7 +97,7 @@ $h++; */ -dol_fiche_head($head, $hselected, $langs->trans("SalaryPayment"), -1, 'payment'); +print dol_get_fiche_head($head, $hselected, $langs->trans("SalaryPayment"), -1, 'payment'); /* * Deletion confirmation of payment From af199189b32991d123247afff6f62e66fcb7cd5e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 21 Mar 2021 13:46:01 +0100 Subject: [PATCH 19/20] NEW Add color and picto for direction of movement --- htdocs/core/class/html.form.class.php | 2 +- htdocs/langs/en_US/stocks.lang | 2 +- .../stock/class/mouvementstock.class.php | 41 +++++++++++ htdocs/product/stock/movement_list.php | 73 +++++++++---------- htdocs/product/stock/stockatdate.php | 4 +- htdocs/theme/eldy/global.inc.php | 13 ++++ 6 files changed, 93 insertions(+), 42 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index b18ed68eaa2..d75ec44798f 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2577,7 +2577,7 @@ class Form } } if ($showempty) { - $out .= ''; + $out .= ''; } $i = 0; diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index aabbe1791b3..4585841911b 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -155,7 +155,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index 3c04618c900..8b2d729c29c 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -1107,6 +1107,47 @@ class MouvementStock extends CommonObject // There is no specific properties. All data into insert are provided as method parameter. } + /** + * Return html string with picto for type of movement + * + * @param int $withlabel With label + * @return string String with URL + */ + public function getTypeMovement($withlabel = 0) + { + global $langs; + + $s = ''; + switch ($this->type) { + case "0": + $s = ''; + if ($withlabel) { + $s .= $langs->trans('StockIncreaseAfterCorrectTransfer'); + } + break; + case "1": + $s = ''; + if ($withlabel) { + $s .= $langs->trans('StockDecreaseAfterCorrectTransfer'); + } + break; + case "2": + $s = ''; + if ($withlabel) { + $s .= $langs->trans('StockDecrease'); + } + break; + case "3": + $s = ''; + if ($withlabel) { + $s .= $langs->trans('StockIncrease'); + } + break; + } + + return $s; + } + /** * Return a link (with optionaly the picto) * Use this->id,this->lastname, this->firstname diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index 7c2e2df67e5..62cbe7f8620 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -944,22 +944,6 @@ if ($resql) { print ''; print ''; } - if (!empty($arrayfields['m.type_mouvement']['checked'])) { - // Type of movement - print ''; - } if (!empty($arrayfields['origin']['checked'])) { // Origin of movement print ''; } + if (!empty($arrayfields['m.type_mouvement']['checked'])) { + // Type of movement + print ''; + } if (!empty($arrayfields['m.value']['checked'])) { // Qty print ''; } - if (!empty($arrayfields['m.type_mouvement']['checked'])) { - // Type of movement - switch ($objp->type_mouvement) { - case "0": - print ''; - break; - case "1": - print ''; - break; - case "2": - print ''; - break; - case "3": - print ''; - break; - } - } if (!empty($arrayfields['origin']['checked'])) { // Origin of movement print ''; @@ -1205,13 +1190,25 @@ if ($resql) { } print ''; } + if (!empty($arrayfields['m.type_mouvement']['checked'])) { + // Type of movement + print ''; + } if (!empty($arrayfields['m.value']['checked'])) { // Qty print ''; } if (!empty($arrayfields['m.price']['checked'])) { diff --git a/htdocs/product/stock/stockatdate.php b/htdocs/product/stock/stockatdate.php index cbdaa62014b..5a3b0cb0a9c 100644 --- a/htdocs/product/stock/stockatdate.php +++ b/htdocs/product/stock/stockatdate.php @@ -358,12 +358,12 @@ print ''.$langs->trans('Date').' '.$form->sel print '   '; print img_picto('', 'product').' '; print $langs->trans('Product').' '; -$form->select_produits($productid, 'productid', '', 0, 0, -1, 2, '', 0, array(), 0, '1', 0, 'maxwidth300'); +print $form->select_produits($productid, 'productid', '', 0, 0, -1, 2, '', 0, array(), 0, '1', 0, 'maxwidth300', 0, '', null, 1); print '   '; print img_picto('', 'stock').' '; print $langs->trans('Warehouse').' '; -print $formproduct->selectWarehouses((GETPOSTISSET('fk_warehouse') ? $fk_warehouse : 'ifone'), 'fk_warehouse', '', 1); +print $formproduct->selectWarehouses((GETPOSTISSET('fk_warehouse') ? $fk_warehouse : 'ifone'), 'fk_warehouse', '', 1, 0, 0, '', 0, 0, null, '', '', 1, false, 'e.ref'); print ''; $parameters = array(); diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 9a9b4e7ed6c..6549a4d38cb 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -768,6 +768,19 @@ i.fa-mars::before, i.fa-venus::before, i.fa-genderless::before { opacity: 0.4; padding-: 3px; } +.stockmovemententry { + color: #080; + transform: rotate(0.25turn); + font-size: 1.2em; +} +.stockmovementexit { + color: #968822; + transform: rotate(0.3turn); + font-size: 1.2em; +} +.stockmovement { + font-size: 1.4em; +} body[class*="colorblind-"] .text-warning{ color : From e688987d6310318a2328516a8eda64de0c135d5a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 21 Mar 2021 13:46:32 +0100 Subject: [PATCH 20/20] css --- htdocs/theme/md/style.css.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 2209c87c22b..411ed3b41ec 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -899,6 +899,19 @@ i.fa-mars::before, i.fa-venus::before, i.fa-genderless::before { opacity: 0.4; padding-: 3px; } +.stockmovemententry { + color: #080; + transform: rotate(0.25turn); + font-size: 1.2em; +} +.stockmovementexit { + color: #968822; + transform: rotate(0.3turn); + font-size: 1.2em; +} +.stockmovement { + font-size: 1.4em; +} .text-warning{ color :
'; - //print ''; - print ''; - print ajax_combobox('search_type_mouvement'); - // TODO: add new function $formentrepot->selectTypeOfMovement(...) like - // print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'maxwidth200'); - print ''; @@ -972,6 +956,22 @@ if ($resql) { print '  '; print ''; + //print ''; + print ''; + print ajax_combobox('search_type_mouvement'); + // TODO: add new function $formentrepot->selectTypeOfMovement(...) like + // print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'maxwidth200'); + print ''; @@ -1044,15 +1044,15 @@ if ($resql) { if (!empty($arrayfields['m.label']['checked'])) { print_liste_field_titre($arrayfields['m.label']['label'], $_SERVER["PHP_SELF"], "m.label", "", $param, "", $sortfield, $sortorder); } - if (!empty($arrayfields['m.type_mouvement']['checked'])) { - print_liste_field_titre($arrayfields['m.type_mouvement']['label'], $_SERVER["PHP_SELF"], "m.type_mouvement", "", $param, '', $sortfield, $sortorder, 'center '); - } if (!empty($arrayfields['origin']['checked'])) { print_liste_field_titre($arrayfields['origin']['label'], $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder); } if (!empty($arrayfields['m.fk_projet']['checked'])) { print_liste_field_titre($arrayfields['m.fk_projet']['label'], $_SERVER["PHP_SELF"], "m.fk_projet", "", $param, '', $sortfield, $sortorder); } + if (!empty($arrayfields['m.type_mouvement']['checked'])) { + print_liste_field_titre($arrayfields['m.type_mouvement']['label'], $_SERVER["PHP_SELF"], "m.type_mouvement", "", $param, '', $sortfield, $sortorder, 'center '); + } if (!empty($arrayfields['m.value']['checked'])) { print_liste_field_titre($arrayfields['m.value']['label'], $_SERVER["PHP_SELF"], "m.value", "", $param, '', $sortfield, $sortorder, 'right '); } @@ -1113,6 +1113,8 @@ if ($resql) { $warehousestatic->fk_parent = $objp->fk_parent; $warehousestatic->statut = $objp->statut; + $movement->type = $objp->type_mouvement; + $arrayofuniqueproduct[$objp->rowid] = $objp->produit; if (!empty($objp->fk_origin)) { $origin = $movement->get_origin($objp->fk_origin, $objp->origintype); @@ -1176,23 +1178,6 @@ if ($resql) { // Label of movement print ''.$objp->label.''.$langs->trans('StockIncreaseAfterCorrectTransfer').''.$langs->trans('StockDecreaseAfterCorrectTransfer').''.$langs->trans('StockDecrease').''.$langs->trans('StockIncrease').''.$origin.''; + print $movement->getTypeMovement(); + print ''; - if ($objp->qt > 0) { + if ($objp->qty > 0) { + print ''; print '+'; + print $objp->qty; + print ''; + } else { + print ''; + print $objp->qty; + print ''; } - print $objp->qty; print '