diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 47b16c11e49f4a9c1d42a1b85226f4ac9b1ce58d..ebcb94110e9c0afcfa5bca70c83d5b62e731ff0b 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -146,7 +146,7 @@ else if ($action == 'setdoc') } } -if ($action == 'setmod') +else if ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -154,7 +154,7 @@ if ($action == 'setmod') dolibarr_set_const($db, "COMMANDE_ADDON",$value,'chaine',0,'',$conf->entity); } -if ($action == 'set_COMMANDE_DRAFT_WATERMARK') +else if ($action == 'set_COMMANDE_DRAFT_WATERMARK') { $draft = GETPOST("COMMANDE_DRAFT_WATERMARK"); $res = dolibarr_set_const($db, "COMMANDE_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity); @@ -171,7 +171,7 @@ if ($action == 'set_COMMANDE_DRAFT_WATERMARK') } } -if ($action == 'set_COMMANDE_FREE_TEXT') +else if ($action == 'set_COMMANDE_FREE_TEXT') { $freetext = GETPOST("COMMANDE_FREE_TEXT"); // No alpha here, we want exact string @@ -188,6 +188,14 @@ if ($action == 'set_COMMANDE_FREE_TEXT') $mesg = "<font class=\"error\">".$langs->trans("Error")."</font>"; } } +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 + // on passe donc par une variable pour avoir un affichage coherent + $conf->global->COMMANDE_ADDON_PDF_ODT_PATH = GETPOST('value1'); + } +} /* diff --git a/htdocs/admin/project.php b/htdocs/admin/project.php index 8bb1baae575e48844c5ab7406ed6cb6934223af8..9f28b57be5b491d87933d0f4cef5a590cf5de12d 100644 --- a/htdocs/admin/project.php +++ b/htdocs/admin/project.php @@ -152,7 +152,14 @@ else if ($action == 'setmod') dolibarr_set_const($db, "PROJECT_ADDON",$value,'chaine',0,'',$conf->entity); } - +else if ($action='setModuleOptions') { + if (dolibarr_set_const($db, "PROJECT_ADDON_PDF_ODT_PATH",GETPOST('value1'),'chaine',0,'',$conf->entity)) + { + // La constante qui a ete lue en avant du nouveau set + // on passe donc par une variable pour avoir un affichage coherent + $conf->global->PROJECT_ADDON_PDF_ODT_PATH = GETPOST('value1'); + } +} /* * View */ diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index a17835ddcc640f7c19fd5803b59ca3a57597d63e..9bd71e50dcee559726cfe7da10cb0a9430c76344 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -89,7 +89,7 @@ class modProjet extends DolibarrModules $r++; $this->const[$r][0] = "PROJECT_ADDON_PDF_ODT_PATH"; $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/project"; + $this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/projects"; $this->const[$r][3] = ""; $this->const[$r][4] = 0;