From 0b9bd5408b5bf17934f46eec1c2c067081fad524 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 3 May 2024 02:39:35 +0200 Subject: [PATCH] Debug v20: Encapsulate the feature using leaflet/geophp into a constant MAIN_USE_GEOPHP. Fix webportal module. --- htdocs/adherents/admin/member_extrafields.php | 6 +---- .../admin/member_type_extrafields.php | 6 +---- htdocs/admin/agenda_extrafields.php | 6 +---- htdocs/admin/bank_extrafields.php | 6 +---- htdocs/admin/bankline_extrafields.php | 6 +---- htdocs/admin/bom_extrafields.php | 6 +---- htdocs/admin/bomline_extrafields.php | 6 +---- htdocs/admin/delivery_extrafields.php | 6 +---- htdocs/admin/deliverydet_extrafields.php | 6 +---- htdocs/admin/ecm_directories_extrafields.php | 6 +---- htdocs/admin/ecm_files_extrafields.php | 6 +---- ...ventorganization_confbooth_extrafields.php | 6 +---- ...nization_confboothattendee_extrafields.php | 6 +---- htdocs/admin/expedition_extrafields.php | 6 +---- htdocs/admin/expeditiondet_extrafields.php | 6 +---- htdocs/admin/expensereport_extrafields.php | 6 +---- htdocs/admin/holiday_extrafields.php | 6 +---- htdocs/admin/knowledgerecord_extrafields.php | 6 +---- htdocs/admin/mrp_extrafields.php | 6 +---- htdocs/admin/mrp_production_extrafields.php | 6 +---- htdocs/admin/order_extrafields.php | 6 +---- htdocs/admin/orderdet_extrafields.php | 6 +---- htdocs/admin/reception_extrafields.php | 6 +---- .../admin/receptiondet_batch_extrafields.php | 6 +---- htdocs/admin/resource_extrafields.php | 6 +---- htdocs/admin/supplierinvoice_extrafields.php | 6 +---- .../admin/supplierinvoice_rec_extrafields.php | 6 +---- .../admin/supplierinvoicedet_extrafields.php | 6 +---- .../supplierinvoicedet_rec_extrafields.php | 6 +---- htdocs/admin/supplierorder_extrafields.php | 6 +---- htdocs/admin/supplierorderdet_extrafields.php | 6 +---- htdocs/admin/ticket_extrafields.php | 6 +---- htdocs/asset/admin/asset_extrafields.php | 6 +---- htdocs/asset/admin/assetmodel_extrafields.php | 6 +---- .../admin/availabilities_extrafields.php | 6 +---- htdocs/bookcal/admin/calendar_extrafields.php | 6 +---- .../admin/categorie_extrafields.php | 6 +---- htdocs/comm/admin/propal_extrafields.php | 6 +---- htdocs/comm/admin/propaldet_extrafields.php | 6 +---- .../admin/invoice_cust_extrafields.php | 6 +---- .../admin/invoice_rec_cust_extrafields.php | 6 +---- .../admin/invoicedet_cust_extrafields.php | 6 +---- .../admin/invoicedet_rec_cust_extrafields.php | 6 +---- htdocs/contrat/admin/contract_extrafields.php | 6 +---- .../contrat/admin/contractdet_extrafields.php | 6 +---- htdocs/core/class/extrafields.class.php | 25 +++++++++++++++++++ htdocs/don/admin/donation_extrafields.php | 6 +---- .../fichinter/admin/fichinter_extrafields.php | 6 +---- .../admin/fichinterdet_extrafields.php | 6 +---- htdocs/hrm/admin/evaluation_extrafields.php | 6 +---- htdocs/hrm/admin/job_extrafields.php | 6 +---- htdocs/hrm/admin/skill_extrafields.php | 6 +---- htdocs/langs/en_US/main.lang | 2 +- htdocs/langs/en_US/members.lang | 6 ++--- htdocs/langs/en_US/website.lang | 16 ++++++------ htdocs/main.inc.php | 12 ++++++--- .../template/admin/myobject_extrafields.php | 6 +---- .../admin/partnership_extrafields.php | 6 +---- .../product/admin/inventory_extrafields.php | 6 +---- htdocs/product/admin/product_extrafields.php | 6 +---- .../product/admin/product_lot_extrafields.php | 6 +---- .../admin/product_supplier_extrafields.php | 6 +---- htdocs/product/admin/stock_extrafields.php | 6 +---- .../admin/stock_mouvement_extrafields.php | 6 +---- htdocs/projet/admin/project_extrafields.php | 6 +---- .../projet/admin/project_task_extrafields.php | 6 +---- htdocs/public/webportal/index.php | 2 +- htdocs/public/webportal/tpl/404.tpl.php | 1 + htdocs/public/webportal/tpl/errors.tpl.php | 1 + htdocs/public/webportal/tpl/footer.tpl.php | 1 + htdocs/public/webportal/tpl/header.tpl.php | 1 + .../public/webportal/tpl/header_login.tpl.php | 1 + .../webportal/tpl/hero-header-banner.tpl.php | 3 ++- htdocs/public/webportal/tpl/home.tpl.php | 1 + htdocs/public/webportal/tpl/login.tpl.php | 1 + htdocs/public/webportal/tpl/menu.tpl.php | 1 + .../admin/candidature_extrafields.php | 6 +---- .../admin/jobposition_extrafields.php | 6 +---- .../salaries/admin/salaries_extrafields.php | 6 +---- htdocs/societe/admin/contact_extrafields.php | 6 +---- htdocs/societe/admin/societe_extrafields.php | 6 +---- .../admin/supplier_proposal_extrafields.php | 6 +---- .../supplier_proposaldet_extrafields.php | 6 +---- htdocs/user/admin/group_extrafields.php | 6 +---- htdocs/user/admin/user_extrafields.php | 6 +---- htdocs/webportal/class/context.class.php | 2 +- .../class/html.formcardwebportal.class.php | 4 +-- .../class/html.formlistwebportal.class.php | 24 ++++++++++-------- .../class/html.formwebportal.class.php | 5 ++-- .../webportal/class/webportalmember.class.php | 7 +++--- 90 files changed, 150 insertions(+), 386 deletions(-) diff --git a/htdocs/adherents/admin/member_extrafields.php b/htdocs/adherents/admin/member_extrafields.php index 4bca5e91db1..b89a3a4cd05 100644 --- a/htdocs/adherents/admin/member_extrafields.php +++ b/htdocs/adherents/admin/member_extrafields.php @@ -36,11 +36,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/adherents/admin/member_type_extrafields.php b/htdocs/adherents/admin/member_type_extrafields.php index ac796a4d3ab..d8e935c592a 100644 --- a/htdocs/adherents/admin/member_type_extrafields.php +++ b/htdocs/adherents/admin/member_type_extrafields.php @@ -39,11 +39,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/agenda_extrafields.php b/htdocs/admin/agenda_extrafields.php index eed059c3ca7..d88e3e291c3 100644 --- a/htdocs/admin/agenda_extrafields.php +++ b/htdocs/admin/agenda_extrafields.php @@ -43,11 +43,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/bank_extrafields.php b/htdocs/admin/bank_extrafields.php index d01ac5a93e9..04bfc96e119 100644 --- a/htdocs/admin/bank_extrafields.php +++ b/htdocs/admin/bank_extrafields.php @@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/bankline_extrafields.php b/htdocs/admin/bankline_extrafields.php index 7e451275f8d..0eede80bed2 100644 --- a/htdocs/admin/bankline_extrafields.php +++ b/htdocs/admin/bankline_extrafields.php @@ -40,11 +40,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/bom_extrafields.php b/htdocs/admin/bom_extrafields.php index 7b77702eea4..02820781cd0 100644 --- a/htdocs/admin/bom_extrafields.php +++ b/htdocs/admin/bom_extrafields.php @@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/bomline_extrafields.php b/htdocs/admin/bomline_extrafields.php index 69a89e208fe..a2cf27e7afa 100644 --- a/htdocs/admin/bomline_extrafields.php +++ b/htdocs/admin/bomline_extrafields.php @@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/delivery_extrafields.php b/htdocs/admin/delivery_extrafields.php index 214f209b2be..6153554f288 100644 --- a/htdocs/admin/delivery_extrafields.php +++ b/htdocs/admin/delivery_extrafields.php @@ -45,11 +45,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/deliverydet_extrafields.php b/htdocs/admin/deliverydet_extrafields.php index 9c054f5bcfd..5c48b7335c5 100644 --- a/htdocs/admin/deliverydet_extrafields.php +++ b/htdocs/admin/deliverydet_extrafields.php @@ -46,11 +46,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/ecm_directories_extrafields.php b/htdocs/admin/ecm_directories_extrafields.php index f820f376995..81d344860e2 100644 --- a/htdocs/admin/ecm_directories_extrafields.php +++ b/htdocs/admin/ecm_directories_extrafields.php @@ -46,11 +46,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/ecm_files_extrafields.php b/htdocs/admin/ecm_files_extrafields.php index 563f9f58275..50c15a9d9d5 100644 --- a/htdocs/admin/ecm_files_extrafields.php +++ b/htdocs/admin/ecm_files_extrafields.php @@ -46,11 +46,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/eventorganization_confbooth_extrafields.php b/htdocs/admin/eventorganization_confbooth_extrafields.php index a4b14206c65..16195b97080 100644 --- a/htdocs/admin/eventorganization_confbooth_extrafields.php +++ b/htdocs/admin/eventorganization_confbooth_extrafields.php @@ -33,11 +33,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/eventorganization_confboothattendee_extrafields.php b/htdocs/admin/eventorganization_confboothattendee_extrafields.php index 8830e42dd26..0e5d5624d68 100644 --- a/htdocs/admin/eventorganization_confboothattendee_extrafields.php +++ b/htdocs/admin/eventorganization_confboothattendee_extrafields.php @@ -36,11 +36,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/expedition_extrafields.php b/htdocs/admin/expedition_extrafields.php index 303b0f88167..89b8d73a942 100644 --- a/htdocs/admin/expedition_extrafields.php +++ b/htdocs/admin/expedition_extrafields.php @@ -45,11 +45,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/expeditiondet_extrafields.php b/htdocs/admin/expeditiondet_extrafields.php index 56a023e1c83..e0e9f064f7e 100644 --- a/htdocs/admin/expeditiondet_extrafields.php +++ b/htdocs/admin/expeditiondet_extrafields.php @@ -46,11 +46,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/expensereport_extrafields.php b/htdocs/admin/expensereport_extrafields.php index 69f6bf14d61..861ac79f9bb 100644 --- a/htdocs/admin/expensereport_extrafields.php +++ b/htdocs/admin/expensereport_extrafields.php @@ -42,11 +42,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/holiday_extrafields.php b/htdocs/admin/holiday_extrafields.php index 21fce3d62d6..c31ab352757 100644 --- a/htdocs/admin/holiday_extrafields.php +++ b/htdocs/admin/holiday_extrafields.php @@ -42,11 +42,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/knowledgerecord_extrafields.php b/htdocs/admin/knowledgerecord_extrafields.php index 13c628be99b..ef8b53612ab 100644 --- a/htdocs/admin/knowledgerecord_extrafields.php +++ b/htdocs/admin/knowledgerecord_extrafields.php @@ -39,11 +39,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/mrp_extrafields.php b/htdocs/admin/mrp_extrafields.php index cd18b47eec7..7a72eae0067 100644 --- a/htdocs/admin/mrp_extrafields.php +++ b/htdocs/admin/mrp_extrafields.php @@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/mrp_production_extrafields.php b/htdocs/admin/mrp_production_extrafields.php index a3ccf2b4d2c..6e1d35ab009 100644 --- a/htdocs/admin/mrp_production_extrafields.php +++ b/htdocs/admin/mrp_production_extrafields.php @@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/order_extrafields.php b/htdocs/admin/order_extrafields.php index 8ebbce2cc4d..53accc49e00 100644 --- a/htdocs/admin/order_extrafields.php +++ b/htdocs/admin/order_extrafields.php @@ -43,11 +43,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/orderdet_extrafields.php b/htdocs/admin/orderdet_extrafields.php index e9c0947d6a2..bc5bda1ca4d 100644 --- a/htdocs/admin/orderdet_extrafields.php +++ b/htdocs/admin/orderdet_extrafields.php @@ -44,11 +44,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/reception_extrafields.php b/htdocs/admin/reception_extrafields.php index bf87698e5d8..152d4e8181a 100644 --- a/htdocs/admin/reception_extrafields.php +++ b/htdocs/admin/reception_extrafields.php @@ -48,11 +48,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->trans($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/receptiondet_batch_extrafields.php b/htdocs/admin/receptiondet_batch_extrafields.php index ea98618dda0..2447f6dd50b 100644 --- a/htdocs/admin/receptiondet_batch_extrafields.php +++ b/htdocs/admin/receptiondet_batch_extrafields.php @@ -48,11 +48,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->trans($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/resource_extrafields.php b/htdocs/admin/resource_extrafields.php index 62c1c4cfed2..780ba0ffa43 100644 --- a/htdocs/admin/resource_extrafields.php +++ b/htdocs/admin/resource_extrafields.php @@ -42,11 +42,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/supplierinvoice_extrafields.php b/htdocs/admin/supplierinvoice_extrafields.php index d0da90dcad4..27bfad1a1de 100644 --- a/htdocs/admin/supplierinvoice_extrafields.php +++ b/htdocs/admin/supplierinvoice_extrafields.php @@ -43,11 +43,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/supplierinvoice_rec_extrafields.php b/htdocs/admin/supplierinvoice_rec_extrafields.php index 2fda69ff695..92f49561840 100644 --- a/htdocs/admin/supplierinvoice_rec_extrafields.php +++ b/htdocs/admin/supplierinvoice_rec_extrafields.php @@ -44,11 +44,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/supplierinvoicedet_extrafields.php b/htdocs/admin/supplierinvoicedet_extrafields.php index 8fa0f5130c9..73974e8f603 100644 --- a/htdocs/admin/supplierinvoicedet_extrafields.php +++ b/htdocs/admin/supplierinvoicedet_extrafields.php @@ -45,11 +45,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/supplierinvoicedet_rec_extrafields.php b/htdocs/admin/supplierinvoicedet_rec_extrafields.php index 666430611d8..fa280de0f4d 100644 --- a/htdocs/admin/supplierinvoicedet_rec_extrafields.php +++ b/htdocs/admin/supplierinvoicedet_rec_extrafields.php @@ -46,11 +46,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/supplierorder_extrafields.php b/htdocs/admin/supplierorder_extrafields.php index 17a2eccbc58..0f56cd5f9ce 100644 --- a/htdocs/admin/supplierorder_extrafields.php +++ b/htdocs/admin/supplierorder_extrafields.php @@ -43,11 +43,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/supplierorderdet_extrafields.php b/htdocs/admin/supplierorderdet_extrafields.php index 6e5b8aa0175..e7f45228773 100644 --- a/htdocs/admin/supplierorderdet_extrafields.php +++ b/htdocs/admin/supplierorderdet_extrafields.php @@ -44,11 +44,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/admin/ticket_extrafields.php b/htdocs/admin/ticket_extrafields.php index ccd0c75bd76..dfb8a8ccbe8 100644 --- a/htdocs/admin/ticket_extrafields.php +++ b/htdocs/admin/ticket_extrafields.php @@ -34,11 +34,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->trans($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/asset/admin/asset_extrafields.php b/htdocs/asset/admin/asset_extrafields.php index b5671e27071..b06068cb384 100644 --- a/htdocs/asset/admin/asset_extrafields.php +++ b/htdocs/asset/admin/asset_extrafields.php @@ -39,11 +39,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/asset/admin/assetmodel_extrafields.php b/htdocs/asset/admin/assetmodel_extrafields.php index cddd3831e8e..4582b92d8d1 100644 --- a/htdocs/asset/admin/assetmodel_extrafields.php +++ b/htdocs/asset/admin/assetmodel_extrafields.php @@ -39,11 +39,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/bookcal/admin/availabilities_extrafields.php b/htdocs/bookcal/admin/availabilities_extrafields.php index cf677ac6115..8241073f3fc 100644 --- a/htdocs/bookcal/admin/availabilities_extrafields.php +++ b/htdocs/bookcal/admin/availabilities_extrafields.php @@ -39,11 +39,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/bookcal/admin/calendar_extrafields.php b/htdocs/bookcal/admin/calendar_extrafields.php index 46a7a39ebb4..79eabea10c9 100644 --- a/htdocs/bookcal/admin/calendar_extrafields.php +++ b/htdocs/bookcal/admin/calendar_extrafields.php @@ -40,11 +40,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/categories/admin/categorie_extrafields.php b/htdocs/categories/admin/categorie_extrafields.php index 7f2fabe4a3a..431869f2fe2 100644 --- a/htdocs/categories/admin/categorie_extrafields.php +++ b/htdocs/categories/admin/categorie_extrafields.php @@ -36,11 +36,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/comm/admin/propal_extrafields.php b/htdocs/comm/admin/propal_extrafields.php index fa0c9117430..63102d494e5 100644 --- a/htdocs/comm/admin/propal_extrafields.php +++ b/htdocs/comm/admin/propal_extrafields.php @@ -36,11 +36,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/comm/admin/propaldet_extrafields.php b/htdocs/comm/admin/propaldet_extrafields.php index 0f904b31407..dee9f1bcd74 100644 --- a/htdocs/comm/admin/propaldet_extrafields.php +++ b/htdocs/comm/admin/propaldet_extrafields.php @@ -39,11 +39,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/compta/facture/admin/invoice_cust_extrafields.php b/htdocs/compta/facture/admin/invoice_cust_extrafields.php index 6b8581c9399..b013b60282b 100644 --- a/htdocs/compta/facture/admin/invoice_cust_extrafields.php +++ b/htdocs/compta/facture/admin/invoice_cust_extrafields.php @@ -37,11 +37,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/compta/facture/admin/invoice_rec_cust_extrafields.php b/htdocs/compta/facture/admin/invoice_rec_cust_extrafields.php index 00fb625271c..5894e96f25d 100644 --- a/htdocs/compta/facture/admin/invoice_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/invoice_rec_cust_extrafields.php @@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/compta/facture/admin/invoicedet_cust_extrafields.php b/htdocs/compta/facture/admin/invoicedet_cust_extrafields.php index 61eabbac825..db286c7a5d3 100644 --- a/htdocs/compta/facture/admin/invoicedet_cust_extrafields.php +++ b/htdocs/compta/facture/admin/invoicedet_cust_extrafields.php @@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/compta/facture/admin/invoicedet_rec_cust_extrafields.php b/htdocs/compta/facture/admin/invoicedet_rec_cust_extrafields.php index ed9a8d5d280..75b6f8c19be 100644 --- a/htdocs/compta/facture/admin/invoicedet_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/invoicedet_rec_cust_extrafields.php @@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/contrat/admin/contract_extrafields.php b/htdocs/contrat/admin/contract_extrafields.php index a7c092f5473..5756d23472f 100644 --- a/htdocs/contrat/admin/contract_extrafields.php +++ b/htdocs/contrat/admin/contract_extrafields.php @@ -39,11 +39,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/contrat/admin/contractdet_extrafields.php b/htdocs/contrat/admin/contractdet_extrafields.php index ad5922991e7..cbefbdb0faf 100644 --- a/htdocs/contrat/admin/contractdet_extrafields.php +++ b/htdocs/contrat/admin/contractdet_extrafields.php @@ -39,11 +39,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index a3fe934b5a4..ac327355fd4 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -2564,6 +2564,31 @@ class ExtraFields return 0; } + /** + * Return array with all possible types and label of extrafields + * + * @return string[] + */ + public static function getListofTypesLabels() + { + global $langs; + + $tmptype2label = ExtraFields::$type2label; + $type2label = array(''); + foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); + } + + if (!getDolGlobalString('MAIN_USE_GEOPHP')) { + unset($type2label['point']); + unset($type2label['multipts']); + unset($type2label['linestrg']); + unset($type2label['polygon']); + } + + return $type2label; + } + /** * Return if a value is "empty" for a mandatory vision. * diff --git a/htdocs/don/admin/donation_extrafields.php b/htdocs/don/admin/donation_extrafields.php index ef2c011d9cf..1e950a86736 100644 --- a/htdocs/don/admin/donation_extrafields.php +++ b/htdocs/don/admin/donation_extrafields.php @@ -34,11 +34,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/fichinter/admin/fichinter_extrafields.php b/htdocs/fichinter/admin/fichinter_extrafields.php index 2a6a8d603d1..07cd83b1e02 100644 --- a/htdocs/fichinter/admin/fichinter_extrafields.php +++ b/htdocs/fichinter/admin/fichinter_extrafields.php @@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/fichinter/admin/fichinterdet_extrafields.php b/htdocs/fichinter/admin/fichinterdet_extrafields.php index ddc34952dc0..23a9b412b31 100644 --- a/htdocs/fichinter/admin/fichinterdet_extrafields.php +++ b/htdocs/fichinter/admin/fichinterdet_extrafields.php @@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/hrm/admin/evaluation_extrafields.php b/htdocs/hrm/admin/evaluation_extrafields.php index 8363829975e..d571dfc3782 100644 --- a/htdocs/hrm/admin/evaluation_extrafields.php +++ b/htdocs/hrm/admin/evaluation_extrafields.php @@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); // Get Parameters $action = GETPOST('action', 'aZ09'); diff --git a/htdocs/hrm/admin/job_extrafields.php b/htdocs/hrm/admin/job_extrafields.php index 8b30b1c7051..c5da43c8044 100644 --- a/htdocs/hrm/admin/job_extrafields.php +++ b/htdocs/hrm/admin/job_extrafields.php @@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); // Get Parameters $action = GETPOST('action', 'aZ09'); diff --git a/htdocs/hrm/admin/skill_extrafields.php b/htdocs/hrm/admin/skill_extrafields.php index d2541af15fa..bec1dd43197 100644 --- a/htdocs/hrm/admin/skill_extrafields.php +++ b/htdocs/hrm/admin/skill_extrafields.php @@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 7da49f58c07..641e6275b1d 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1171,7 +1171,7 @@ OutOfDate=Out-of-date EventReminder=Event Reminder UpdateForAllLines=Update for all lines OnHold=On hold -Civility=Civility +Civility=Title of courtesy AffectTag=Assign a Tag AffectUser=Assign a User SetSupervisor=Set the supervisor diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index 786453d972d..d4e2d81f4c1 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -200,8 +200,8 @@ MembersStatisticsDesc=Choose statistics you want to read... MenuMembersStats=Statistics LastMemberDate=Latest membership date LatestSubscriptionDate=Latest contribution date -MemberNature=Nature of the member -MembersNature=Nature of the members +MemberNature=Nature member +MembersNature=Nature of members Public=%s can publish my membership in the public register MembershipPublic=Public membership NewMemberbyWeb=New member added. Awaiting approval @@ -246,4 +246,4 @@ XSubsriptionCreated=%s subscription(s) created XSubsriptionErrors=%s subscription(s) where in error CreateSubscription=Create subscription WarningNoComplementaryActionDone=No Complementary action on recording will be executed with this massaction -NewMembership=New membership \ No newline at end of file +NewMembership=New membership diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index 23fb595fdf2..7d9c3c58e4b 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -188,20 +188,20 @@ WebPortalUserLoggedHelp=This user is used to update cards WebPortalHomeTitle=Welcome WebPortalHomeDesc=Welcome to the public interface WebPortalPropalListMenu=Proposals -WebPortalPropalListTitle=List of proposals -WebPortalPropalListDesc=List of proposals +WebPortalPropalListTitle=Proposals +WebPortalPropalListDesc=You will find here all your proposals WebPortalPropalListNothing=Proposals not found -WebPortalOrderListMenu=Orders -WebPortalOrderListTitle=List of orders -WebPortalOrderListDesc=List of orders +WebPortalOrderListMenu=Sales Orders +WebPortalOrderListTitle=Sales orders +WebPortalOrderListDesc=You will find here all your sales orders WebPortalOrderListNothing=Orders not found WebPortalInvoiceListMenu=Invoices -WebPortalInvoiceListTitle=List of invoices -WebPortalInvoiceListDesc=List of invoices +WebPortalInvoiceListTitle=Invoices +WebPortalInvoiceListDesc=You will find here all your invoices WebPortalInvoiceListNothing=Invoices not found WebPortalMemberCardMenu=Member WebPortalMemberCardTitle=Member card -WebPortalMemberCardDesc=Member card +WebPortalMemberCardDesc=This is information related to your membership WebPortalPartnershipCardMenu=Partnership WebPortalPartnershipCardTitle=Partnership card WebPortalPartnershipCardDesc=Partnership card diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 015a2b26b58..30dd4048d6a 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1936,8 +1936,10 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr } // LEAFLET AND GEOMAN - print '\n"; - print '\n"; + if (!getDolGlobalString('MAIN_ALLOW_GEOPHP')) { + print '\n"; + print '\n"; + } // CSS forced by modules (relative url starting with /) if (!empty($conf->modules_parts['css'])) { @@ -2094,8 +2096,10 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr print ''."\n"; // Leaflet TODO use dolibarr files - print ''."\n"; - print ''."\n"; + if (!getDolGlobalString('MAIN_ALLOW_GEOPHP')) { + print ''."\n"; + print ''."\n"; + } // JS forced by modules (relative url starting with /) if (!empty($conf->modules_parts['js'])) { // $conf->modules_parts['js'] is array('module'=>array('file1','file2')) diff --git a/htdocs/modulebuilder/template/admin/myobject_extrafields.php b/htdocs/modulebuilder/template/admin/myobject_extrafields.php index 4f77d38a8fd..2cb2cc6882d 100644 --- a/htdocs/modulebuilder/template/admin/myobject_extrafields.php +++ b/htdocs/modulebuilder/template/admin/myobject_extrafields.php @@ -65,11 +65,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/partnership/admin/partnership_extrafields.php b/htdocs/partnership/admin/partnership_extrafields.php index b96ea51a096..71134ffffab 100644 --- a/htdocs/partnership/admin/partnership_extrafields.php +++ b/htdocs/partnership/admin/partnership_extrafields.php @@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/product/admin/inventory_extrafields.php b/htdocs/product/admin/inventory_extrafields.php index f28ca9af020..06b090e0f85 100644 --- a/htdocs/product/admin/inventory_extrafields.php +++ b/htdocs/product/admin/inventory_extrafields.php @@ -41,11 +41,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/product/admin/product_extrafields.php b/htdocs/product/admin/product_extrafields.php index d5b97555ba4..a89d4ae4a1d 100644 --- a/htdocs/product/admin/product_extrafields.php +++ b/htdocs/product/admin/product_extrafields.php @@ -37,11 +37,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/product/admin/product_lot_extrafields.php b/htdocs/product/admin/product_lot_extrafields.php index 6f0f28ff235..6266d1ad3c2 100644 --- a/htdocs/product/admin/product_lot_extrafields.php +++ b/htdocs/product/admin/product_lot_extrafields.php @@ -37,11 +37,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/product/admin/product_supplier_extrafields.php b/htdocs/product/admin/product_supplier_extrafields.php index 6469c3d9b42..79fbe559255 100644 --- a/htdocs/product/admin/product_supplier_extrafields.php +++ b/htdocs/product/admin/product_supplier_extrafields.php @@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/product/admin/stock_extrafields.php b/htdocs/product/admin/stock_extrafields.php index a10de1f1e42..14b1d62b9ed 100644 --- a/htdocs/product/admin/stock_extrafields.php +++ b/htdocs/product/admin/stock_extrafields.php @@ -36,11 +36,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/product/admin/stock_mouvement_extrafields.php b/htdocs/product/admin/stock_mouvement_extrafields.php index 6ce64991f5d..24658e29abb 100644 --- a/htdocs/product/admin/stock_mouvement_extrafields.php +++ b/htdocs/product/admin/stock_mouvement_extrafields.php @@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/projet/admin/project_extrafields.php b/htdocs/projet/admin/project_extrafields.php index f2a17d3f150..41659dc7c99 100644 --- a/htdocs/projet/admin/project_extrafields.php +++ b/htdocs/projet/admin/project_extrafields.php @@ -37,11 +37,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/projet/admin/project_task_extrafields.php b/htdocs/projet/admin/project_task_extrafields.php index 731ac3629ae..329df6dd761 100644 --- a/htdocs/projet/admin/project_task_extrafields.php +++ b/htdocs/projet/admin/project_task_extrafields.php @@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/public/webportal/index.php b/htdocs/public/webportal/index.php index 9e293d5a04f..b0222f55e61 100644 --- a/htdocs/public/webportal/index.php +++ b/htdocs/public/webportal/index.php @@ -32,9 +32,9 @@ include 'webportal.main.inc.php'; * Action */ - $context->controllerInstance->action(); + /* * View */ diff --git a/htdocs/public/webportal/tpl/404.tpl.php b/htdocs/public/webportal/tpl/404.tpl.php index 0a022a8b09f..87442402999 100644 --- a/htdocs/public/webportal/tpl/404.tpl.php +++ b/htdocs/public/webportal/tpl/404.tpl.php @@ -1,3 +1,4 @@ +
theme->bannerUseDarkTheme) ? ' data-theme="dark" ': '' ?> >

title; ?>

desc; ?>
-
\ No newline at end of file + diff --git a/htdocs/public/webportal/tpl/home.tpl.php b/htdocs/public/webportal/tpl/home.tpl.php index a610c757aaf..8e9a1739b04 100644 --- a/htdocs/public/webportal/tpl/home.tpl.php +++ b/htdocs/public/webportal/tpl/home.tpl.php @@ -1,3 +1,4 @@ + $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/recruitment/admin/jobposition_extrafields.php b/htdocs/recruitment/admin/jobposition_extrafields.php index 02e4eb2566d..76f23d5c60d 100644 --- a/htdocs/recruitment/admin/jobposition_extrafields.php +++ b/htdocs/recruitment/admin/jobposition_extrafields.php @@ -33,11 +33,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/salaries/admin/salaries_extrafields.php b/htdocs/salaries/admin/salaries_extrafields.php index 85b389d0697..47c3071d326 100644 --- a/htdocs/salaries/admin/salaries_extrafields.php +++ b/htdocs/salaries/admin/salaries_extrafields.php @@ -35,11 +35,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/societe/admin/contact_extrafields.php b/htdocs/societe/admin/contact_extrafields.php index 6f9a24e27fc..795dcd28796 100644 --- a/htdocs/societe/admin/contact_extrafields.php +++ b/htdocs/societe/admin/contact_extrafields.php @@ -35,11 +35,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/societe/admin/societe_extrafields.php b/htdocs/societe/admin/societe_extrafields.php index 861f4888be0..8451f7c83b7 100644 --- a/htdocs/societe/admin/societe_extrafields.php +++ b/htdocs/societe/admin/societe_extrafields.php @@ -35,11 +35,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php b/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php index 4d69ad5d8ae..f9f1a2687fd 100644 --- a/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php +++ b/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php @@ -30,11 +30,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php b/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php index be89df64755..44b7f78d6b3 100644 --- a/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php +++ b/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php @@ -38,11 +38,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/user/admin/group_extrafields.php b/htdocs/user/admin/group_extrafields.php index 22700bfe619..1bc8d1a995e 100644 --- a/htdocs/user/admin/group_extrafields.php +++ b/htdocs/user/admin/group_extrafields.php @@ -37,11 +37,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/user/admin/user_extrafields.php b/htdocs/user/admin/user_extrafields.php index c6a2b2c4a28..8e10daa4176 100644 --- a/htdocs/user/admin/user_extrafields.php +++ b/htdocs/user/admin/user_extrafields.php @@ -36,11 +36,7 @@ $extrafields = new ExtraFields($db); $form = new Form($db); // List of supported format -$tmptype2label = ExtraFields::$type2label; -$type2label = array(''); -foreach ($tmptype2label as $key => $val) { - $type2label[$key] = $langs->transnoentitiesnoconv($val); -} +$type2label = ExtraFields::getListOfTypesLabels(); $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); diff --git a/htdocs/webportal/class/context.class.php b/htdocs/webportal/class/context.class.php index c0a77ffcb2f..9272071f228 100644 --- a/htdocs/webportal/class/context.class.php +++ b/htdocs/webportal/class/context.class.php @@ -210,7 +210,7 @@ class Context */ public function initController() { - global $db, $conf, $langs; + global $db; $defaultControllersPath = __DIR__ . '/../controllers/'; diff --git a/htdocs/webportal/class/html.formcardwebportal.class.php b/htdocs/webportal/class/html.formcardwebportal.class.php index a149274cc7c..ec4f8e6f368 100644 --- a/htdocs/webportal/class/html.formcardwebportal.class.php +++ b/htdocs/webportal/class/html.formcardwebportal.class.php @@ -466,7 +466,7 @@ class FormCardWebPortal // main information - begin $html .= '
'; // ref - $html .= '
' . $object->ref . '
'; + $html .= '
' . $langs->trans("Ref").' : '.dol_escape_htmltag($object->ref) . '
'; // full name $fullname = ''; if (method_exists($object, 'getFullName')) { @@ -737,7 +737,7 @@ class FormCardWebPortal { global $hookmanager, $langs; - $html = ''; + $html = ''; // initialize $action = $this->action; diff --git a/htdocs/webportal/class/html.formlistwebportal.class.php b/htdocs/webportal/class/html.formlistwebportal.class.php index 24878d1584e..50a087bad68 100644 --- a/htdocs/webportal/class/html.formlistwebportal.class.php +++ b/htdocs/webportal/class/html.formlistwebportal.class.php @@ -286,6 +286,8 @@ class FormListWebPortal $sortorder = 'DESC'; } + $socid = (int) $context->logged_thirdparty->id; + // Build and execute select // -------------------------------------------------------------------- $sql = "SELECT "; @@ -310,7 +312,8 @@ class FormListWebPortal $sql .= " WHERE 1 = 1"; } // filter on logged third-party - $sql .= " AND t.fk_soc = " . (int) $context->logged_thirdparty->id; + $sql .= " AND t.fk_soc = " . $socid; + foreach ($search as $key => $val) { if (array_key_exists($key, $object->fields)) { if (($key == 'status' || $key == 'fk_statut') && $search[$key] == $emptyValueKey) { @@ -562,6 +565,16 @@ class FormListWebPortal $html .= ''; $html .= ''; + + // Store company + $idCompany = (int) $socid; + if (!isset($this->companyStaticList[$socid])) { + $companyStatic = new Societe($this->db); + $companyStatic->fetch($idCompany); + $this->companyStaticList[$idCompany] = $companyStatic; + } + $companyStatic = $this->companyStaticList[$socid]; + // Loop on record // -------------------------------------------------------------------- $i = 0; @@ -580,15 +593,6 @@ class FormListWebPortal // specific to get invoice status (depends on payment) $payment = -1; if ($elementEn == 'invoice') { - // store company - $idCompany = (int) $obj->fk_soc; - if (!isset($this->companyStaticList[$obj->fk_soc])) { - $companyStatic = new Societe($this->db); - $companyStatic->fetch($idCompany); - $this->companyStaticList[$idCompany] = $companyStatic; - } - $companyStatic = $this->companyStaticList[$obj->fk_soc]; - // paid sum $payment = $object->getSommePaiement(); $totalcreditnotes = $object->getSumCreditNotesUsed(); diff --git a/htdocs/webportal/class/html.formwebportal.class.php b/htdocs/webportal/class/html.formwebportal.class.php index a5a9f14d580..849bccb625a 100644 --- a/htdocs/webportal/class/html.formwebportal.class.php +++ b/htdocs/webportal/class/html.formwebportal.class.php @@ -961,13 +961,14 @@ class FormWebPortal extends Form $label = empty($val['label']) ? '' : $val['label']; $type = empty($val['type']) ? '' : $val['type']; - $size = empty($val['css']) ? '' : $val['css']; + $css = empty($val['css']) ? '' : $val['css']; + $picto = empty($val['picto']) ? '' : $val['picto']; $reg = array(); // Convert var to be able to share same code than showOutputField of extrafields if (preg_match('/varchar\((\d+)\)/', $type, $reg)) { $type = 'varchar'; // convert varchar(xx) int varchar - $size = $reg[1]; + $css = $reg[1]; } elseif (preg_match('/varchar/', $type)) { $type = 'varchar'; // convert varchar(xx) int varchar } diff --git a/htdocs/webportal/class/webportalmember.class.php b/htdocs/webportal/class/webportalmember.class.php index 803a405fd5d..cfa979279f3 100644 --- a/htdocs/webportal/class/webportalmember.class.php +++ b/htdocs/webportal/class/webportalmember.class.php @@ -132,17 +132,18 @@ class WebPortalMember extends Adherent 'phone' => array('type' => 'varchar(30)', 'label' => 'Phone', 'enabled' => 1, 'visible' => 4, 'position' => 115, 'showonheader' => 1,), 'phone_perso' => array('type' => 'varchar(30)', 'label' => 'Phone perso', 'enabled' => 1, 'visible' => 4, 'position' => 120, 'showonheader' => 1,), 'phone_mobile' => array('type' => 'varchar(30)', 'label' => 'Phone mobile', 'enabled' => 1, 'visible' => 4, 'position' => 125, 'showonheader' => 1,), - 'email' => array('type' => 'varchar(255)', 'label' => 'Email', 'enabled' => 1, 'visible' => 4, 'position' => 200, 'showonheader' => 1,), + 'email' => array('type' => 'varchar(255)', 'label' => 'Email', 'enabled' => 1, 'visible' => 4, 'position' => 200, 'showonheader' => 1, 'picto' => 'email'), 'url' => array('type' => 'varchar(255)', 'label' => 'Url', 'enabled' => 1, 'visible' => 4, 'position' => 210, 'showonheader' => 1,), 'login' => array('type' => 'varchar(50)', 'label' => 'Login', 'enabled' => 1, 'visible' => 4, 'position' => 240,), - 'typeid' => array('type' => 'integer:AdherentType:adherents/class/adherent_type.class.php', 'label' => 'Type', 'enabled' => 1, 'visible' => 4, 'notnull' => 1, 'position' => 255), + 'typeid' => array('type' => 'integer:AdherentType:adherents/class/adherent_type.class.php', 'label' => 'MemberType', 'enabled' => 1, 'visible' => 4, 'notnull' => 1, 'position' => 255), 'morphy' => array('type' => 'varchar(3)', 'label' => 'MemberNature', 'enabled' => 1, 'visible' => 4, 'notnull' => 1, 'position' => 260, 'arrayofkeyval' => self::MORPHY_LIST,), 'civility_id' => array('type' => 'sellist:c_civility:label:rowid::active=1', 'label' => 'Civility', 'enabled' => 1, 'visible' => 4, 'position' => 270,), - 'datefin' => array('type' => 'date', 'label' => 'SubscriptionEndDate', 'enabled' => 1, 'visible' => 5, 'position' => 280,), 'birth' => array('type' => 'date', 'label' => 'DateOfBirth', 'enabled' => 1, 'visible' => 4, 'position' => 290,), 'fk_soc' => array('type' => 'integer:Societe:societe/class/societe.class.php', 'label' => 'ThirdParty', 'enabled' => 1, 'visible' => 5, 'position' => 300,), + 'datefin' => array('type' => 'date', 'label' => 'SubscriptionEndDate', 'enabled' => 1, 'visible' => 5, 'position' => 400,), + 'status' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 5, 'notnull' => 1, 'position' => 500, 'arrayofkeyval' => self::STATUS_SHORT_LIST, 'showonheader' => 1,), ); public $rowid;