Merge pull request #815 from FHenry/develop

Fix bug on ODT template path for order and projects
This commit is contained in:
Laurent Destailleur 2013-04-08 14:27:28 -07:00
commit bba123c6ef
3 changed files with 20 additions and 5 deletions

View File

@ -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');
}
}
/*

View File

@ -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
*/

View File

@ -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;