From 8e72727163204ed5be5a2ca1b3ddb96b0ed73289 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 26 Sep 2013 14:06:15 +0200 Subject: [PATCH] Add hidden option MAIN_ADD_EVENT_ON_ELEMENT_CARD because the new feature to have a button to create an event is not a "workflow" action so should not appears with action buttons but somewhere else on page. --- htdocs/comm/propal.php | 5 ++--- htdocs/commande/fiche.php | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 9bbd98beaf7..f6d082c763d 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -2106,11 +2106,10 @@ else if (count($object->lines) > 0) print '
'.$langs->trans('Validate').'
'; //else print ''.$langs->trans('Validate').''; } - //Creer un evenement - if ($conf->agenda->enabled) + // Create event + if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a "workflow" action so should appears somewhere else on page. { print ''.$langs->trans("AddAction").''; - } // Edit if ($object->statut == 1 && $user->rights->propal->creer) diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 2ab659ed022..3016f5ac191 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -2391,11 +2391,10 @@ else { print '
'.$langs->trans('Modify').'
'; } - //Creer un evenement - if ($conf->agenda->enabled) + // Create event + if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a "workflow" action so should appears somewhere else on page. { print ''.$langs->trans("AddAction").''; - } // Send if ($object->statut > 0)