diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php
index 0b6690cd051..2ac922a6a0a 100644
--- a/htdocs/admin/delais.php
+++ b/htdocs/admin/delais.php
@@ -251,20 +251,26 @@ else
print '
';
+// Show logo for weather
+print $langs->trans("DescWeather").'
';
+
if($action == 'edit') {
- $str = $langs->trans('StdMod');
- $str = $langs->trans('PercentageMod');
- print ''.$str.'';
+ $str_mode_std = $langs->trans('MeteoStdModEnabled').' : '.$langs->trans('MeteoUseMod', $langs->trans('MeteoPercentageMod'));
+ $str_mode_percentage = $langs->trans('MeteoPercentageModEnabled').' : '.$langs->trans('MeteoUseMod', $langs->trans('MeteoStdMod'));
+ if(empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) $str_mode_enabled = $str_mode_std;
+ 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 '
';
}
-// Show logo for weather
-print $langs->trans("DescWeather").'
';
-
$offset=0;
$cursor=10; // By default
//if (! empty($conf->global->MAIN_METEO_OFFSET)) $offset=$conf->global->MAIN_METEO_OFFSET;
@@ -432,16 +438,20 @@ if($action == 'edit') {
$(document).ready(function() {
$("#change_mode").click(function() {
- use_percent = $("#MAIN_USE_METEO_WITH_PERCENTAGE");
-
+ var use_percent = $("#MAIN_USE_METEO_WITH_PERCENTAGE");
+ var str_mode_std = "";
+ var str_mode_percentage = "";
+
if(use_percent.val() == 1) {
use_percent.val(0);
$("#standard").show();
$("#percentage").hide();
+ $(this).html(str_mode_std);
} else {
use_percent.val(1);
$("#standard").hide();
$("#percentage").show();
+ $(this).html(str_mode_percentage);
}
});