diff --git a/htdocs/adherents/admin/member.php b/htdocs/adherents/admin/member.php index d20bd784cedcd..f9e15e88fca4f 100644 --- a/htdocs/adherents/admin/member.php +++ b/htdocs/adherents/admin/member.php @@ -152,10 +152,13 @@ setEventMessages('RecordModifiedSuccessfully', null, 'mesgs'); $db->commit(); } -} - -// Action to update or add a constant -if ($action == 'update' || $action == 'add') { +} elseif ($action == 'setcodemember') { + $result = dolibarr_set_const($db, "MEMBER_CODEMEMBER_ADDON", $value, 'chaine', 0, '', $conf->entity); + if ($result <= 0) { + dol_print_error($db); + } +} elseif ($action == 'update' || $action == 'add') { + // Action to update or add a constant $constname = GETPOST('constname', 'alpha'); $constvalue = (GETPOST('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname) : GETPOST('constvalue')); @@ -223,6 +226,97 @@ print dol_get_fiche_head($head, 'general', $langs->trans("Members"), -1, 'user'); +$dirModMember = array_merge(array('/core/modules/member/'), $conf->modules_parts['member']); +foreach ($conf->modules_parts['models'] as $mo) { + //Add more models + $dirModMember[] = $mo.'core/modules/member/'; +} + +// Module to manage customer/supplier code + +print load_fiche_titre($langs->trans("MemberCodeChecker"), '', ''); + +print '
'.$langs->trans("Name").' | '; +print ''.$langs->trans("Description").' | '; +print ''.$langs->trans("Example").' | '; +print ''.$langs->trans("Status").' | '; +print ''.$langs->trans("ShortInfo").' | '; +print "|
'.$modCodeMember->name.' | '."\n"; + print ''.$modCodeMember->info($langs).' | '."\n"; + print ''.$modCodeMember->getExample($langs).' | '."\n"; + + if (getDolGlobalString('MEMBER_CODEMEMBER_ADDON') == "$file") { + print ''."\n"; + print img_picto($langs->trans("Activated"), 'switch_on'); + print " | \n"; + } else { + $disabled = (isModEnabled('multicompany') && (is_object($mc) && !empty($mc->sharings['referent']) && $mc->sharings['referent'] != $conf->entity) ? true : false); + print ''; + if (!$disabled) { + print ''; + } + print img_picto($langs->trans("Disabled"), 'switch_off'); + if (!$disabled) { + print ''; + } + print ' | '; + } + + print ''; + $s = $modCodeMember->getToolTip($langs, null, -1); + print $form->textwithpicto('', $s, 1); + print ' | '; + + print '