New: Le type d'adhérent est clicable
This commit is contained in:
parent
d297e9ad9a
commit
69e92adef0
@ -226,5 +226,29 @@ class AdherentType
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Renvoie nom clicable (avec eventuellement le picto)
|
||||||
|
* \param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
||||||
|
* \return string Chaine avec URL
|
||||||
|
*/
|
||||||
|
function getNomUrl($withpicto=0)
|
||||||
|
{
|
||||||
|
global $langs;
|
||||||
|
|
||||||
|
$result='';
|
||||||
|
|
||||||
|
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/type.php?rowid='.$this->id.'">';
|
||||||
|
$lienfin='</a>';
|
||||||
|
|
||||||
|
$picto='group';
|
||||||
|
$label=$langs->trans("ShowType");
|
||||||
|
|
||||||
|
if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin);
|
||||||
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
$result.=$lien.$this->libelle.$lienfin;
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -47,6 +47,7 @@ $user->getrights('adherent');
|
|||||||
|
|
||||||
$adh = new Adherent($db);
|
$adh = new Adherent($db);
|
||||||
$adho = new AdherentOptions($db);
|
$adho = new AdherentOptions($db);
|
||||||
|
$adht = new AdherentType($db);
|
||||||
$errmsg='';
|
$errmsg='';
|
||||||
|
|
||||||
$action=isset($_GET["action"])?$_GET["action"]:$_POST["action"];
|
$action=isset($_GET["action"])?$_GET["action"]:$_POST["action"];
|
||||||
@ -64,9 +65,8 @@ if ($_POST["action"] == 'cotisation' && ! $_POST["cancel"])
|
|||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
|
|
||||||
$adh->id = $rowid;
|
$adh->id = $rowid;
|
||||||
$adh->fetch($rowid);
|
$result=$adh->fetch($rowid);
|
||||||
|
|
||||||
$adht = new AdherentType($db);
|
|
||||||
$adht->fetch($adh->typeid);
|
$adht->fetch($adh->typeid);
|
||||||
|
|
||||||
$reday=$_POST["reday"];
|
$reday=$_POST["reday"];
|
||||||
@ -140,12 +140,14 @@ if ($_POST["action"] == 'cotisation' && ! $_POST["cancel"])
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/* ************************************************************************** */
|
||||||
*
|
/* */
|
||||||
*/
|
/* Mode affichage */
|
||||||
|
/* */
|
||||||
|
/* ************************************************************************** */
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
$html = new Form($db);
|
||||||
|
|
||||||
if ($errmsg)
|
if ($errmsg)
|
||||||
{
|
{
|
||||||
@ -153,26 +155,14 @@ if ($errmsg)
|
|||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// fetch optionals attributes and labels
|
|
||||||
$adho->fetch_optionals();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ************************************************************************** */
|
|
||||||
/* */
|
|
||||||
/* Mode affichage */
|
|
||||||
/* */
|
|
||||||
/* ************************************************************************** */
|
|
||||||
|
|
||||||
$adh = new Adherent($db);
|
|
||||||
$adh->id = $rowid;
|
$adh->id = $rowid;
|
||||||
$adh->fetch($rowid);
|
$result=$adh->fetch($rowid);
|
||||||
$adh->fetch_optionals($rowid);
|
$result=$adh->fetch_optionals($rowid);
|
||||||
|
|
||||||
$adht = new AdherentType($db);
|
|
||||||
$adht->fetch($adh->typeid);
|
$adht->fetch($adh->typeid);
|
||||||
|
|
||||||
$html = new Form($db);
|
// fetch optionals attributes and labels
|
||||||
|
$adho->fetch_optionals();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -211,7 +201,7 @@ print '</tr>';
|
|||||||
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur">'.$adh->login.' </td></tr>';
|
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur">'.$adh->login.' </td></tr>';
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adh->type."</td></tr>\n";
|
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$adh->getLibStatut(4).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$adh->getLibStatut(4).'</td></tr>';
|
||||||
@ -420,7 +410,7 @@ if ($action == 'addsubscription' && $user->rights->adherent->cotisation->creer)
|
|||||||
{
|
{
|
||||||
$s1='<input name="sendmail" type="checkbox"'.($conf->global->ADHERENT_MAIL_COTIS?' checked="true"':'').'>';
|
$s1='<input name="sendmail" type="checkbox"'.($conf->global->ADHERENT_MAIL_COTIS?' checked="true"':'').'>';
|
||||||
$s2=$langs->trans("MailFrom").': <b>'.$conf->global->ADHERENT_MAIL_FROM.'</b><br>';
|
$s2=$langs->trans("MailFrom").': <b>'.$conf->global->ADHERENT_MAIL_FROM.'</b><br>';
|
||||||
$s2.=$langs->trans("MailTo").': <b>'.$adh->email.'</b>';
|
$s2.=$langs->trans("MailRecipient").': <b>'.$adh->email.'</b>';
|
||||||
//$s2.='<br>'.$langs->trans("Content").': '.nl2br($conf->global->ADHERENT_MAIL_COTIS);
|
//$s2.='<br>'.$langs->trans("Content").': '.nl2br($conf->global->ADHERENT_MAIL_COTIS);
|
||||||
print $html->textwithhelp($s1,$s2,1);
|
print $html->textwithhelp($s1,$s2,1);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -949,7 +949,7 @@ if ($rowid && $action != 'edit')
|
|||||||
print '<tr><td>'.$langs->trans("Password").'</td><td>'.eregi_replace('.','*',$adh->pass).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Password").'</td><td>'.eregi_replace('.','*',$adh->pass).'</td></tr>';
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adh->type."</td></tr>\n";
|
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||||
|
|
||||||
// Morphy
|
// Morphy
|
||||||
print '<tr><td>'.$langs->trans("Person").'</td><td class="valeur">'.$adh->getmorphylib().'</td></tr>';
|
print '<tr><td>'.$langs->trans("Person").'</td><td class="valeur">'.$adh->getmorphylib().'</td></tr>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user