From 950e6511f4770a2f33b913a242c098b28cd7b88f Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 5 Aug 2010 15:33:28 +0000 Subject: [PATCH] Works on templates implementation for mutualized code --- htdocs/comm/propal.php | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 6de91ed5b7f..ee11a7fafac 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1443,24 +1443,27 @@ if ($id > 0 || ! empty($ref)) /* * Form to add new line */ - if ($propal->statut == 0 && $user->rights->propale->creer && $_GET["action"] <> 'editline') + if ($propal->statut == 0 && $user->rights->propale->creer) { - $var=true; - - $propal->showAddFreeProductForm(); - - // Add predefined products/services - if ($conf->product->enabled || $conf->service->enabled) + if (! preg_match('/editline|edit_/',$_GET["action"])) { - $var=!$var; - $propal->showAddPredefinedProductForm(); - } - - // Add hook of other modules - if ($conf->milestone->enabled) - { - $var=!$var; - formAddMilestone($propal); + $var=true; + + $propal->showAddFreeProductForm(); + + // Add predefined products/services + if ($conf->product->enabled || $conf->service->enabled) + { + $var=!$var; + $propal->showAddPredefinedProductForm(); + } + + // Add hook of other modules + if ($conf->milestone->enabled) + { + $var=!$var; + formAddMilestone($propal); + } } }