diff --git a/htdocs/bom/tpl/linkedobjectblock.tpl.php b/htdocs/bom/tpl/linkedobjectblock.tpl.php index 3df8ca37d02..3e072466015 100644 --- a/htdocs/bom/tpl/linkedobjectblock.tpl.php +++ b/htdocs/bom/tpl/linkedobjectblock.tpl.php @@ -4,6 +4,7 @@ * Copyright (C) 2014 Marcos García * Copyright (C) 2013-2020 Charlene BENKE * Copyright (C) 2024-2025 MDW + * Copyright (C) 2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -52,7 +53,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) { } echo ''; echo ''.$langs->trans("Bom"); - if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) { + if (!empty($showImportButton) && getDolGlobalInt('MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES')) { print ' '; diff --git a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php index b1a6ac11bae..158fd504d0b 100644 --- a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php +++ b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php @@ -3,6 +3,7 @@ * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2014 Marcos García * Copyright (C) 2024 MDW + * Copyright (C) 2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -56,7 +57,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) { } print ''; print ''.$langs->trans("Proposal"); - if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) { + if (!empty($showImportButton) && getDolGlobalInt('MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES')) { $url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$objectlink->id; print ' '; } diff --git a/htdocs/mrp/tpl/linkedobjectblock.tpl.php b/htdocs/mrp/tpl/linkedobjectblock.tpl.php index 3ba0e580b5b..016e8fe9b07 100644 --- a/htdocs/mrp/tpl/linkedobjectblock.tpl.php +++ b/htdocs/mrp/tpl/linkedobjectblock.tpl.php @@ -4,6 +4,7 @@ * Copyright (C) 2014 Marcos García * Copyright (C) 2013-2020 Charlene BENKE * Copyright (C) 2024-2025 MDW + * Copyright (C) 2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -59,7 +60,7 @@ if ($object->element == 'mo') { echo ''; echo '' . $langs->trans("ManufacturingOrder"); - if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) { + if (!empty($showImportButton) && getDolGlobalInt('MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES')) { print ' '; @@ -104,7 +105,7 @@ if ($object->element == 'mo') { } print ''; print ''.$langs->trans("ManufacturingOrder"); - if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) { + if (!empty($showImportButton) && getDolGlobalInt('MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES')) { $url = DOL_URL_ROOT.'/mrp/mo_card.php?id='.$objectlink->id; print ' '; } diff --git a/htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php b/htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php index ad71c0335ea..2814a72a57f 100644 --- a/htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php +++ b/htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php @@ -4,6 +4,7 @@ * Copyright (C) 2019 Laurent Destailleur * Copyright (C) 2024 Charlene Benke * Copyright (C) 2024 MDW + * Copyright (C) 2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -55,7 +56,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) { } ?> trans("Task"); ?> - global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) { + getNomUrl(0, '', 0, 1).'&action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > diff --git a/htdocs/reception/tpl/linkedobjectblock.tpl.php b/htdocs/reception/tpl/linkedobjectblock.tpl.php index e596850c859..47152bcea53 100644 --- a/htdocs/reception/tpl/linkedobjectblock.tpl.php +++ b/htdocs/reception/tpl/linkedobjectblock.tpl.php @@ -3,6 +3,7 @@ * Copyright (C) 2014 Marcos García * Copyright (C) 2019 Laurent Destailleur * Copyright (C) 2024 MDW + * Copyright (C) 2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -55,7 +56,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) { } ?> trans("Reception"); ?> - global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) { + getNomUrl(0, '', 0, 1).'&action=selectlines&token='.newToken().'" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" >