Works on templates implementation for mutualized code

This commit is contained in:
Regis Houssin 2010-08-05 15:33:28 +00:00
parent add1bb0023
commit 950e6511f4

View File

@ -1443,24 +1443,27 @@ if ($id > 0 || ! empty($ref))
/* /*
* Form to add new line * 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; if (! preg_match('/editline|edit_/',$_GET["action"]))
$propal->showAddFreeProductForm();
// Add predefined products/services
if ($conf->product->enabled || $conf->service->enabled)
{ {
$var=!$var; $var=true;
$propal->showAddPredefinedProductForm();
} $propal->showAddFreeProductForm();
// Add hook of other modules // Add predefined products/services
if ($conf->milestone->enabled) if ($conf->product->enabled || $conf->service->enabled)
{ {
$var=!$var; $var=!$var;
formAddMilestone($propal); $propal->showAddPredefinedProductForm();
}
// Add hook of other modules
if ($conf->milestone->enabled)
{
$var=!$var;
formAddMilestone($propal);
}
} }
} }