From 416543a5f5913b45c316d3df077b7ff5e4e29292 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jan 2022 13:49:46 +0100 Subject: [PATCH] Standardize code to allow deletion of an odt template --- htdocs/admin/agenda_other.php | 2 ++ htdocs/admin/agenda_reminder.php | 2 ++ htdocs/admin/barcode.php | 1 + htdocs/admin/bom.php | 2 ++ htdocs/admin/commande.php | 2 ++ htdocs/admin/contract.php | 2 ++ htdocs/admin/delivery.php | 2 ++ htdocs/admin/eventorganization.php | 2 ++ htdocs/admin/expedition.php | 2 ++ htdocs/admin/expensereport.php | 2 ++ htdocs/admin/facture.php | 2 ++ htdocs/admin/facture_situation.php | 2 ++ htdocs/admin/fichinter.php | 2 ++ htdocs/admin/holiday.php | 2 ++ htdocs/admin/hrm.php | 2 ++ htdocs/admin/import.php | 2 ++ htdocs/admin/knowledgemanagement.php | 3 ++- htdocs/admin/mrp.php | 2 ++ htdocs/admin/propal.php | 2 ++ htdocs/admin/reception_setup.php | 2 ++ htdocs/admin/supplier_order.php | 2 ++ htdocs/admin/supplier_payment.php | 2 ++ htdocs/admin/supplier_proposal.php | 2 ++ htdocs/admin/ticket.php | 2 ++ htdocs/admin/user.php | 2 ++ htdocs/admin/usergroup.php | 2 ++ htdocs/admin/workstation.php | 1 + .../modules/propale/doc/doc_generic_proposal_odt.modules.php | 5 ++++- 28 files changed, 56 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 8e50380e2ae..1014d40de50 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -41,6 +41,8 @@ $langs->loadLangs(array('admin', 'other', 'agenda', 'users')); $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $param = GETPOST('param', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php index 1d8cd8f723c..79aa081ddef 100644 --- a/htdocs/admin/agenda_reminder.php +++ b/htdocs/admin/agenda_reminder.php @@ -36,6 +36,8 @@ $langs->loadLangs(array("admin", "other", "agenda")); $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $param = GETPOST('param', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $scandir = GETPOST('scandir', 'alpha'); diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index 2fbfed35536..ee0fcd5d130 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -36,6 +36,7 @@ if (!$user->admin) { } $action = GETPOST('action', 'aZ09'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php /* diff --git a/htdocs/admin/bom.php b/htdocs/admin/bom.php index a36c3698306..e3adb206d7e 100644 --- a/htdocs/admin/bom.php +++ b/htdocs/admin/bom.php @@ -36,6 +36,8 @@ if (!$user->admin) { $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); $type = 'bom'; diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 24a45bb413a..5c8eb88126c 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -46,6 +46,8 @@ if (!$user->admin) { $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); $type = 'order'; diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index 1c6a0ec0458..0c8aba5ae2d 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -37,6 +37,8 @@ if (!$user->admin) { $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); $type = 'contract'; diff --git a/htdocs/admin/delivery.php b/htdocs/admin/delivery.php index 8e60b02a5bf..6f0f4c1b415 100644 --- a/htdocs/admin/delivery.php +++ b/htdocs/admin/delivery.php @@ -43,6 +43,8 @@ if (!$user->admin) { $action = GETPOST('action', 'alpha'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); $type = 'delivery'; diff --git a/htdocs/admin/eventorganization.php b/htdocs/admin/eventorganization.php index 8edc61bf255..904d10bff67 100644 --- a/htdocs/admin/eventorganization.php +++ b/htdocs/admin/eventorganization.php @@ -41,6 +41,8 @@ $backtopage = GETPOST('backtopage', 'alpha'); $value = GETPOST('value', 'alpha'); $label = GETPOST('label', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $scandir = GETPOST('scan_dir', 'alpha'); $type = 'myobject'; diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index 2d4736cc49d..12e0d0a6d01 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -43,6 +43,8 @@ if (!$user->admin) { $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); $type = 'shipping'; diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index 5b73d995b5c..fc63940f0b8 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -43,6 +43,8 @@ if (!$user->admin) { $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); $type = 'expensereport'; diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index ae269492ddf..9eec54b03a7 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -42,6 +42,8 @@ if (!$user->admin) { $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); $type = 'invoice'; diff --git a/htdocs/admin/facture_situation.php b/htdocs/admin/facture_situation.php index 789faacacad..609a6605d1a 100644 --- a/htdocs/admin/facture_situation.php +++ b/htdocs/admin/facture_situation.php @@ -51,6 +51,8 @@ $backtopage = GETPOST('backtopage', 'alpha'); $value = GETPOST('value', 'alpha'); $label = GETPOST('label', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $scandir = GETPOST('scan_dir', 'alpha'); $type = 'invoice'; diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index 4369bb9a2a7..c95f354a189 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -43,6 +43,8 @@ if (!$user->admin) { $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); $type = 'ficheinter'; diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php index bfd7e22c461..c1755b17edf 100644 --- a/htdocs/admin/holiday.php +++ b/htdocs/admin/holiday.php @@ -39,6 +39,8 @@ if (!$user->admin) { $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); $type = 'contract'; diff --git a/htdocs/admin/hrm.php b/htdocs/admin/hrm.php index 1ad84ce19ac..aea86069f4d 100644 --- a/htdocs/admin/hrm.php +++ b/htdocs/admin/hrm.php @@ -50,6 +50,8 @@ $backtopage = GETPOST('backtopage', 'alpha'); $value = GETPOST('value', 'alpha'); $label = GETPOST('label', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $scandir = GETPOST('scan_dir', 'alpha'); $type = 'myobject'; diff --git a/htdocs/admin/import.php b/htdocs/admin/import.php index cd9d7b44074..37168baa3d4 100644 --- a/htdocs/admin/import.php +++ b/htdocs/admin/import.php @@ -41,6 +41,8 @@ if (!$user->admin) { $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + /* * Actions diff --git a/htdocs/admin/knowledgemanagement.php b/htdocs/admin/knowledgemanagement.php index 8d93c16741a..c2440bbb885 100644 --- a/htdocs/admin/knowledgemanagement.php +++ b/htdocs/admin/knowledgemanagement.php @@ -37,8 +37,9 @@ $langs->loadLangs(array("admin", "knowledgemanagement")); // Parameters $action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); - $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); $type = 'knowledgemanagement'; diff --git a/htdocs/admin/mrp.php b/htdocs/admin/mrp.php index 54efdc4df19..fac6a3f3d41 100644 --- a/htdocs/admin/mrp.php +++ b/htdocs/admin/mrp.php @@ -37,6 +37,8 @@ if (!$user->admin) { $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); $type = 'mrp'; diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index 22ce045a7ab..6384c561967 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -43,6 +43,8 @@ if (!$user->admin) { $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); $type = 'propal'; diff --git a/htdocs/admin/reception_setup.php b/htdocs/admin/reception_setup.php index 218cc1ef853..26300ece329 100644 --- a/htdocs/admin/reception_setup.php +++ b/htdocs/admin/reception_setup.php @@ -36,6 +36,8 @@ if (!$user->admin) { $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); $type = 'reception'; diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index 808528cdc0a..0da79845d14 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -43,6 +43,8 @@ if (!$user->admin) { $type = GETPOST('type', 'alpha'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $label = GETPOST('label', 'alpha'); $action = GETPOST('action', 'aZ09'); $scandir = GETPOST('scan_dir', 'alpha'); diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index b31e4c9a433..a41f9fdf80c 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -37,6 +37,8 @@ if (!$user->admin) { $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scandir', 'alpha'); $type = 'supplier_payment'; diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index 6e3f190aeb6..9bd684afb22 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -38,6 +38,8 @@ if (!$user->admin) { $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); $type = 'supplier_proposal'; diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php index 03fd647dd29..f4e5b4f3fad 100644 --- a/htdocs/admin/ticket.php +++ b/htdocs/admin/ticket.php @@ -38,6 +38,8 @@ if (!$user->admin) { // Parameters $value = GETPOST('value', 'alpha'); $action = GETPOST('action', 'aZ09'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scandir', 'alpha'); $type = 'ticket'; diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index 85ab0f0e9a8..53de8fe2502 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -43,9 +43,11 @@ $extrafields = new ExtraFields($db); $action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php $value = GETPOST('value', 'alpha'); $label = GETPOST('label', 'alpha'); + $scandir = GETPOST('scandir', 'alpha'); $type = 'user'; diff --git a/htdocs/admin/usergroup.php b/htdocs/admin/usergroup.php index 3319ab994a6..709b60068f7 100644 --- a/htdocs/admin/usergroup.php +++ b/htdocs/admin/usergroup.php @@ -42,6 +42,8 @@ $extrafields = new ExtraFields($db); $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php + $type = 'group'; /* diff --git a/htdocs/admin/workstation.php b/htdocs/admin/workstation.php index e89cbb2fd41..58118827ed4 100644 --- a/htdocs/admin/workstation.php +++ b/htdocs/admin/workstation.php @@ -36,6 +36,7 @@ $langs->loadLangs(array("admin", "workstation")); // Parameters $action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php $value = GETPOST('value', 'alpha'); diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 636bf4c4f7f..e636645f6c8 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -178,7 +178,10 @@ class doc_generic_proposal_odt extends ModelePDFPropales $texte .= '
'; // Show list of found files foreach ($listoffiles as $file) { - $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
'; + $texte .= '- '.$file['name']; + $texte .= ' '.img_picto('', 'listlight').''; + $texte .= '   '.img_picto('', 'delete').''; + $texte .= '
'; } $texte .= '
';