diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php
index 6c18da0e240..755ca681c73 100644
--- a/htdocs/admin/propal.php
+++ b/htdocs/admin/propal.php
@@ -162,10 +162,34 @@ if ($action == 'setdefaultduration')
}
}
-/*if ($action == 'setusecustomercontactasrecipient')
+// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...)
+if ($action == 'setModuleOptions')
{
- dolibarr_set_const($db, "PROPALE_USE_CUSTOMER_CONTACT_AS_RECIPIENT",$_POST["value"],'chaine',0,'',$conf->entity);
-}*/
+ $post_size=count($_POST);
+
+ $db->begin();
+
+ for($i=0;$i < $post_size;$i++)
+ {
+ if (array_key_exists('param'.$i,$_POST))
+ {
+ $param=GETPOST("param".$i,'alpha');
+ $value=GETPOST("value".$i,'alpha');
+ if ($param) $res = dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity);
+ if (! $res > 0) $error++;
+ }
+ }
+ if (! $error)
+ {
+ $db->commit();
+ $mesg = "".$langs->trans("SetupSaved")."";
+ }
+ else
+ {
+ $db->rollback();
+ $mesg = "".$langs->trans("Error")."";
+ }
+}