|
@@ -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 '<td align="center">'.yn($objp->subscription).'</td>';
|
|
|
print '<td align="center">'.yn($objp->vote).'</td>';
|
|
|
print '<td align="center">';
|
|
|
-if ( !empty($objp->statut) ) print img_picto($langs->trans("InActivity"),'statut4');
|
|
|
-else print img_picto($langs->trans("ActivityCeased"),'statut5');
|
|
|
- print '</td>';
|
|
|
+ if ( !empty($objp->statut) ) {
|
|
|
+ print img_picto($langs->trans("InActivity"),'statut4');
|
|
|
+ } else {
|
|
|
+ print img_picto($langs->trans("ActivityCeased"),'statut5');
|
|
|
+ }
|
|
|
+ print '</td>';
|
|
|
if ($user->rights->adherent->configurer)
|
|
|
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&rowid='.$objp->rowid.'">'.img_edit().'</a></td>';
|
|
|
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 '<table class="border" width="100%">';
|
|
|
|
|
|
print '<tr><td class="titlefield">'.$langs->trans("Status").'</td><td>';
|
|
|
- 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 '</tr>';
|
|
|
|
|
|
print '<tr><td class="titlefield">'.$langs->trans("SubscriptionRequired").'</td><td>';
|
|
@@ -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 '<div class="inline-block divButAction"><a class="butAction" href="card.php?action=create&typeid='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.$langs->trans("AddMember").'</a></div>';
|
|
|
- } else {
|
|
|
- print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoAddMember")).'">'.$langs->trans("AddMember").'</a></div>';
|
|
|
- }
|
|
|
+ print '<div class="inline-block divButAction"><a class="butAction" href="card.php?action=create&typeid='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.$langs->trans("AddMember").'</a></div>';
|
|
|
+ } else {
|
|
|
+ print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoAddMember")).'">'.$langs->trans("AddMember").'</a></div>';
|
|
|
+ }
|
|
|
|
|
|
// Delete
|
|
|
if ($user->rights->adherent->configurer)
|
|
@@ -598,8 +604,8 @@ if ($rowid > 0)
|
|
|
|
|
|
print '<td align="right" colspan="2" class="liste_titre">';
|
|
|
print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
|
|
- print ' ';
|
|
|
- print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
|
|
+ print ' ';
|
|
|
+ print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
|
|
print '</td>';
|
|
|
|
|
|
print "</tr>\n";
|
|
@@ -746,10 +752,10 @@ if ($rowid > 0)
|
|
|
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input type="text" name="label" size="40" value="'.dol_escape_htmltag($object->label).'"></td></tr>';
|
|
|
|
|
|
print '<tr><td>'.$langs->trans("Status").'</td><td>';
|
|
|
- print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')), $object->statut);
|
|
|
- print '</td></tr>';
|
|
|
+ print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')), $object->statut);
|
|
|
+ print '</td></tr>';
|
|
|
|
|
|
- print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
|
|
|
+ print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
|
|
|
print $form->selectyesno("subscription",$object->subscription,1);
|
|
|
print '</td></tr>';
|
|
|
|