diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index 3bd0468cc27..3faf6dc770c 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -174,7 +174,7 @@ print '
'; print ''.$langs->trans("AgendaExtSitesDesc")."
\n"; print "
\n"; -$selectedvalue = $conf->global->AGENDA_DISABLE_EXT; +$selectedvalue = empty($conf->global->AGENDA_DISABLE_EXT) ? 0 : $conf->global->AGENDA_DISABLE_EXT; if ($selectedvalue == 1) { $selectedvalue = 0; } else { @@ -201,20 +201,23 @@ while ($i <= $MAXAGENDA) { $offsettz = 'AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key; $color = 'AGENDA_EXT_COLOR_'.$id.'_'.$key; - print ''; // Nb print ''.$langs->trans("AgendaExtNb", $key).""; // Name - print ''; + $name_value = (GETPOST('AGENDA_EXT_NAME_'.$id.'_'.$key) ?GETPOST('AGENDA_EXT_NAME_'.$id.'_'.$key) : (empty($object->conf->$name) ? '' : $object->conf->$name)); + print ''; // URL - print ''; + $src_value = (GETPOST('AGENDA_EXT_SRC_'.$id.'_'.$key) ?GETPOST('AGENDA_EXT_SRC_'.$id.'_'.$key) : (empty($object->conf->$src) ? '' : $object->conf->$src)); + print ''; // Offset TZ - print ''; + $offsettz_value = (GETPOST('AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key) ? GETPOST('AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key) : (empty($object->conf->$offsettz) ? 0 : $object->conf->$offsettz)); + print ''; // Color (Possible colors are limited by Google) print ''; //print $formadmin->selectColor($conf->global->$color, "google_agenda_color".$key, $colorlist); - print $formother->selectColor((GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key) ?GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key) : $object->conf->$color), "AGENDA_EXT_COLOR_".$id.'_'.$key, 'extsitesconfig', 1, '', 'hideifnotset'); + $color_value = (GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key) ?GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key) : (empty($object->conf->$color) ? 'ffffff' : $object->conf->$color)); + print $formother->selectColor($color_value, "AGENDA_EXT_COLOR_".$id.'_'.$key, 'extsitesconfig', 1, '', 'hideifnotset'); print ''; print ""; $i++;