diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index c32c7f6de61..c1ce5c2c294 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -57,6 +57,7 @@ if (! $sortorder) { $sortorder="DESC"; } if (! $sortfield) { $sortfield="d.lastname"; } $label=GETPOST("label","alpha"); +$statut=GETPOST("statut","int"); $subscription=GETPOST("subscription","int"); $vote=GETPOST("vote","int"); $comment=GETPOST("comment",'alphanohtml'); @@ -104,7 +105,8 @@ if ($cancel) { if ($action == 'add' && $user->rights->adherent->configurer) { $object->label = trim($label); - $object->subscription = (int) trim($subscription); + $object->statut = trim($statut); + $object->subscription = (int) trim($subscription); $object->note = trim($comment); $object->mail_valid = trim($mail_valid); $object->vote = (boolean) trim($vote); @@ -157,7 +159,8 @@ if ($action == 'update' && $user->rights->adherent->configurer) $object->oldcopy = clone $object; $object->label = trim($label); - $object->subscription = (int) trim($subscription); + $object->statut = trim($statut); + $object->subscription = (int) trim($subscription); $object->note = trim($comment); $object->mail_valid = trim($mail_valid); $object->vote = (boolean) trim($vote); @@ -214,7 +217,7 @@ if (! $rowid && $action != 'create' && $action != 'edit') { //dol_fiche_head(''); - $sql = "SELECT d.rowid, d.libelle as label, d.subscription, d.vote"; + $sql = "SELECT d.rowid, d.libelle as label, d.subscription, d.vote, d.statut"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as d"; $sql.= " WHERE d.entity IN (".getEntity('member_type').")"; @@ -242,7 +245,7 @@ if (! $rowid && $action != 'create' && $action != 'edit') print ''; print ''; print ''; - print ''; + print ''; print ''; print_barre_liste($langs->trans("MembersTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit); @@ -257,6 +260,7 @@ if (! $rowid && $action != 'create' && $action != 'edit') print '
| '.$langs->trans("Status").' | '; + if ( !empty($object->statut) ) print img_picto($langs->trans('TypeStatusActive'),'statut4').' '.$langs->trans("InActivity"); + else print img_picto($langs->trans('TypeStatusInactive'),'statut5').' '.$langs->trans("ActivityCeased"); + print ' |
| '.$langs->trans("SubscriptionRequired").' | '; print yn($object->subscription); print ' | '; print ''; - print ' '; - print ''; + print ' '; + print ''; print ' | '; print "\n"; @@ -723,7 +745,11 @@ if ($rowid > 0) print '
| '.$langs->trans("Label").' | |
| '.$langs->trans("SubscriptionRequired").' | '; + print ' |
| '.$langs->trans("Status").' | '; + print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')), $object->statut); + print ' |
| '.$langs->trans("SubscriptionRequired").' | '; print $form->selectyesno("subscription",$object->subscription,1); print ' |