Skip to content

Commit

Permalink
NEW Add civility in list of members. Close #9251
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 4, 2018
1 parent 69cf702 commit c7fdd86
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions htdocs/adherents/list.php
Expand Up @@ -107,6 +107,7 @@
'd.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
'd.lastname'=>array('label'=>$langs->trans("Lastname"), 'checked'=>1),
'd.firstname'=>array('label'=>$langs->trans("Firstname"), 'checked'=>1),
'd.civility'=>array('label'=>$langs->trans("Civility"), 'checked'=>0),
'd.company'=>array('label'=>$langs->trans("Company"), 'checked'=>1),
'd.login'=>array('label'=>$langs->trans("Login"), 'checked'=>1),
'd.morphy'=>array('label'=>$langs->trans("MorPhy"), 'checked'=>1),
Expand Down Expand Up @@ -202,7 +203,7 @@

$now=dol_now();

$sql = "SELECT d.rowid, d.login, d.lastname, d.firstname, d.societe as company, d.fk_soc,";
$sql = "SELECT d.rowid, d.login, d.lastname, d.firstname, d.civility, d.societe as company, d.fk_soc,";
$sql.= " d.datefin, d.address, d.zip, d.town, d.state_id, d.country,";
$sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.skype, d.birth, d.public, d.photo,";
$sql.= " d.fk_adherent_type as type_id, d.morphy, d.statut, d.datec as date_creation, d.tms as date_update,";
Expand Down Expand Up @@ -427,37 +428,36 @@
print '<input class="flat maxwidth50" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
print '</td>';
}

if (! empty($arrayfields['d.firstname']['checked']))
{
print '<td class="liste_titre" align="left">';
print '<input class="flat maxwidth50" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).'"></td>';
}

if (! empty($arrayfields['d.lastname']['checked']))
{
print '<td class="liste_titre" align="left">';
print '<input class="flat maxwidth50" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).'"></td>';
}

if (! empty($arrayfields['d.civility']['checked']))
{
print '<td class="liste_titre" align="left">';
print '</td>';
}
if (! empty($arrayfields['d.company']['checked']))
{
print '<td class="liste_titre" align="left">';
print '<input class="flat maxwidth50" type="text" name="search_company" value="'.dol_escape_htmltag($search_company).'"></td>';
}

if (! empty($arrayfields['d.login']['checked']))
{
print '<td class="liste_titre" align="left">';
print '<input class="flat maxwidth50" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'"></td>';
}

if (! empty($arrayfields['d.morphy']['checked']))
{
print '<td class="liste_titre" align="left">';
print '</td>';
}

if (! empty($arrayfields['t.libelle']['checked']))
{
print '<td class="liste_titre">';
Expand Down Expand Up @@ -570,6 +570,7 @@
if (! empty($arrayfields['d.ref']['checked'])) print_liste_field_titre($arrayfields['d.ref']['label'],$_SERVER["PHP_SELF"],'d.rowid','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['d.firstname']['checked'])) print_liste_field_titre($arrayfields['d.firstname']['label'],$_SERVER["PHP_SELF"],'d.firstname','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['d.lastname']['checked'])) print_liste_field_titre($arrayfields['d.lastname']['label'],$_SERVER["PHP_SELF"],'d.lastname','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['d.civility']['checked'])) print_liste_field_titre($arrayfields['d.civility']['label'],$_SERVER["PHP_SELF"],'d.civility','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['d.company']['checked'])) print_liste_field_titre($arrayfields['d.company']['label'],$_SERVER["PHP_SELF"],'d.societe','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['d.login']['checked'])) print_liste_field_titre($arrayfields['d.login']['label'],$_SERVER["PHP_SELF"],'d.login','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['d.morphy']['checked'])) print_liste_field_titre($arrayfields['d.morphy']['label'],$_SERVER["PHP_SELF"],'d.morphy','',$param,'',$sortfield,$sortorder);
Expand Down Expand Up @@ -605,6 +606,7 @@
$datefin=$db->jdate($obj->datefin);
$memberstatic->id=$obj->rowid;
$memberstatic->ref=$obj->rowid;
$memberstatic->civility_id=$obj->civility;
$memberstatic->lastname=$obj->lastname;
$memberstatic->firstname=$obj->firstname;
$memberstatic->statut=$obj->statut;
Expand Down Expand Up @@ -648,6 +650,13 @@
print $obj->lastname;
print "</td>\n";
}
// Civility
if (! empty($arrayfields['d.civility']['checked']))
{
print "<td>";
print $obj->civility;
print "</td>\n";
}
// Company
if (! empty($arrayfields['d.company']['checked']))
{
Expand Down

0 comments on commit c7fdd86

Please sign in to comment.