diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 0b8c639622f..2502a257ae7 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -179,10 +179,10 @@ if ($action == 'update') } } } - + dolibarr_set_const($db, "MAIN_DISABLE_METEO", $_POST["MAIN_DISABLE_METEO"], 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_USE_METEO_WITH_PERCENTAGE", GETPOST("MAIN_USE_METEO_WITH_PERCENTAGE"), 'chaine', 0, '', $conf->entity); - + // For update value with percentage $plus = ''; if (!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) $plus = '_PERCENTAGE'; @@ -212,10 +212,10 @@ if ($action == 'edit') print '
'; print ''; print ''; - + print ''; print ''; - + foreach ($modules as $module => $delays) { if (!empty($conf->$module->enabled)) @@ -230,29 +230,29 @@ if ($action == 'edit') } } } - + print '
'.$langs->trans("DelaysOfToleranceBeforeWarning").''.$langs->trans("Value").'
'; - + print '
'; - + // Show if meteo is enabled print ''; print ''; - + print ''; print ''; - + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_DISABLE_METEO").''; print $form->selectarray('MAIN_DISABLE_METEO', $labelmeteo, (empty($conf->global->MAIN_DISABLE_METEO) ? 0 : $conf->global->MAIN_DISABLE_METEO)); print '
'; } else { /* * Show parameters */ - + print ''; print ''; - + foreach ($modules as $module => $delays) { if (!empty($conf->$module->enabled)) @@ -267,20 +267,20 @@ if ($action == 'edit') } } } - + print '
'.$langs->trans("DelaysOfToleranceBeforeWarning").''.$langs->trans("Value").'
'; - + print '
'; - + // Show if meteo is enabled print ''; print ''; - + print ''; print ''; - + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_DISABLE_METEO").''; print $labelmeteo[$conf->global->MAIN_DISABLE_METEO]; print '
'; } @@ -290,7 +290,7 @@ print '
'; if ($conf->global->MAIN_DISABLE_METEO != 1) { // Show logo for weather print ''.$langs->trans("DescWeather").' '; - + if ($action == 'edit') { $str_mode_std = $langs->trans('MeteoStdModEnabled').' : '.$langs->trans('MeteoUseMod', $langs->transnoentitiesnoconv('MeteoPercentageMod')); $str_mode_percentage = $langs->trans('MeteoPercentageModEnabled').' : '.$langs->trans('MeteoUseMod', $langs->transnoentitiesnoconv('MeteoStdMod')); @@ -298,14 +298,14 @@ if ($conf->global->MAIN_DISABLE_METEO != 1) { else $str_mode_enabled = $str_mode_percentage; print ''.$str_mode_enabled.''; print ''; - + print '

'; } else { if (empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) print $langs->trans('MeteoStdModEnabled'); else print $langs->trans('MeteoPercentageModEnabled'); print '

'; } - + $offset = 0; $cursor = 10; // By default //if (! empty($conf->global->MAIN_METEO_OFFSET)) $offset=$conf->global->MAIN_METEO_OFFSET; @@ -315,11 +315,11 @@ if ($conf->global->MAIN_DISABLE_METEO != 1) { $level2 = $offset + 2 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL2)) $level2 = $conf->global->MAIN_METEO_LEVEL2; $level3 = $offset + 3 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL3)) $level3 = $conf->global->MAIN_METEO_LEVEL3; $text = ''; $options = 'class="valignmiddle" height="60px"'; - - + + if ($action == 'edit') { print '
global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '' : 'style="display:none;"').'>'; - + print '
'; print '
'; print img_weather($text, 0, $options); @@ -335,11 +335,11 @@ if ($conf->global->MAIN_DISABLE_METEO != 1) { print ' <= '; print '
'; print '
'; - + print '
'; - + print '
global->MAIN_USE_METEO_WITH_PERCENTAGE) ? 'style="display:none;"' : '').'>'; - + print '
'; print '
'; print img_weather($text, 0, $options); @@ -355,9 +355,9 @@ if ($conf->global->MAIN_DISABLE_METEO != 1) { print ' <=  %'; print '
'; print '
'; - + print '
'; - + ?>