diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php
index 14dfb9922f6..19fa67abcff 100644
--- a/htdocs/admin/delais.php
+++ b/htdocs/admin/delais.php
@@ -122,6 +122,13 @@ $modules=array(
),
);
+$labelmeteo = array(0=>$langs->trans("No"), 1=>$langs->trans("Yes"), 2=>$langs->trans("OnMobileOnly"));
+
+
+/*
+ * Actions
+ */
+
if ($action == 'update')
{
foreach($modules as $module => $delays)
@@ -201,9 +208,10 @@ if ($action == 'edit')
print '
';
print '| '.$langs->trans("Parameter").' | '.$langs->trans("Value").' |
';
- $var=false;
print '';
- print '| '.$langs->trans("MAIN_DISABLE_METEO").' | ' .$form->selectyesno('MAIN_DISABLE_METEO',(empty($conf->global->MAIN_DISABLE_METEO)?0:1),1) . ' |
';
+ print ''.$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 ' | ';
print '
';
}
@@ -241,7 +249,9 @@ else
print '| '.$langs->trans("Parameter").' | '.$langs->trans("Value").' |
';
print '';
- print '| '.$langs->trans("MAIN_DISABLE_METEO").' | ' . yn($conf->global->MAIN_DISABLE_METEO) . ' |
';
+ print ''.$langs->trans("MAIN_DISABLE_METEO").' | ';
+ print $labelmeteo[$conf->global->MAIN_DISABLE_METEO];
+ print ' | ';
print '';
diff --git a/htdocs/index.php b/htdocs/index.php
index bbdac41aad6..e8162dc95ea 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -358,7 +358,7 @@ print '';
/*
* Dolibarr Working Board with weather
*/
-$showweather=empty($conf->global->MAIN_DISABLE_METEO)?1:0;
+$showweather=(empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METEO == 2) ? 1 : 0;
//Array that contains all WorkboardResponse classes to process them
$dashboardlines=array();
@@ -536,7 +536,7 @@ $boxwork.=''."\n";
if ($showweather)
{
$boxwork.='
';
- $boxwork.='| ';
+ $boxwork.=' | ';
$text='';
if ($totallate > 0) $text=$langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv("NActionsLate",$totallate.(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '%' : '')).')';
else $text=$langs->transnoentitiesnoconv("NoItemLate");
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 16ca7cc7201..e9fd709f6dc 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1809,3 +1809,4 @@ UseSearchToSelectResource=Use a search form to choose a resource (rather than a
DisabledResourceLinkUser=Disable feature to link a resource to users
DisabledResourceLinkContact=Disable feature to link a resource to contacts
ConfirmUnactivation=Confirm module reset
+OnMobileOnly=On small screen (smartphone) only
\ No newline at end of file
|