Commit 22203a1d authored by Feu's avatar Feu

case à cocher ml benevoles

parent 73fc74f2
......@@ -56,9 +56,9 @@ if ( ($_REQUEST['action'] == "addasso") && $site->user->is_in_group("gestion_ae"
$asso_parent->id = null;
if ( $GLOBALS["is_using_ssl"] )
$asso->add_asso($_REQUEST['nom'],$_REQUEST['nom_unix'],$asso_parent->id,$_REQUEST["adresse"],$_REQUEST['email'],$_REQUEST['siteweb'],$_REQUEST['login_email'],$_REQUEST['passwd_email']);
$asso->add_asso($_REQUEST['nom'],$_REQUEST['nom_unix'],$asso_parent->id,$_REQUEST["adresse"],$_REQUEST['email'],$_REQUEST['siteweb'],$_REQUEST['login_email'],$_REQUEST['passwd_email'],isset($_REQUEST['distinct_benevole']));
else
$asso->add_asso($_REQUEST['nom'],$_REQUEST['nom_unix'],$asso_parent->id,$_REQUEST["adresse"],$_REQUEST['email'],$_REQUEST['siteweb']);
$asso->add_asso($_REQUEST['nom'],$_REQUEST['nom_unix'],$asso_parent->id,$_REQUEST["adresse"],$_REQUEST['email'],$_REQUEST['siteweb'],null,null,isset($_REQUEST['distinct_benevole']));
}
}
else if ( isset($_REQUEST["id_asso"]) )
......@@ -105,14 +105,14 @@ else if ( isset($_REQUEST["id_asso"]) )
$asso_parent->load_by_id($_REQUEST['asso_parent']);
if ( $GLOBALS["is_using_ssl"] )
$asso->update_asso($_REQUEST['nom'],$_REQUEST['nom_unix'],$asso_parent->id,$_REQUEST["adresse"],$_REQUEST['email'],$_REQUEST['siteweb'],$_REQUEST['login_email'],$_REQUEST['passwd_email']);
$asso->update_asso($_REQUEST['nom'],$_REQUEST['nom_unix'],$asso_parent->id,$_REQUEST["adresse"],$_REQUEST['email'],$_REQUEST['siteweb'],$_REQUEST['login_email'],$_REQUEST['passwd_email'],isset($_REQUEST['distinct_benevole']));
else
$asso->update_asso($_REQUEST['nom'],$_REQUEST['nom_unix'],$asso_parent->id,$_REQUEST["adresse"],$_REQUEST['email'],$_REQUEST['siteweb']);
$asso->update_asso($_REQUEST['nom'],$_REQUEST['nom_unix'],$asso_parent->id,$_REQUEST["adresse"],$_REQUEST['email'],$_REQUEST['siteweb'],null,null,isset($_REQUEST['distinct_benevole']));
}
elseif ( $GLOBALS["is_using_ssl"] )
$asso->update_asso($asso->nom,$asso->nom_unix,$asso_parent->id,$_REQUEST["adresse"],$_REQUEST['email'],$_REQUEST['siteweb'],$_REQUEST['login_email'],$_REQUEST['passwd_email']);
$asso->update_asso($asso->nom,$asso->nom_unix,$asso_parent->id,$_REQUEST["adresse"],$_REQUEST['email'],$_REQUEST['siteweb'],$_REQUEST['login_email'],$_REQUEST['passwd_email'],isset($_REQUEST['distinct_benevole']));
else
$asso->update_asso($asso->nom,$asso->nom_unix,$asso_parent->id,$_REQUEST["adresse"],$_REQUEST['email'],$_REQUEST['siteweb']);
$asso->update_asso($asso->nom,$asso->nom_unix,$asso_parent->id,$_REQUEST["adresse"],$_REQUEST['email'],$_REQUEST['siteweb'],null,null,isset($_REQUEST['distinct_benevole']));
$asso->set_tags($_REQUEST['tags']);
......@@ -169,6 +169,8 @@ else if ( isset($_REQUEST["id_asso"]) )
$frm->add_text_field("siteweb","Site web",$asso->siteweb);
$frm->add_text_field("tags","Tags (séparateur: virgule)",$asso->get_tags());
$frm->add_checkbox("distinct_benevole","Activer la mailing liste bénévoles",$asso->distinct_benevole);
if ( $GLOBALS["is_using_ssl"] )
{
$frm->add_text_field("login_email","Login mail utbm",$asso->login_email);
......@@ -353,6 +355,9 @@ if ( $site->user->is_in_group("root") )
$frm->add_text_field("email","Email",$asso->email);
$frm->add_text_field("siteweb","Site web",$asso->siteweb);
$frm->add_checkbox("distinct_benevole","Activer la mailing liste bénévoles",$asso->distinct_benevole);
if ( $GLOBALS["is_using_ssl"] )
{
$frm->add_text_field("login_email","Login mail utbm",$asso->login_email);
......
......@@ -433,7 +433,7 @@ else
$frm->add_user_fieldv2("id_utilisateur","Membre");
$frm->add_text_field("role_desc","Role (champ libre)","");
unset($GLOBALS['ROLEASSO'][ROLEASSO_MEMBRE]);
//unset($GLOBALS['ROLEASSO'][ROLEASSO_MEMBRE]);
//unset($GLOBALS['ROLEASSO'][ROLEASSO_MEMBREACTIF]);
$frm->add_select_field("role","Role",$GLOBALS['ROLEASSO']);
......
......@@ -100,7 +100,7 @@ class eboutic extends site
$eb_box->add ($prods);
$eb_box->add_paragraph(sprintf("%.2f Euros",$this->total / 100));
$eb_box->add_paragraph("Total: ".sprintf("%.2f Euros",$this->total / 100));
$lst->add ("<a href=\"./cart.php\">Modifier le panier</a>");
$lst->add ("<a href=\"./cart.php\">Passer la commande</a>");
......
......@@ -96,8 +96,6 @@ class asso extends stdentity
public $distinct_benevole=false;
private $_distinct_benevole=false;
/** Charge une association par son ID
* @param $id ID de l'association
......@@ -149,8 +147,6 @@ class asso extends stdentity
$this->passwd_email = $row['passwd_email'];
$this->distinct_benevole = $row['distinct_benevole_asso'];
$this->_distinct_benevole = $this->distinct_benevole;
}
/** Crée une nouvelle association
......@@ -158,7 +154,7 @@ class asso extends stdentity
* @param $nom_unix Nom UNIX de l'association
* @param $id_parent ID de l'association parent, false si non applicable
*/
function add_asso ( $nom, $nom_unix, $id_parent = null, $adresse_postale="", $email="", $siteweb="", $login_email="", $passwd_email="" )
function add_asso ( $nom, $nom_unix, $id_parent = null, $adresse_postale="", $email="", $siteweb="", $login_email="", $passwd_email="", $distinct_benevole=false )
{
if ( is_null($this->dbrw) ) return; // "Read Only" mode
......@@ -183,7 +179,9 @@ class asso extends stdentity
"email_asso"=>$this->email,
"siteweb_asso"=>$this->siteweb,
"login_email"=>$this->login_email,
"passwd_email"=>$this->passwd_email
"passwd_email"=>$this->passwd_email,
"distinct_benevole_asso" => $this->distinct_benevole
)
);
......@@ -210,7 +208,7 @@ class asso extends stdentity
* @param $nom_unix Nom UNIX de l'association
* @param $id_parent ID de l'association parent, false si non applicable
*/
function update_asso ( $nom, $nom_unix, $id_parent = null, $adresse_postale="", $email=null, $siteweb=null, $login_email=null, $passwd_email=null )
function update_asso ( $nom, $nom_unix, $id_parent = null, $adresse_postale="", $email=null, $siteweb=null, $login_email=null, $passwd_email=null, $distinct_benevole=false )
{
if ( is_null($this->dbrw) ) return; // "Read Only" mode
......@@ -227,7 +225,7 @@ class asso extends stdentity
if ( !is_null($id_parent) )
$this->_ml_create($this->dbrw,$nom_unix.".membres",$this->email);
if ( $this->distinct_benevole )
if ( $distinct_benevole )
$this->_ml_create($this->dbrw,$nom_unix.".benevoles",$this->email);
$this->_ml_create($this->dbrw,$nom_unix.".bureau",$this->email);
......@@ -238,7 +236,7 @@ class asso extends stdentity
if ( is_null($old_id_parent) && !is_null($id_parent) )
$this->_ml_create($this->dbrw,$this->nom_unix.".membres",$this->email);
if ( $this->distinct_benevole && !$this->_distinct_benevole )
if ( $distinct_benevole && !$this->distinct_benevole )
$this->_ml_create($this->dbrw,$this->nom_unix.".benevoles",$this->email);
}
}
......@@ -259,6 +257,8 @@ class asso extends stdentity
if ( !is_null($passwd_email) )
$this->passwd_email = $passwd_email;
$this->distinct_benevole = $distinct_benevole;
$sql = new update ($this->dbrw,
"asso",
array(
......@@ -269,7 +269,8 @@ class asso extends stdentity
"email_asso"=>$this->email,
"siteweb_asso"=>$this->siteweb,
"login_email"=>$this->login_email,
"passwd_email"=>$this->passwd_email
"passwd_email"=>$this->passwd_email,
"distinct_benevole_asso" => $this->distinct_benevole
),
array ( "id_asso" => $this->id )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment