FIX regression

This commit is contained in:
Regis Houssin 2021-01-02 17:23:25 +01:00
parent 3b7f5a92cb
commit d0d9427666

View File

@ -278,7 +278,6 @@ if ($action == 'edit')
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$langs->trans("MAIN_DISABLE_METEO").'</td><td class="center">'; print '<td>'.$langs->trans("MAIN_DISABLE_METEO").'</td><td class="center">';
if (!isset($conf->global->MAIN_DISABLE_METEO)) $conf->global->MAIN_DISABLE_METEO = 0;
print $labelmeteo[$conf->global->MAIN_DISABLE_METEO]; print $labelmeteo[$conf->global->MAIN_DISABLE_METEO];
print '</td></tr>'; print '</td></tr>';
@ -288,7 +287,7 @@ if ($action == 'edit')
print '<br>'; print '<br>';
if (empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METEO != 1) { if ($conf->global->MAIN_DISABLE_METEO != 1) {
// Show logo for weather // Show logo for weather
print '<span class="opacitymedium">'.$langs->trans("DescWeather").'</span> '; print '<span class="opacitymedium">'.$langs->trans("DescWeather").'</span> ';
@ -315,7 +314,6 @@ if (empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METE
$level1 = $offset + 1 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL1)) $level1 = $conf->global->MAIN_METEO_LEVEL1; $level1 = $offset + 1 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL1)) $level1 = $conf->global->MAIN_METEO_LEVEL1;
$level2 = $offset + 2 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL2)) $level2 = $conf->global->MAIN_METEO_LEVEL2; $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; $level3 = $offset + 3 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL3)) $level3 = $conf->global->MAIN_METEO_LEVEL3;
$level4 = $offset + 4 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL4)) $level4 = $conf->global->MAIN_METEO_LEVEL4;
$text = ''; $options = 'class="valignmiddle" height="60px"'; $text = ''; $options = 'class="valignmiddle" height="60px"';
@ -335,9 +333,6 @@ if (empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METE
print '</div><div class="inline-block" style="padding-right: 20px">'; print '</div><div class="inline-block" style="padding-right: 20px">';
print img_weather($text, 3, $options); print img_weather($text, 3, $options);
print ' &lt;= <input type="text" size="2" name="MAIN_METEO_LEVEL3" value="'.$level3.'"/></td>'; print ' &lt;= <input type="text" size="2" name="MAIN_METEO_LEVEL3" value="'.$level3.'"/></td>';
print '</div><div class="inline-block" style="padding-right: 20px">';
print img_weather($text, 4, $options);
print ' &lt;= <input type="text" size="2" name="MAIN_METEO_LEVEL4" value="'.$level4.'"/></td>';
print '</div>'; print '</div>';
print '</div>'; print '</div>';
@ -348,19 +343,16 @@ if (empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METE
print '<div>'; print '<div>';
print '<div class="inline-block" style="padding-right: 20px">'; print '<div class="inline-block" style="padding-right: 20px">';
print img_weather($text, 0, $options); print img_weather($text, 0, $options);
print ' &lt;= <input type="text" size="2" name="MAIN_METEO_PERCENTAGE_LEVEL0" value="'.(isset($conf->global->MAIN_METEO_PERCENTAGE_LEVEL0) ? $conf->global->MAIN_METEO_PERCENTAGE_LEVEL0 : '0').'"/>&nbsp;%</td>'; print ' &lt;= <input type="text" size="2" name="MAIN_METEO_PERCENTAGE_LEVEL0" value="'.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL0.'"/>&nbsp;%</td>';
print '</div><div class="inline-block" style="padding-right: 20px">'; print '</div><div class="inline-block" style="padding-right: 20px">';
print img_weather($text, 1, $options); print img_weather($text, 1, $options);
print ' &lt;= <input type="text" size="2" name="MAIN_METEO_PERCENTAGE_LEVEL1" value="'.(isset($conf->global->MAIN_METEO_PERCENTAGE_LEVEL1) ? $conf->global->MAIN_METEO_PERCENTAGE_LEVEL1 : '10').'"/>&nbsp;%</td>'; print ' &lt;= <input type="text" size="2" name="MAIN_METEO_PERCENTAGE_LEVEL1" value="'.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL1.'"/>&nbsp;%</td>';
print '</div><div class="inline-block" style="padding-right: 20px">'; print '</div><div class="inline-block" style="padding-right: 20px">';
print img_weather($text, 2, $options); print img_weather($text, 2, $options);
print ' &lt;= <input type="text" size="2" name="MAIN_METEO_PERCENTAGE_LEVEL2" value="'.(isset($conf->global->MAIN_METEO_PERCENTAGE_LEVEL2) ? $conf->global->MAIN_METEO_PERCENTAGE_LEVEL2 : '20').'"/>&nbsp;%</td>'; print ' &lt;= <input type="text" size="2" name="MAIN_METEO_PERCENTAGE_LEVEL2" value="'.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL2.'"/>&nbsp;%</td>';
print '</div><div class="inline-block" style="padding-right: 20px">'; print '</div><div class="inline-block" style="padding-right: 20px">';
print img_weather($text, 3, $options); print img_weather($text, 3, $options);
print ' &lt;= <input type="text" size="2" name="MAIN_METEO_PERCENTAGE_LEVEL3" value="'.(isset($conf->global->MAIN_METEO_PERCENTAGE_LEVEL3) ? $conf->global->MAIN_METEO_PERCENTAGE_LEVEL3 : '30').'"/>&nbsp;%</td>'; print ' &lt;= <input type="text" size="2" name="MAIN_METEO_PERCENTAGE_LEVEL3" value="'.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL3.'"/>&nbsp;%</td>';
print '</div><div class="inline-block" style="padding-right: 20px">';
print img_weather($text, 4, $options);
print ' &lt;= <input type="text" size="2" name="MAIN_METEO_PERCENTAGE_LEVEL4" value="'.(isset($conf->global->MAIN_METEO_PERCENTAGE_LEVEL4) ? $conf->global->MAIN_METEO_PERCENTAGE_LEVEL4 : '40').'"/>&nbsp;%</td>';
print '</div>'; print '</div>';
print '</div>'; print '</div>';
@ -400,19 +392,19 @@ if (empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METE
print '<div>'; print '<div>';
print '<div class="inline-block" style="padding-right: 20px">'; print '<div class="inline-block" style="padding-right: 20px">';
print img_weather($text, 0, $options); print img_weather($text, 0, $options);
print ' &lt;= '.(isset($conf->global->MAIN_METEO_PERCENTAGE_LEVEL0) ? $conf->global->MAIN_METEO_PERCENTAGE_LEVEL0 : '0').'&nbsp;%</td>'; print ' &lt;= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL0.'&nbsp;%</td>';
print '</div><div class="inline-block" style="padding-right: 20px">'; print '</div><div class="inline-block" style="padding-right: 20px">';
print img_weather($text, 1, $options); print img_weather($text, 1, $options);
print ' &lt;= '.(isset($conf->global->MAIN_METEO_PERCENTAGE_LEVEL1) ? $conf->global->MAIN_METEO_PERCENTAGE_LEVEL1 : '10').'&nbsp;%</td>'; print ' &lt;= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL1.'&nbsp;%</td>';
print '</div><div class="inline-block" style="padding-right: 20px">'; print '</div><div class="inline-block" style="padding-right: 20px">';
print img_weather($text, 2, $options); print img_weather($text, 2, $options);
print ' &lt;= '.(isset($conf->global->MAIN_METEO_PERCENTAGE_LEVEL2) ? $conf->global->MAIN_METEO_PERCENTAGE_LEVEL2 : '20').'&nbsp;%</td>'; print ' &lt;= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL2.'&nbsp;%</td>';
print '</div><div class="inline-block" style="padding-right: 20px">'; print '</div><div class="inline-block" style="padding-right: 20px">';
print img_weather($text, 3, $options); print img_weather($text, 3, $options);
print ' &lt;= '.(isset($conf->global->MAIN_METEO_PERCENTAGE_LEVEL3) ? $conf->global->MAIN_METEO_PERCENTAGE_LEVEL3 : '30').'&nbsp;%</td>'; print ' &lt;= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL3.'&nbsp;%</td>';
print '</div><div class="inline-block" style="padding-right: 20px">'; print '</div><div class="inline-block" style="padding-right: 20px">';
print img_weather($text, 4, $options); print img_weather($text, 4, $options);
print ' &gt; '.(isset($conf->global->MAIN_METEO_PERCENTAGE_LEVEL4) ? $conf->global->MAIN_METEO_PERCENTAGE_LEVEL4 : '40').'&nbsp;%</td>'; print ' &gt; '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL3.'&nbsp;%</td>';
print '</div>'; print '</div>';
print '</div>'; print '</div>';
} else { } else {
@ -431,7 +423,7 @@ if (empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METE
print ' &lt;= '.$level3; print ' &lt;= '.$level3;
print '</div><div class="inline-block" style="padding-right: 20px">'; print '</div><div class="inline-block" style="padding-right: 20px">';
print img_weather($text, 4, $options); print img_weather($text, 4, $options);
print ' &gt; '.$level4; print ' &gt; '.$level3;
print '</div>'; print '</div>';
print '</div>'; print '</div>';
} }