From 496ac644eb1cfc9977144b7bee49fed0e4924e83 Mon Sep 17 00:00:00 2001 From: Rui Strecht Date: Thu, 25 Jan 2018 16:10:04 +0000 Subject: [PATCH 1/3] Updated label and added new translation for label --- htdocs/contact/card.php | 20 ++++++++++++++++++-- htdocs/langs/en_US/companies.lang | 1 + htdocs/langs/pt_PT/companies.lang | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index bc0031b5992..87189528d5a 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -607,7 +607,15 @@ else // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; + if(!empty($conf->global->MAIN_SHOW_REGION_IN_STATE) && ($conf->global->MAIN_SHOW_REGION_IN_STATE == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE == 2)) + { + print ''; + } + else + { + print ''; + } + if ($object->country_id) { print $formcompany->select_state(GETPOST("state_id",'alpha')?GETPOST("state_id",'alpha'):$object->state_id,$object->country_code,'state_id'); @@ -852,7 +860,15 @@ else // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; + if(!empty($conf->global->MAIN_SHOW_REGION_IN_STATE) && ($conf->global->MAIN_SHOW_REGION_IN_STATE == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE == 2)) + { + print ''; + } + else + { + print ''; + } + print $formcompany->select_state($object->state_id,isset($_POST["country_id"])?GETPOST("country_id"):$object->country_id,'state_id'); print ''; } diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 7cff22df092..c5bc84acaf8 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -56,6 +56,7 @@ Address=Address State=State/Province StateShort=State Region=Region +Region-State=Region - State Country=Country CountryCode=Country code CountryId=Country id diff --git a/htdocs/langs/pt_PT/companies.lang b/htdocs/langs/pt_PT/companies.lang index 4875dc8e3de..8f797802925 100644 --- a/htdocs/langs/pt_PT/companies.lang +++ b/htdocs/langs/pt_PT/companies.lang @@ -56,6 +56,7 @@ Address=Direcção State=Distrito StateShort=Estado Region=Região +Region-State=Distrito - Concelho Country=País CountryCode=Código país CountryId=ID país From a13866f091bfa94fd8eabbcb0a19603fa857df7c Mon Sep 17 00:00:00 2001 From: Rui Strecht Date: Thu, 25 Jan 2018 16:14:39 +0000 Subject: [PATCH 2/3] Changed MAIN_SHOW_REGION_IN_STATE to MAIN_SHOW_REGION_IN_STATE_SELECT for clarity --- htdocs/contact/card.php | 4 ++-- htdocs/core/class/html.formcompany.class.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 87189528d5a..9c35714dcd5 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -607,7 +607,7 @@ else // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - if(!empty($conf->global->MAIN_SHOW_REGION_IN_STATE) && ($conf->global->MAIN_SHOW_REGION_IN_STATE == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE == 2)) + if(!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) { print ''; } @@ -860,7 +860,7 @@ else // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - if(!empty($conf->global->MAIN_SHOW_REGION_IN_STATE) && ($conf->global->MAIN_SHOW_REGION_IN_STATE == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE == 2)) + if(!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) { print ''; } diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index c434202ba2e..d3990acc9c8 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -266,10 +266,10 @@ class FormCompany $out.= '