From fd9947479bb7010187225209b3fa2dc4f1f4c2dc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 6 Feb 2007 09:42:09 +0000 Subject: [PATCH] =?UTF-8?q?Gestion=20erreur=20cr=E9ation=20type=20adh=E9re?= =?UTF-8?q?nt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/adherents/type.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) 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").'';