From f5c4925e6b06ab79b7112e78e256ad293204a663 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Dec 2004 19:54:16 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20L'option=20du=20mode=20de=20syncro=20ave?= =?UTF-8?q?c=20webcalendar=20positionn=E9=20mal=20le=20choix=20de=20syncro?= =?UTF-8?q?=20par=20d=E9faut=20sur=20la=20cr=E9ation=20d'une=20action=20no?= =?UTF-8?q?n=20rendez-vous?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/comm/action/fiche.php | 81 ++++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 35 deletions(-) diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 20b86bd4516..b2c1e1ab5cf 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -20,7 +20,7 @@ * $Source$ */ -/*! +/** \file htdocs/comm/action/fiche.php \ingroup commercial \brief Page de la fiche action commercial @@ -256,34 +256,7 @@ if ($_GET["action"] == 'create') print_duree_select("duree"); print ''; - // Lien avec calendrier si module activé - if ($conf->webcal->enabled) { - if ($conf->webcal->syncro != 'never') - { - $langs->load("other"); - if (! $user->webcal_login) - { - print ''.$langs->trans("AddCalendarEntry").''; - print ''; - print ' '.$langs->trans("ErrorWebcalLoginNotDefined","id."\">".$user->login.""); - print ''; - print ''; - } - else - { - if ($conf->webcal->syncro == 'always') - { - print ''; - } - else - { - print ''.$langs->trans("AddCalendarEntry").''; - print 'webcal->syncro=='always' || $conf->webcal->syncro=='yesbydefault')?' checked':'').'>'; - print ''; - } - } - } - } + add_row_for_webcal_link(); print ''.$langs->trans("Comment").''; print ''; @@ -375,12 +348,7 @@ if ($_GET["action"] == 'create') } print ''; - // Lien avec calendrier si module activé - if ($conf->webcal->enabled) - { - $langs->load("other"); - print ''.$langs->trans("AddCalendarEntry").''; - } + add_row_for_webcal_link(); // Description print ''.$langs->trans("Description").''; @@ -520,4 +488,47 @@ if ($_GET["id"]) $db->close(); llxFooter("Dernière modification $Date$ révision $Revision$"); + + + +/** + \brief Ajoute une ligne de tableau a 2 colonnes pour avoir l'option webcalendar +*/ +function add_row_for_webcal_link() +{ + global $conf,$langs,$user; + + // Lien avec calendrier si module activé + if ($conf->webcal->enabled) { + if ($conf->webcal->syncro != 'never') + { + $langs->load("other"); + if (! $user->webcal_login) + { + print ''.$langs->trans("AddCalendarEntry").''; + print ''; + print ' '.$langs->trans("ErrorWebcalLoginNotDefined","id."\">".$user->login.""); + print ''; + print ''; + } + else + { + if ($conf->webcal->syncro == 'always') + { + print ''; + } + else + { + print ''.$langs->trans("AddCalendarEntry").''; + print 'webcal->syncro=='always' || $conf->webcal->syncro=='yesbydefault')?' checked':'').'>'; + print ''; + } + } + } + } +} + + ?> + +