diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index c1ce5c2c294..d24802a6a41 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -105,8 +105,8 @@ if ($cancel) { if ($action == 'add' && $user->rights->adherent->configurer) { $object->label = trim($label); - $object->statut = trim($statut); - $object->subscription = (int) trim($subscription); + $object->statut = (int) $statut; + $object->subscription = (int) $subscription; $object->note = trim($comment); $object->mail_valid = trim($mail_valid); $object->vote = (boolean) trim($vote); @@ -159,8 +159,8 @@ if ($action == 'update' && $user->rights->adherent->configurer) $object->oldcopy = clone $object; $object->label = trim($label); - $object->statut = trim($statut); - $object->subscription = (int) trim($subscription); + $object->statut = (int) $statut; + $object->subscription = (int) $subscription; $object->note = trim($comment); $object->mail_valid = trim($mail_valid); $object->vote = (boolean) trim($vote); @@ -283,9 +283,12 @@ if (! $rowid && $action != 'create' && $action != 'edit') print ''.yn($objp->subscription).''; print ''.yn($objp->vote).''; print ''; -if ( !empty($objp->statut) ) print img_picto($langs->trans("InActivity"),'statut4'); -else print img_picto($langs->trans("ActivityCeased"),'statut5'); - print ''; + if ( !empty($objp->statut) ) { + print img_picto($langs->trans("InActivity"),'statut4'); + } else { + print img_picto($langs->trans("ActivityCeased"),'statut5'); + } + print ''; if ($user->rights->adherent->configurer) print 'rowid.'">'.img_edit().''; else @@ -351,7 +354,7 @@ if ($action == 'create') // Other attributes $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; + print $hookmanager->resPrint; if (empty($reshook)) { print $object->showOptionals($extrafields,'edit'); @@ -405,8 +408,11 @@ if ($rowid > 0) print ''; print ''; print ''; print "\n"; @@ -746,10 +752,10 @@ if ($rowid > 0) print ''; print ''; + print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')), $object->statut); + print ''; - 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"); + 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").''; @@ -444,12 +450,12 @@ if ($rowid > 0) } // Add - if ( $user->rights->adherent->configurer && !empty($object->statut) ) + if ( $user->rights->adherent->configurer && !empty($object->statut) ) { - print ''; - } else { - print ''; - } + print ''; + } else { + print ''; + } // Delete if ($user->rights->adherent->configurer) @@ -598,8 +604,8 @@ if ($rowid > 0) print ''; print ''; - print '  '; - print ''; + print '  '; + print ''; print '
'.$langs->trans("Label").'
'.$langs->trans("Status").''; - print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')), $object->statut); - print '
'.$langs->trans("SubscriptionRequired").''; + print '
'.$langs->trans("SubscriptionRequired").''; print $form->selectyesno("subscription",$object->subscription,1); print '