diff --git a/htdocs/modulebuilder/template/admin/setup.php b/htdocs/modulebuilder/template/admin/setup.php index c866d795b8a..cc6d37f8abd 100644 --- a/htdocs/modulebuilder/template/admin/setup.php +++ b/htdocs/modulebuilder/template/admin/setup.php @@ -77,8 +77,9 @@ $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); $type = 'myobject'; +$useFormSetup = 0; -if ((float) DOL_VERSION >= 15) { +if ($useFormSetup && (float) DOL_VERSION >= 15) { // For Dolibarr v15+ compatibility require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsetup.class.php'; $formSetup = new FormSetup($db); @@ -263,8 +264,11 @@ if ($action == 'edit') { print ''; print ''; - print $formSetup->generateOutput(true); - + if ($useFormSetup && (float) DOL_VERSION >= 15) { + print $formSetup->generateOutput(true); + } else { + // Add input fields here + } print '
'; print ''; print '
'; @@ -272,10 +276,18 @@ if ($action == 'edit') { print ''; print '
'; } else { - if (!empty($formSetup->items)) { + if ($useFormSetup && (float) DOL_VERSION >= 15) { print $formSetup->generateOutput(); - $setupnotempty++; + $setupnotempty = count($formSetup->items); + } else { + // Show fields here + foreach ($arrayofparameters as $key => $val) { + $setupnotempty++; + + } + } + if ($setupnotempty) { print '
'; print ''.$langs->trans("Modify").''; print '
';