diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 6c647d51961..d16aeaf2ddb 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -22,7 +22,17 @@ * \file htdocs/public/members/new.php * \ingroup member * \brief Example of form to add a new member - * \version $Id: new.php,v 1.26 2011/06/26 18:53:17 eldy Exp $ + * \version $Id: new.php,v 1.28 2011/06/26 19:29:39 eldy Exp $ + * + * Note that you can add following constant to change behaviour of page + * MEMBER_NEWFORM_EDITAMOUNT + * MEMBER_NEWFORM_PAYONLINE + * MEMBER_NEWFORM_DOLIBARRTURNOVER + * MEMBER_URL_REDIRECT_SUBSCRIPTION + * MEMBER_NEWFORM_FORCETYPE + * MEMBER_NEWFORM_FORCEMORPHY + * MEMBER_NEWFORM_FORCECOUNTRYCODE + * */ define("NOLOGIN",1); // This means this output page does not require to be logged. @@ -134,6 +144,16 @@ if ($action == 'add') $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("EMail"))."
\n"; } } + if (GETPOST('type') <= 0) + { + $error+=1; + $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type"))."
\n"; + } + if (! in_array(GETPOST('morphy'),array('mor','phy'))) + { + $error+=1; + $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("MorPhy"))."
\n"; + } if (!isset($_POST["nom"]) || !isset($_POST["prenom"]) || $_POST["prenom"]=='' || $_POST["nom"]=='') { $error+=1; @@ -243,7 +263,7 @@ if ($action == 'added') print $langs->trans("NewMemberbyWeb"); print ''; - llxFooterVierge('$Date: 2011/06/26 18:53:17 $ - $Revision: 1.26 $'); + llxFooterVierge('$Date: 2011/06/26 19:29:39 $ - $Revision: 1.28 $'); exit; } @@ -275,19 +295,24 @@ print $langs->trans("FieldsWithIsForPublic",'**').'
'; print ''; @@ -390,7 +415,7 @@ print '