From a810f143e6c03ac1207a680cee9cb3e32586ac44 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 18 Dec 2004 20:17:17 +0000 Subject: [PATCH] New: Ajout option pour choisir le mode de syncronisation avec webcalendar. --- htdocs/comm/action/fiche.php | 43 +++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index a396e2f3702..20b86bd4516 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -257,21 +257,34 @@ if ($_GET["action"] == 'create') print ''; // Lien avec calendrier si module activé - if ($conf->webcal->enabled) - { - $langs->load("other"); - print ''.$langs->trans("AddCalendarEntry").''; - if (! $user->webcal_login) { - print ''; - print ' '.$langs->trans("ErrorWebcalLoginNotDefined","id."\">".$user->login.""); - print ''; - } else { - print ''; - } - - print ''; - } - + 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 ''; + } + } + } + } + print ''.$langs->trans("Comment").''; print ''; print '';