diff --git a/htdocs/admin/eventorganization.php b/htdocs/admin/eventorganization.php index 58f09786e23..4e8d19d4590 100644 --- a/htdocs/admin/eventorganization.php +++ b/htdocs/admin/eventorganization.php @@ -278,16 +278,13 @@ if ($action == 'edit') { });'; print ''; } - } elseif ($var['type'] == 'product') { + } elseif ($val['type'] == 'product') { if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { - print ''.$langs->trans("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS").''; - print ''; - $selected = (empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) ? '' : $conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS); - $form->select_produits($selected, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', '', 0); - print ''; + $selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname); + $form->select_produits($selected, $constname, '', 0); } } else { - print ''; + print ''; } print ''; }