diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php
index fc982db0bb7..bb82c0d9ee1 100644
--- a/htdocs/admin/commande.php
+++ b/htdocs/admin/commande.php
@@ -226,7 +226,7 @@ else if ($action == 'set_COMMANDE_FREE_TEXT')
$mesg = "".$langs->trans("Error")."";
}
}
-else if ($action='setModuleOptions') {
+else if ($action=='setModuleOptions') {
if (dolibarr_set_const($db, "COMMANDE_ADDON_PDF_ODT_PATH",GETPOST('value1'),'chaine',0,'',$conf->entity))
{
// La constante qui a ete lue en avant du nouveau set
diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php
index 04f429f50bb..46da115c360 100644
--- a/htdocs/admin/propal.php
+++ b/htdocs/admin/propal.php
@@ -162,6 +162,36 @@ if ($action == 'setdefaultduration')
}
}
+// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...)
+if ($action == 'setModuleOptions')
+{
+ $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")."";
+ }
+}
+
+
/*if ($action == 'setusecustomercontactasrecipient')
{
dolibarr_set_const($db, "PROPALE_USE_CUSTOMER_CONTACT_AS_RECIPIENT",$_POST["value"],'chaine',0,'',$conf->entity);