diff --git a/htdocs/admin/eventorganization.php b/htdocs/admin/eventorganization.php index 39733496763..28e32b00857 100644 --- a/htdocs/admin/eventorganization.php +++ b/htdocs/admin/eventorganization.php @@ -54,6 +54,10 @@ $modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions $scandir = GETPOST('scan_dir', 'alpha'); $type = 'myobject'; +if (empty($action)) { + $action = 'edit'; +} + $arrayofparameters = array( 'EVENTORGANIZATION_TASK_LABEL' => array('type' => 'textarea','enabled' => 1, 'css' => ''), 'EVENTORGANIZATION_CATEG_THIRDPARTY_CONF' => array('type' => 'category:'.Categorie::TYPE_CUSTOMER, 'enabled' => 1, 'css' => ''), @@ -129,31 +133,7 @@ if ($action == 'updateMask') { } } } -}/* elseif ($action == 'setdoc') { - // Set or unset default model - $tmpobjectkey = GETPOST('object', 'aZ09'); - if (!empty($tmpobjectkey)) { - $constforval = 'EVENTORGANIZATION_'.strtoupper($tmpobjectkey).'_ADDON_PDF'; - if (dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity)) { - // The constant that was read before the new set - // We therefore requires a variable to have a coherent view - $conf->global->$constforval = $value; - } - - // We disable/enable the document template (into llx_document_model table) - $ret = delDocumentModel($value, $type); - if ($ret > 0) { - $ret = addDocumentModel($value, $type, $label, $scandir); - } - } -} elseif ($action == 'unsetdoc') { - $tmpobjectkey = GETPOST('object', 'aZ09'); - if (!empty($tmpobjectkey)) { - $constforval = 'EVENTORGANIZATION_'.strtoupper($tmpobjectkey).'_ADDON_PDF'; - dolibarr_del_const($db, $constforval, $conf->entity); - } -}*/ - +} /* @@ -176,7 +156,8 @@ $head = eventorganizationAdminPrepareHead(); print dol_get_fiche_head($head, 'settings', $langs->trans($page_name), -1, 'eventorganization'); // Setup page goes here -echo ''.$langs->trans("EventOrganizationSetupPage").'

'; +//print ''.$langs->trans("EventOrganizationSetupPage").'
'; +print '
'; if ($action == 'edit') { @@ -261,7 +242,7 @@ if ($action == 'edit') { } print ''; - print $form->buttonsSaveCancel(); + print $form->buttonsSaveCancel('Save', ''); print ''; print '
'; diff --git a/htdocs/admin/eventorganization_public.php b/htdocs/admin/eventorganization_public.php index 42ed804737c..5c2ac2d50e3 100644 --- a/htdocs/admin/eventorganization_public.php +++ b/htdocs/admin/eventorganization_public.php @@ -68,6 +68,9 @@ if (empty($user->admin)) { accessforbidden(); } +if (empty($action)) { + $action = 'edit'; +} /* @@ -102,8 +105,8 @@ $head = eventorganizationAdminPrepareHead(); print dol_get_fiche_head($head, 'public', $langs->trans($page_name), -1, 'eventorganization'); // Setup page goes here -echo ''.$langs->trans("EventOrganizationSetupPage").'

'; - +// print ''.$langs->trans("EventOrganizationSetupPage").'
'; +print '
'; if ($action == 'edit') { print '
'; @@ -114,6 +117,7 @@ if ($action == 'edit') { print ''.$langs->trans("Parameter").''; foreach ($arrayofparameters as $constname => $val) { + // @phpstan-ignore-next-line if ($val['enabled'] == 1) { $setupnotempty++; print ''; @@ -122,7 +126,7 @@ if ($action == 'edit') { print ''.$form->textwithpicto($langs->trans($constname), $tooltiphelp, 1, 'info', '', 0, 3, 'tootips'.$constname).''; print ''; - if ($val['type'] == 'textarea') { + /*if ($val['type'] == 'textarea') { print '\n"; @@ -164,16 +168,16 @@ if ($action == 'edit') { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; $formcompany = new FormCompany($db); print $formcompany->selectProspectCustomerType(getDolGlobalString($constname), $constname, 'customerorprospect', 'form', '', '1'); - } elseif ($val['type'] == 'securekey') { - print ''; - if (!empty($conf->use_javascript_ajax)) { - print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token'.$constname.'" class="linkobject"'); - } + } elseif ($val['type'] == 'securekey') { */ + print ''; + if (!empty($conf->use_javascript_ajax)) { + print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token'.$constname.'" class="linkobject"'); + } - // Add button to autosuggest a key - include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; - print dolJSToSetRandomPassword($constname, 'generate_token'.$constname); - } elseif ($val['type'] == 'product') { + // Add button to autosuggest a key + include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; + print dolJSToSetRandomPassword($constname, 'generate_token'.$constname); + /* } elseif ($val['type'] == 'product') { if (isModEnabled("product") || isModEnabled("service")) { $selected = getDolGlobalInt($constname); print img_picto('', 'product', 'class="pictofixedwidth"'); @@ -181,13 +185,13 @@ if ($action == 'edit') { } } else { print ''; - } + }*/ print ''; } } print ''; - print $form->buttonsSaveCancel(); + print $form->buttonsSaveCancel('Save', ''); print '
'; print '
';