Add option ADHERENT_LOGIN_NOT_REQUIRED
This commit is contained in:
parent
19d596aa74
commit
5fbe077deb
@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -47,6 +47,11 @@ if ($_POST["action"] == 'update' || $_POST["action"] == 'add')
|
||||
{
|
||||
if (($_POST["constname"]=='ADHERENT_CARD_TYPE' || $_POST["constname"]=='ADHERENT_ETIQUETTE_TYPE')
|
||||
&& $_POST["constvalue"] == -1) $_POST["constvalue"]='';
|
||||
if ($_POST["constname"]=='ADHERENT_LOGIN_NOT_REQUIRED') // Invert choice
|
||||
{
|
||||
if ($_POST["constvalue"]) $_POST["constvalue"]=0;
|
||||
else $_POST["constvalue"]=1;
|
||||
}
|
||||
|
||||
$const=$_POST["constname"];
|
||||
$value=$_POST["constvalue"];
|
||||
@ -106,6 +111,23 @@ print "</tr>\n";
|
||||
$var=true;
|
||||
$form = new Form($db);
|
||||
|
||||
// Login/Pass required for members
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0)
|
||||
{
|
||||
$var=!$var;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
||||
print '<input type="hidden" name="constname" value="ADHERENT_LOGIN_NOT_REQUIRED">';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("AdherentLoginRequired").'</td><td>';
|
||||
print $form->selectyesno('constvalue',!$conf->global->ADHERENT_LOGIN_NOT_REQUIRED,1);
|
||||
print '</td><td align="center" width="80">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
// Mail required for members
|
||||
$var=!$var;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
|
||||
@ -96,7 +96,7 @@ if ($action == 'confirm_create_thirdparty' && $_POST["confirm"] == 'yes' && $use
|
||||
// Creation user
|
||||
$company = new Societe($db);
|
||||
$result=$company->create_from_member($adh,$_POST["companyname"]);
|
||||
|
||||
|
||||
if ($result < 0)
|
||||
{
|
||||
$langs->load("errors");
|
||||
@ -457,6 +457,10 @@ if ($rowid)
|
||||
|
||||
dol_fiche_head($head, 'subscription', $langs->trans("Member"), 0, 'user');
|
||||
|
||||
$rowspan=9;
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan+=1;
|
||||
if ($conf->societe->enabled) $rowspan++;
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="rowid" value="'.$adh->id.'">';
|
||||
@ -464,10 +468,33 @@ if ($rowid)
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td class="valeur">';
|
||||
print '<td class="valeur" colspan="2">';
|
||||
print $html->showrefnav($adh,'rowid');
|
||||
print '</td></tr>';
|
||||
|
||||
// Login
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur" colspan="2">'.$adh->login.' </td></tr>';
|
||||
}
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$adh->getmorphylib().'</td>';
|
||||
print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
|
||||
print $html->showphoto('memberphoto',$adh);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Company
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$adh->societe.'</td></tr>';
|
||||
|
||||
// Civility
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$adh->getCivilityLabel().' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Name
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$adh->lastname.' </td>';
|
||||
print '</tr>';
|
||||
@ -476,12 +503,6 @@ if ($rowid)
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$adh->firstname.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Login
|
||||
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur">'.$adh->login.' </td></tr>';
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$adh->getLibStatut(4).'</td></tr>';
|
||||
|
||||
@ -749,16 +770,16 @@ if ($rowid)
|
||||
{
|
||||
$name=$adh->societe;
|
||||
}
|
||||
|
||||
|
||||
// Create a form array
|
||||
$formquestion=array(
|
||||
array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name));
|
||||
|
||||
|
||||
$ret=$html->form_confirm($_SERVER["PHP_SELF"]."?rowid=".$adh->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
print '<form name="cotisation" method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="cotisation">';
|
||||
@ -842,7 +863,7 @@ if ($rowid)
|
||||
if (empty($adh->fk_soc) || empty($bankviainvoice)) print ' disabled="true"';
|
||||
print '> '.$langs->trans("MoreActionBankViaInvoice");
|
||||
if ($adh->fk_soc) print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')';
|
||||
else
|
||||
else
|
||||
{
|
||||
print ' ('.$langs->trans("NoThirdPartyAssociatedToMember");
|
||||
print ' - <a href="'.$_SERVER["PHP_SELF"].'?rowid='.$adh->id.'&action=create_thirdparty">';
|
||||
@ -857,7 +878,7 @@ if ($rowid)
|
||||
if (empty($adh->fk_soc) || empty($bankviainvoice)) print ' disabled="true"';
|
||||
print '> '.$langs->trans("MoreActionInvoiceOnly");
|
||||
if ($adh->fk_soc) print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')';
|
||||
else
|
||||
else
|
||||
{
|
||||
print ' ('.$langs->trans("NoThirdPartyAssociatedToMember");
|
||||
print ' - <a href="'.$_SERVER["PHP_SELF"].'?rowid='.$adh->id.'&action=create_thirdparty">';
|
||||
|
||||
@ -150,6 +150,29 @@ if ($id > 0)
|
||||
print $html->showrefnav($member,'rowid');
|
||||
print '</td></tr>';
|
||||
|
||||
// Login
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur">'.$member->login.' </td></tr>';
|
||||
}
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$member->getmorphylib().'</td>';
|
||||
/*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
|
||||
print $html->showphoto('memberphoto',$member);
|
||||
print '</td>';*/
|
||||
print '</tr>';
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$membert->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Company
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$member->societe.'</td></tr>';
|
||||
|
||||
// Civility
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$member->getCivilityLabel().' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Nom
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$member->nom.' </td>';
|
||||
print '</tr>';
|
||||
@ -158,12 +181,6 @@ if ($id > 0)
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$member->prenom.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Login
|
||||
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur">'.$member->login.' </td></tr>';
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$membert->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$member->getLibStatut(4).'</td></tr>';
|
||||
|
||||
|
||||
@ -98,19 +98,36 @@ if ($id)
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Nom
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="3">'.$adh->nom.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Prenom
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$adh->prenom.' </td></tr>';
|
||||
|
||||
// Login
|
||||
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur" colspan="3">'.$adh->login.' </td></tr>';
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur">'.$adh->login.' </td></tr>';
|
||||
}
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$adh->getmorphylib().'</td>';
|
||||
/*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
|
||||
print $html->showphoto('memberphoto',$member);
|
||||
print '</td>';*/
|
||||
print '</tr>';
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Company
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$adh->societe.'</td></tr>';
|
||||
|
||||
// Civility
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$adh->getCivilityLabel().' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Lastname
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="3">'.$adh->nom.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$adh->prenom.' </td></tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$adh->getLibStatut(4).'</td></tr>';
|
||||
|
||||
|
||||
@ -358,8 +358,8 @@ else if ($_GET["id"] || $_GET["ref"])
|
||||
if ($_GET["ref"]) $result = $member->fetch('',$_GET["ref"]);
|
||||
if ($_GET["id"]) $result = $member->fetch($_GET["id"]);
|
||||
|
||||
$adht = new AdherentType($db);
|
||||
$adht->fetch($member->typeid);
|
||||
$membert = new AdherentType($db);
|
||||
$membert->fetch($member->typeid);
|
||||
|
||||
llxHeader("","",$langs->trans("Member"));
|
||||
|
||||
@ -369,6 +369,9 @@ else if ($_GET["id"] || $_GET["ref"])
|
||||
$picto='user';
|
||||
dol_fiche_head($head, 'category', $titre,0,$picto);
|
||||
|
||||
$rowspan=5;
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan+=1;
|
||||
if ($conf->societe->enabled) $rowspan++;
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -378,7 +381,30 @@ else if ($_GET["id"] || $_GET["ref"])
|
||||
print $html->showrefnav($member,'rowid');
|
||||
print '</td></tr>';
|
||||
|
||||
// Nom
|
||||
// Login
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur">'.$member->login.' </td></tr>';
|
||||
}
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$member->getmorphylib().'</td>';
|
||||
/*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
|
||||
print $html->showphoto('memberphoto',$member);
|
||||
print '</td>';*/
|
||||
print '</tr>';
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$membert->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Company
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$member->societe.'</td></tr>';
|
||||
|
||||
// Civility
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$member->getCivilityLabel().' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Nom
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$member->nom.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -386,12 +412,6 @@ else if ($_GET["id"] || $_GET["ref"])
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$member->prenom.' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Login
|
||||
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur">'.$member->login.' </td></tr>';
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$member->getLibStatut(4).'</td></tr>';
|
||||
|
||||
|
||||
@ -3226,7 +3226,7 @@ class Form
|
||||
{
|
||||
global $dolibarr_main_url_root;
|
||||
$ret.='<!-- Put link to gravatar -->';
|
||||
$ret.='<img alt="Photo found on Gravatar" title="Photo Gravatar.com - email '.$email.'" width="'.$width.'" src="http://www.gravatar.com/avatar/'.md5($email).'?s='.$width.'&d='.urlencode($dolibarr_main_url_root.'/theme/common/nophoto.jpg').'">';
|
||||
$ret.='<img alt="Photo found on Gravatar" title="Photo Gravatar.com - email '.$email.'" width="'.$width.'" src="http://www.gravatar.com/avatar/'.md5($email).'?s='.$width.'&d='.urlencode( dol_buildpath('/theme/common/nophoto.jpg',2) ).'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -10,6 +10,8 @@
|
||||
-- To change type of field: ALTER TABLE llx_table MODIFY name varchar(60);
|
||||
--
|
||||
|
||||
ALTER TABLE llx_adherent MODIFY login varchar(50);
|
||||
|
||||
ALTER TABLE llx_c_actioncomm add COLUMN position integer NOT NULL DEFAULT 0;
|
||||
|
||||
ALTER TABLE llx_commande_fournisseur MODIFY model_pdf varchar(255);
|
||||
|
||||
@ -33,7 +33,7 @@ create table llx_adherent
|
||||
civilite varchar(6),
|
||||
nom varchar(50),
|
||||
prenom varchar(50),
|
||||
login varchar(50) NOT NULL, -- login
|
||||
login varchar(50), -- login
|
||||
pass varchar(50), -- password
|
||||
fk_adherent_type integer NOT NULL,
|
||||
morphy varchar(3) NOT NULL, -- personne morale / personne physique
|
||||
|
||||
@ -925,6 +925,7 @@ ContractsNumberingModules=Contracts numbering modules
|
||||
MembersSetup=Members module setup
|
||||
MemberMainOptions=Main options
|
||||
AddSubscriptionIntoAccount=Suggest by default to create a bank transaction, in bank module, when adding a new payed subscription
|
||||
AdherentLoginRequired= Manage a Login for each member
|
||||
AdherentMailRequired=EMail required to create a new member
|
||||
MemberSendInformationByMailByDefault=Checkbox to send mail confirmation to members (validation or new subscription) is on by default
|
||||
##### LDAP setup #####
|
||||
|
||||
@ -935,6 +935,7 @@ ContractsNumberingModules=Modèles de numérotation des contrats
|
||||
MembersSetup= Configuration du module Adhérents
|
||||
MemberMainOptions= Options principales
|
||||
AddSubscriptionIntoAccount= Proposer par défaut la création d'une écriture bancaire, dans le module banque, à l'enregistrement d'une adhésion payante
|
||||
AdherentLoginRequired= Gérer un login pour chaque adhérent
|
||||
AdherentMailRequired= EMail obligatoire pour créer un nouvel adhérent
|
||||
MemberSendInformationByMailByDefault= Case à cocher pour envoyer un mail de confirmation (validation ou nouvelle cotisation) aux adhérents est à oui par défaut.
|
||||
##### LDAP setup #####
|
||||
|
||||
@ -118,7 +118,7 @@ function dol_buildpath($path,$type=0)
|
||||
$res = DOL_URL_ROOT.$path; // Standard value
|
||||
if (defined('DOL_URL_ROOT_ALT') && DOL_URL_ROOT_ALT) // We check only if alternate feature is used
|
||||
{
|
||||
preg_match('/^([^.]+(\.css)?(\.php)?(\.js)?)/i',$path,$regs); // Take part before '?'
|
||||
preg_match('/^([^.]+(\.css)?(\.php)?(\.js)?(\.png)?(\.jpg)?)/i',$path,$regs); // Take part before '?'
|
||||
if (! empty($regs[1]))
|
||||
{
|
||||
if (! file_exists(DOL_DOCUMENT_ROOT.$regs[1])) $res = DOL_URL_ROOT_ALT.$path;
|
||||
@ -130,7 +130,7 @@ function dol_buildpath($path,$type=0)
|
||||
$res = DOL_MAIN_URL_ROOT.$path; // Standard value
|
||||
if (defined('DOL_URL_ROOT_ALT') && DOL_URL_ROOT_ALT) // We check only if alternate feature is used
|
||||
{
|
||||
preg_match('/^([^.]+(\.css)?(\.php)?(\.js)?)/i',$path,$regs); // Take part before '?'
|
||||
preg_match('/^([^.]+(\.css)?(\.php)?(\.js)?(\.png)?(\.jpg)?)/i',$path,$regs); // Take part before '?'
|
||||
if (! empty($regs[1]))
|
||||
{
|
||||
if (! file_exists(DOL_DOCUMENT_ROOT.$regs[1])) $res = DOL_MAIN_URL_ROOT_ALT.$path;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user