From e1f1e2bf9782957f9eac5257ff6c5b04762887ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josep=20Llu=C3=ADs?= Date: Mon, 20 Apr 2020 17:50:19 +0200 Subject: [PATCH] FIX type member extrafields are duplicated on edit type member extrafields are duplicated on edit, and old usage on create (without tpl) --- htdocs/adherents/type.php | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index cfac2313fba..c190398c1db 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -6,6 +6,7 @@ * Copyright (C) 2013 Florian Henry * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2019 Thibault Foucart + * Copyright (C) 2020 Josep LluĂ­s Amador * * 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 @@ -376,13 +377,8 @@ if ($action == 'create') print ''; // Other attributes - $parameters = array(); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - if (empty($reshook)) - { - print $object->showOptionals($extrafields, 'edit', $parameters); - } + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; + print ''; print "\n"; @@ -823,15 +819,6 @@ if ($rowid > 0) // Other attributes include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php'; - // Other attributes - $parameters = array(); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - if (empty($reshook)) - { - print $object->showOptionals($extrafields, 'edit', $parameters); - } - print ''; dol_fiche_end();