diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php
index 2754c2d3690..8050a0ec019 100644
--- a/htdocs/adherents/admin/adherent.php
+++ b/htdocs/adherents/admin/adherent.php
@@ -48,6 +48,37 @@ $action = GETPOST('action','alpha');
* Actions
*/
+//
+if ($action == 'updateall')
+{
+ $db->begin();
+ $res1=$res2=$res3=$res4=$res5=$res6=0;
+ $res1=dolibarr_set_const($db, 'ADHERENT_LOGIN_NOT_REQUIRED', GETPOST('ADHERENT_LOGIN_NOT_REQUIRED', 'alpha'), 'chaine', 0, '', $conf->entity);
+ $res2=dolibarr_set_const($db, 'ADHERENT_MAIL_REQUIRED', GETPOST('ADHERENT_MAIL_REQUIRED', 'alpha'), 'chaine', 0, '', $conf->entity);
+ $res3=dolibarr_set_const($db, 'ADHERENT_DEFAULT_SENDINFOBYMAIL', GETPOST('ADHERENT_DEFAULT_SENDINFOBYMAIL', 'alpha'), 'chaine', 0, '', $conf->entity);
+ $res4=dolibarr_set_const($db, 'ADHERENT_BANK_USE', GETPOST('ADHERENT_BANK_USE', 'alpha'), 'chaine', 0, '', $conf->entity);
+ // Use vat for invoice creation
+ if ($conf->facture->enabled)
+ {
+ $res4=dolibarr_set_const($db, 'ADHERENT_VAT_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_VAT_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
+ $res5=dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
+ if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
+ {
+ $res6=dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
+ }
+ }
+ if ($res1 < 0 || $res2 < 0 || $res3 < 0 || $res4 < 0 || $res5 < 0 || $res6 < 0)
+ {
+ setEventMessages('ErrorFailedToSaveDate', null, 'errors');
+ $db->rollback();
+ }
+ else
+ {
+ setEventMessages('RecordModifiedSuccessfully', null, 'mesgs');
+ $db->commit();
+ }
+}
+
// Action mise a jour ou ajout d'une constante
if ($action == 'update' || $action == 'add')
{
@@ -116,113 +147,81 @@ print load_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
$head = member_admin_prepare_head();
-dol_fiche_head($head, 'general', $langs->trans("Members"), 0, 'user');
+dol_fiche_head($head, 'general', $langs->trans("Members"), -1, 'user');
+
+print '
';
+
print ' ';
@@ -240,13 +239,12 @@ $constantes=array(
print load_fiche_titre($langs->trans("MembersCards"),'','');
-form_constantes($constantes);
+$helptext='*'.$langs->trans("FollowingConstantsWillBeSubstituted").' ';
+$helptext.='%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
+$helptext.='%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
+$helptext.='%YEAR%, %MONTH%, %DAY%';
-print '*'.$langs->trans("FollowingConstantsWillBeSubstituted").' ';
-print '%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
-print '%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
-print '%YEAR%, %MONTH%, %DAY%';
-print ' ';
+form_constantes($constantes, 0, $helptext);
print ' ';
@@ -258,13 +256,12 @@ $constantes=array('ADHERENT_ETIQUETTE_TYPE','ADHERENT_ETIQUETTE_TEXT');
print load_fiche_titre($langs->trans("MembersTickets"),'','');
-form_constantes($constantes);
+$helptext='*'.$langs->trans("FollowingConstantsWillBeSubstituted").' ';
+$helptext.='%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
+$helptext.='%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
+$helptext.='%YEAR%, %MONTH%, %DAY%';
-print '*'.$langs->trans("FollowingConstantsWillBeSubstituted").' ';
-print '%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
-print '%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
-print '%YEAR%, %MONTH%, %DAY%';
-print ' ';
+form_constantes($constantes, 0, $helptext);
print ' ';
@@ -288,13 +285,17 @@ $constantes=array(
print load_fiche_titre($langs->trans("Other"),'','');
-form_constantes($constantes);
+$helptext='*'.$langs->trans("FollowingConstantsWillBeSubstituted").' ';
+$helptext.='%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
+$helptext.='%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
+$helptext.='%YEAR%, %MONTH%, %DAY%';
-print '*'.$langs->trans("FollowingConstantsWillBeSubstituted").' ';
-print '%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
-print '%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
-//print '%YEAR%, %MONTH%, %DAY%'; // Not supported
-print ' ';
+$helptext='*'.$langs->trans("FollowingConstantsWillBeSubstituted").' ';
+$helptext.='%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
+$helptext.='%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
+//$helptext.='%YEAR%, %MONTH%, %DAY%'; // Not supported
+
+form_constantes($constantes, 0, $helptext);
dol_fiche_end();
diff --git a/htdocs/adherents/admin/adherent_extrafields.php b/htdocs/adherents/admin/adherent_extrafields.php
index 32bf1c87b11..542b4f29a57 100644
--- a/htdocs/adherents/admin/adherent_extrafields.php
+++ b/htdocs/adherents/admin/adherent_extrafields.php
@@ -70,7 +70,7 @@ print load_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
$head = member_admin_prepare_head();
-dol_fiche_head($head, 'attributes', $langs->trans("Members"), 0, 'user');
+dol_fiche_head($head, 'attributes', $langs->trans("Members"), -1, 'user');
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
diff --git a/htdocs/adherents/admin/adherent_type_extrafields.php b/htdocs/adherents/admin/adherent_type_extrafields.php
index 835bd05ea5f..8e0d5f9eaa8 100644
--- a/htdocs/adherents/admin/adherent_type_extrafields.php
+++ b/htdocs/adherents/admin/adherent_type_extrafields.php
@@ -73,7 +73,7 @@ print load_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
$head = member_admin_prepare_head();
-dol_fiche_head($head, 'attributes_type', $langs->trans("Members"), 0, 'user');
+dol_fiche_head($head, 'attributes_type', $langs->trans("Members"), -1, 'user');
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
diff --git a/htdocs/adherents/admin/public.php b/htdocs/adherents/admin/public.php
index 5c16a34793c..9c982884dd9 100644
--- a/htdocs/adherents/admin/public.php
+++ b/htdocs/adherents/admin/public.php
@@ -92,8 +92,9 @@ $head = member_admin_prepare_head();
print '';
print ' ';
+print ' ';
-dol_fiche_head($head, 'public', $langs->trans("Members"), 0, 'user');
+dol_fiche_head($head, 'public', $langs->trans("Members"), -1, 'user');
if ($conf->use_javascript_ajax)
{
@@ -147,7 +148,6 @@ print ''.$langs->trans("Value").' ';
print "\n";
// Allow public form
-print ' ';
print '';
print $langs->trans("EnablePublicSubscriptionForm");
print ' ';
@@ -156,7 +156,6 @@ print " \n";
// Force Type
$adht = new AdherentType($db);
-print ' ';
print '';
print $langs->trans("ForceMemberType");
print ' ';
@@ -167,7 +166,6 @@ print $form->selectarray("MEMBER_NEWFORM_FORCETYPE", $listofval, $forcetype, cou
print " \n";
// Amount
-print ' ';
print '';
print $langs->trans("DefaultAmount");
print ' ';
@@ -175,7 +173,6 @@ print ' \n";
// Can edit
-print ' ';
print '';
print $langs->trans("CanEditAmount");
print ' ';
diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php
index 2016807efe9..6a0336aab38 100644
--- a/htdocs/core/lib/admin.lib.php
+++ b/htdocs/core/lib/admin.lib.php
@@ -1180,9 +1180,10 @@ function complete_elementList_with_modules(&$elementList)
*
* @param array $tableau Array of constants
* @param int $strictw3c 0=Include form into table (deprecated), 1=Form is outside table to respect W3C (no form into table), 2=No form nor button at all
+ * @param string $helptext Help
* @return void
*/
-function form_constantes($tableau,$strictw3c=0)
+function form_constantes($tableau, $strictw3c=0, $helptext='')
{
global $db,$bc,$langs,$conf,$_Avery_Labels;
@@ -1193,7 +1194,10 @@ function form_constantes($tableau,$strictw3c=0)
print '';
print '';
print ''.$langs->trans("Description").' ';
- print ''.$langs->trans("Value").'* ';
+ print '';
+ $text = $langs->trans("Value");
+ print $form->textwithpicto($text, $helptext, 1, 'help', '', 0, 2, 'idhelptext');
+ print ' ';
if (empty($strictw3c)) print ''.$langs->trans("Action").' ';
print " \n";
$var=true;