';
- $objMod = new $modName($db);
+ $objMod = new $modName($this->db);
$modules[$i] = $modName;
$files[$i] = $file;
@@ -222,7 +222,7 @@ class Interfaces
else
{
include_once($dir.'/'.$file);
- $objMod = new $modName($db);
+ $objMod = new $modName($this->db);
$modules[$i] = $modName;
$files[$i] = $file;
@@ -246,7 +246,7 @@ class Interfaces
$modName = $modules[$key];
if ($modName)
{
- $objMod = new $modName($db);
+ $objMod = new $modName($this->db);
// Bypass if workflow module is enabled and if the trigger is compatible
if ($workflow && ! empty($objMod->disabled_if_workflow)) continue;
}
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index b5cc6dd2839..173895a6d46 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -576,7 +576,7 @@ CoreErrorTitle=System error
CoreErrorMessage=Sorry, an error occurred. Check the logs or contact your system administrator.
CreditCard=Credit card
FieldsWithAreMandatory=Fields with %s are mandatory
-FieldsWithIsForPublic=Fields with %s are shown on public list of members. If you don't want this, check the "public" box.
+FieldsWithIsForPublic=Fields with %s are shown on public list of members. If you don't want this, check off the "public" box.
AccordingToGeoIPDatabase=(according to GeoIP convertion)
Line=Line
NotSupported=Not supported
diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php
index 6c647d51961..51deb9696f1 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.29 2011/06/26 21:51:34 eldy Exp $
+ *
+ * Note that you can add following constant to change behaviour of page
+ * MEMBER_NEWFORM_AMOUNT Default amount for autosubscribe form
+ * MEMBER_NEWFORM_EDITAMOUNT Amount can be edited
+ * MEMBER_NEWFORM_PAYONLINE Suggest paypemt with paypal of paybox
+ * MEMBER_NEWFORM_DOLIBARRTURNOVER Show field turnover (specific for dolibarr foundation)
+ * MEMBER_URL_REDIRECT_SUBSCRIPTION Url to redirect once subscribe submitted
+ * MEMBER_NEWFORM_FORCETYPE Force type of member
+ * MEMBER_NEWFORM_FORCEMORPHY Force nature of member (mor/phy)
+ * MEMBER_NEWFORM_FORCECOUNTRYCODE Force country
*/
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 21:51:34 $ - $Revision: 1.29 $');
exit;
}
@@ -275,19 +295,24 @@ print $langs->trans("FieldsWithIsForPublic",'**').' ';
print '';
@@ -339,9 +364,9 @@ print '