Skip to content
Snippets Groups Projects
Commit 6379b740 authored by Florian Henry's avatar Florian Henry
Browse files

Fix bug on ODT template path for order and projects

parent c6b66a9f
Branches
Tags
No related merge requests found
...@@ -146,7 +146,7 @@ else if ($action == 'setdoc') ...@@ -146,7 +146,7 @@ else if ($action == 'setdoc')
} }
} }
if ($action == 'setmod') else if ($action == 'setmod')
{ {
// TODO Verifier si module numerotation choisi peut etre active // TODO Verifier si module numerotation choisi peut etre active
// par appel methode canBeActivated // par appel methode canBeActivated
...@@ -154,7 +154,7 @@ if ($action == 'setmod') ...@@ -154,7 +154,7 @@ if ($action == 'setmod')
dolibarr_set_const($db, "COMMANDE_ADDON",$value,'chaine',0,'',$conf->entity); 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"); $draft = GETPOST("COMMANDE_DRAFT_WATERMARK");
$res = dolibarr_set_const($db, "COMMANDE_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity); $res = dolibarr_set_const($db, "COMMANDE_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
...@@ -171,7 +171,7 @@ if ($action == 'set_COMMANDE_DRAFT_WATERMARK') ...@@ -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 $freetext = GETPOST("COMMANDE_FREE_TEXT"); // No alpha here, we want exact string
...@@ -188,6 +188,14 @@ if ($action == 'set_COMMANDE_FREE_TEXT') ...@@ -188,6 +188,14 @@ if ($action == 'set_COMMANDE_FREE_TEXT')
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>"; $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');
}
}
/* /*
......
...@@ -152,7 +152,14 @@ else if ($action == 'setmod') ...@@ -152,7 +152,14 @@ else if ($action == 'setmod')
dolibarr_set_const($db, "PROJECT_ADDON",$value,'chaine',0,'',$conf->entity); 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 * View
*/ */
......
...@@ -89,7 +89,7 @@ class modProjet extends DolibarrModules ...@@ -89,7 +89,7 @@ class modProjet extends DolibarrModules
$r++; $r++;
$this->const[$r][0] = "PROJECT_ADDON_PDF_ODT_PATH"; $this->const[$r][0] = "PROJECT_ADDON_PDF_ODT_PATH";
$this->const[$r][1] = "chaine"; $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][3] = "";
$this->const[$r][4] = 0; $this->const[$r][4] = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment