diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 5438d565bad..c6940a90b08 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -100,7 +100,7 @@ $tabsql[6] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.t $tabsql[7] = "SELECT a.id as rowid, a.id as code, a.libelle AS libelle, a.deductible, a.actioncompta, a.active FROM ".MAIN_DB_PREFIX."c_chargesociales AS a"; $tabsql[8] = "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_typent"; $tabsql[9] = "SELECT code, code_iso, label as libelle, active FROM ".MAIN_DB_PREFIX."c_currencies"; -$tabsql[10]= "SELECT t.rowid, t.taux, p.libelle as pays, t.fk_pays as pays_id, t.recuperableonly, t.note, t.active FROM ".MAIN_DB_PREFIX."c_tva as t, llx_c_pays as p WHERE t.fk_pays=p.rowid"; +$tabsql[10]= "SELECT t.rowid, t.taux, p.libelle as pays, p.code as pays_code, t.fk_pays as pays_id, t.recuperableonly, t.note, t.active FROM ".MAIN_DB_PREFIX."c_tva as t, llx_c_pays as p WHERE t.fk_pays=p.rowid"; $tabsql[11]= "SELECT t.rowid as rowid, element, source, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_contact AS t"; $tabsql[12]= "SELECT c.rowid as rowid, code, sortorder, c.libelle, c.libelle_facture, nbjour, fdm, decalage, active FROM ".MAIN_DB_PREFIX."cond_reglement AS c"; $tabsql[13]= "SELECT id as rowid, code, c.libelle, type, active FROM ".MAIN_DB_PREFIX."c_paiement AS c"; @@ -620,17 +620,27 @@ if ($_GET["id"]) { $showfield=1; $valuetoshow=$obj->$fieldlist[$field]; - if ($valuetoshow=='all') { $valuetoshow=$langs->trans('All'); } - if ($fieldlist[$field]=='recuperableonly' || $fieldlist[$field]=='fdm') { + else if ($fieldlist[$field]=='pays') { + $key=$langs->trans("Country".strtoupper($obj->pays_code)); + $valuetoshow=($key != "Country".strtoupper($obj->pays_code))?$key:$obj->pays; + } + else if ($fieldlist[$field]=='recuperableonly' || $fieldlist[$field]=='fdm') { $valuetoshow=yn($valuetoshow); } - if ($fieldlist[$field]=='price') { + else if ($fieldlist[$field]=='price') { $valuetoshow=price($valuetoshow); } - if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='pays_id') { + else if ($fieldlist[$field]=='price') { + $valuetoshow=price($valuetoshow); + } + else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]=='llx_c_pays') { + $key=$langs->trans("Country".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code))?$key:$obj->$fieldlist[$field]; + } + else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='pays_id') { $showfield=0; } if ($showfield) print ''.$valuetoshow.''; diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 8d674a6e9d0..b08dde639f3 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -212,28 +212,19 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') print ''; print '
'; - - // Message of the day $var=true; print ''; print ''; + + // Hide need help link on login page $var=!$var; - print ''; + print ''; + print ''; + print ''; - - // Message d'accueil' + // Message on login page $var=!$var; print ''; - // Hide need help link on login page + // Message of the day on home page $var=!$var; - print ''; - print ''; - print ''; + print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MessageOfDay").''; - if ($conf->fckeditor->enabled) - { - // Editeur wysiwyg - require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('main_motd',$conf->global->MAIN_MOTD,158,'dolibarr_notes','In',false); - $doleditor->Create(); - } - else - { - print ''; - } - print '
'.$langs->trans("DisableLinkToHelpCenter").''; + print $html->selectyesno('MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1); + print ' 
'.$langs->trans("MessageLogin").''; if ($conf->fckeditor->enabled) @@ -249,13 +240,21 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') } print '
'.$langs->trans("DisableLinkToHelpCenter").''; - print $html->selectyesno('MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1); - print ' 
'.$langs->trans("MessageOfDay").''; + if ($conf->fckeditor->enabled) + { + // Editeur wysiwyg + require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); + $doleditor=new DolEditor('main_motd',$conf->global->MAIN_MOTD,158,'dolibarr_notes','In',false); + $doleditor->Create(); + } + else + { + print ''; + } + print '
'; @@ -344,7 +343,8 @@ else print ''; print ''; $var=true; - foreach ($searchform as $key => $value) { + foreach ($searchform as $key => $value) + { $var=!$var; print ''; print '
'.$langs->trans("PermanentLeftSearchForm").''.$langs->trans("Activated").' 
'.$searchformtitle[$key].'' . ($searchformconst[$key]?$langs->trans("yes"):$langs->trans("no")).''.$langs->trans("IfModuleEnabled",$langs->transnoentitiesnoconv($searchformmodule[$key])); @@ -353,20 +353,9 @@ else print '
'; print '
'; - // Message of the day $var=true; print ''; print ''; - $var=!$var; - print ''; - - // Message login - $var=!$var; - print ''; // Link to help center $var=!$var; @@ -374,6 +363,18 @@ else print yn($conf->global->MAIN_HELPCENTER_DISABLELINK); print ''; + // Message login + $var=!$var; + print ''; + + // Message of the day + $var=!$var; + print ''; + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MessageOfDay").''; - print nl2br($conf->global->MAIN_MOTD); - print '
'.$langs->trans("MessageLogin").''; - print nl2br($conf->global->MAIN_HOME); - print '
'.$langs->trans("MessageLogin").''; + print nl2br($conf->global->MAIN_HOME); + print '
'.$langs->trans("MessageOfDay").''; + print nl2br($conf->global->MAIN_MOTD); + print '
';