From 98aaec18a72e96ee98cb6bda909c7f84e8ca1202 Mon Sep 17 00:00:00 2001 From: fhenry Date: Mon, 8 Apr 2013 18:08:38 +0200 Subject: [PATCH] Fix [ bug #810 ] Cannot update ODT template path --- htdocs/admin/commande.php | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 7dda6ded0e4..fc982db0bb7 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -66,7 +66,7 @@ if ($action == 'updateMask') } } -if ($action == 'specimen') +else if ($action == 'specimen') { $modele=GETPOST('module','alpha'); @@ -111,7 +111,8 @@ if ($action == 'specimen') } } -if ($action == 'set') +// Activate a model +else if ($action == 'set') { $label = GETPOST('label','alpha'); $scandir = GETPOST('scandir','alpha'); @@ -128,7 +129,7 @@ if ($action == 'set') } } -if ($action == 'del') +else if ($action == 'del') { $type='order'; $sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model"; @@ -142,7 +143,8 @@ if ($action == 'del') } } -if ($action == 'setdoc') +// Set default model +else if ($action == 'setdoc') { $label = GETPOST('label','alpha'); $scandir = GETPOST('scandir','alpha'); @@ -182,7 +184,7 @@ if ($action == 'setdoc') } } -if ($action == 'setmod') +else if ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -190,7 +192,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); @@ -207,7 +209,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 @@ -224,6 +226,14 @@ if ($action == 'set_COMMANDE_FREE_TEXT') $mesg = "".$langs->trans("Error").""; } } +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'); + } +} /*