diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index e7389281104..9cf9cb165b3 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -64,7 +64,8 @@ if ($_POST["action"] == 'add') } else { - $mesg=$this->langs("ErrorFieldRequired",$langs->trans("Label")); + $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Label")); + $_GET["action"] = 'create'; } } } @@ -97,11 +98,11 @@ if ($_GET["action"] == 'delete') Header("Location: liste.php"); exit; } + if ($_GET["action"] == 'commentaire') { $don = new Don($db); $don->set_commentaire($rowid,$_POST["commentaire"]); - $action = "edit"; } @@ -136,8 +137,10 @@ if (! $rowid && $_GET["action"] != 'create' && $_GET["action"] != 'edit') print ''; print ''.$langs->trans("Ref").''; - print ''.$langs->trans("Label").''.$langs->trans("SubscriptionRequired").''; - print ''.$langs->trans("VoteAllowed").' '; + print ''.$langs->trans("Label").''; + print ''.$langs->trans("SubscriptionRequired").''; + print ''.$langs->trans("VoteAllowed").''; + print ' '; print "\n"; $var=True; @@ -189,6 +192,8 @@ if ($_GET["action"] == 'create') print_titre($langs->trans("NewMemberType")); print '
'; + if ($mesg) print '
'.$mesg.'
'; + print "
"; print ''; @@ -197,11 +202,11 @@ if ($_GET["action"] == 'create') print ''; print ''; print ''; print '
'.$langs->trans("Label").'
'.$langs->trans("SubscriptionRequired").''; - $htmls->selectyesnonum("cotisation",""); + $htmls->selectyesnonum("cotisation",1); print '
'.$langs->trans("VoteAllowed").''; - $htmls->selectyesnonum("vote",""); + $htmls->selectyesnonum("vote",0); print '
'.$langs->trans("Comments").'';