From 11d5cdd17f1494a97f2bf078952649b9d380a4cb Mon Sep 17 00:00:00 2001 From: evarisk-micka Date: Thu, 11 Apr 2024 16:44:16 +0200 Subject: [PATCH] #903 [NumberingModule] fix: improve to take object type in consideration --- admin/object.php | 7 +++++++ core/modules/saturne/modules_saturne.php | 6 +++--- core/tpl/actions/admin_conf_actions.tpl.php | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/admin/object.php b/admin/object.php index 0905024c..9dffa6b2 100644 --- a/admin/object.php +++ b/admin/object.php @@ -65,6 +65,13 @@ $permissiontoread = $user->rights->$moduleNameLowerCase->adminpage->read; saturne_check_access($permissiontoread); +/* + * Action + */ + +// Actions set_mod, update_mask +require_once __DIR__ . '/../../saturne/core/tpl/actions/admin_conf_actions.tpl.php'; + /* * View */ diff --git a/core/modules/saturne/modules_saturne.php b/core/modules/saturne/modules_saturne.php index 7808c23a..517f41b5 100644 --- a/core/modules/saturne/modules_saturne.php +++ b/core/modules/saturne/modules_saturne.php @@ -241,8 +241,8 @@ public function info($mode = 'standard'): string if ($mode == 'custom') { $modName = explode('_', $className); - $type = dol_strtoupper($modName[1]); - $confName = strtoupper(dol_strtoupper($moduleNameLowerCase) . '_' . $type . '_CUSTOM_ADDON'); + $type = $modName[1]; + $confName = dol_strtoupper($moduleNameLowerCase . '_' . $type . '_CUSTOM_ADDON'); $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities(ucfirst($modName[1])), $langs->transnoentities(ucfirst($modName[1]))); $tooltip .= $langs->trans("GenericMaskCodes2"); @@ -256,7 +256,7 @@ public function info($mode = 'standard'): string } $texte = $langs->trans('GenericNumRefModelDesc')."
\n"; - $texte .= '
'; + $texte .= ''; $texte .= ''; $texte .= ''; $texte .= ''; diff --git a/core/tpl/actions/admin_conf_actions.tpl.php b/core/tpl/actions/admin_conf_actions.tpl.php index dfd300f8..a2aec3b2 100644 --- a/core/tpl/actions/admin_conf_actions.tpl.php +++ b/core/tpl/actions/admin_conf_actions.tpl.php @@ -45,7 +45,7 @@ } else { dolibarr_set_const($db, $documentMaskConst, $documentMask, 'chaine', 0, '', $conf->entity); setEventMessage('SavedConfig'); - header('Location: ' . $_SERVER['PHP_SELF'] . '?module_name=' . $moduleName); + header('Location: ' . $_SERVER['PHP_SELF'] . '?module_name=' . $moduleName . '&object_type=' . $objectType); exit; } }