diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 4d33723a947..72b7c8fe549 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -453,8 +453,8 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) $ok=1; foreach ($listfield as $f => $value) { + if ($value == 'country_id' && in_array($tablib[$id],array('DictionaryVAT','DictionaryRegion','DictionaryCompanyType'))) continue; // For some pages, country is not mandatory if ($value == 'country' && in_array($tablib[$id],array('DictionaryCanton','DictionaryCompanyType'))) continue; // For some pages, country is not mandatory - if ($value == 'country_id' && in_array($tablib[$id],array('DictionaryRegion','DictionaryCompanyType'))) continue; // For some pages, country is not mandatory if ($value == 'localtax1' && empty($_POST['localtax1_type'])) continue; if ($value == 'localtax2' && empty($_POST['localtax2_type'])) continue; if ($value == 'color' && empty($_POST['color'])) continue; @@ -1361,14 +1361,18 @@ function fieldList($fieldlist,$obj='',$tabname='') continue; } // For state page, we do not show the country input (we link to region, not country) print '