mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Merge pull request #8100 from ruistrecht-alt/label_for_MAIN_SHOW_REGION_IN_STATE
NEW: Option MAIN_SHOW_REGION_IN_STATE renamed into MAIN_SHOW_REGION_IN_STATE_SELECT and more complete
This commit is contained in:
@@ -607,7 +607,15 @@ else
|
|||||||
// State
|
// State
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_STATE))
|
if (empty($conf->global->SOCIETE_DISABLE_STATE))
|
||||||
{
|
{
|
||||||
print '<tr><td><label for="state_id">'.$langs->trans('State').'</label></td><td colspan="'.$colspan.'" class="maxwidthonsmartphone">';
|
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 '<tr><td><label for="state_id">'.$langs->trans('Region-State').'</label></td><td colspan="'.$colspan.'" class="maxwidthonsmartphone">';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<tr><td><label for="state_id">'.$langs->trans('State').'</label></td><td colspan="'.$colspan.'" class="maxwidthonsmartphone">';
|
||||||
|
}
|
||||||
|
|
||||||
if ($object->country_id)
|
if ($object->country_id)
|
||||||
{
|
{
|
||||||
print $formcompany->select_state(GETPOST("state_id",'alpha')?GETPOST("state_id",'alpha'):$object->state_id,$object->country_code,'state_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
|
// State
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_STATE))
|
if (empty($conf->global->SOCIETE_DISABLE_STATE))
|
||||||
{
|
{
|
||||||
print '<tr><td><label for="state_id">'.$langs->trans('State').'</label></td><td colspan="3" class="maxwidthonsmartphone">';
|
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 '<tr><td><label for="state_id">'.$langs->trans('Region-State').'</label></td><td colspan="3" class="maxwidthonsmartphone">';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<tr><td><label for="state_id">'.$langs->trans('State').'</label></td><td colspan="3" class="maxwidthonsmartphone">';
|
||||||
|
}
|
||||||
|
|
||||||
print $formcompany->select_state($object->state_id,isset($_POST["country_id"])?GETPOST("country_id"):$object->country_id,'state_id');
|
print $formcompany->select_state($object->state_id,isset($_POST["country_id"])?GETPOST("country_id"):$object->country_id,'state_id');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -266,10 +266,10 @@ class FormCompany
|
|||||||
$out.= '<option value="'.$obj->rowid.'">';
|
$out.= '<option value="'.$obj->rowid.'">';
|
||||||
}
|
}
|
||||||
// Si traduction existe, on l'utilise, sinon on prend le libelle par defaut
|
// Si traduction existe, on l'utilise, sinon on prend le libelle par defaut
|
||||||
if(!empty($conf->global->MAIN_SHOW_REGION_IN_STATE) && $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 == 2) {
|
||||||
$out.= $obj->region_name . ' - ' . $obj->code . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:''));
|
$out.= $obj->region_name . ' - ' . $obj->code . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:''));
|
||||||
}
|
}
|
||||||
else if(!empty($conf->global->MAIN_SHOW_REGION_IN_STATE) && $conf->global->MAIN_SHOW_REGION_IN_STATE == 1) {
|
else if(!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1) {
|
||||||
$out.= $obj->region_name . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:''));
|
$out.= $obj->region_name . ' - ' . ($langs->trans($obj->code)!=$obj->code?$langs->trans($obj->code):($obj->name!='-'?$obj->name:''));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ Address=Address
|
|||||||
State=State/Province
|
State=State/Province
|
||||||
StateShort=State
|
StateShort=State
|
||||||
Region=Region
|
Region=Region
|
||||||
|
Region-State=Region - State
|
||||||
Country=Country
|
Country=Country
|
||||||
CountryCode=Country code
|
CountryCode=Country code
|
||||||
CountryId=Country id
|
CountryId=Country id
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ Address=Direcção
|
|||||||
State=Distrito
|
State=Distrito
|
||||||
StateShort=Estado
|
StateShort=Estado
|
||||||
Region=Região
|
Region=Região
|
||||||
|
Region-State=Distrito - Concelho
|
||||||
Country=País
|
Country=País
|
||||||
CountryCode=Código país
|
CountryCode=Código país
|
||||||
CountryId=ID país
|
CountryId=ID país
|
||||||
|
|||||||
@@ -1143,7 +1143,15 @@ else
|
|||||||
// State
|
// State
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_STATE))
|
if (empty($conf->global->SOCIETE_DISABLE_STATE))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.fieldLabel('State','state_id').'</td><td colspan="3" class="maxwidthonsmartphone">';
|
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 '<tr><td>'.fieldLabel('Region-State','state_id').'</td><td colspan="3" class="maxwidthonsmartphone">';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<tr><td>'.fieldLabel('State','state_id').'</td><td colspan="3" class="maxwidthonsmartphone">';
|
||||||
|
}
|
||||||
|
|
||||||
if ($object->country_id) print $formcompany->select_state($object->state_id,$object->country_code);
|
if ($object->country_id) print $formcompany->select_state($object->state_id,$object->country_code);
|
||||||
else print $countrynotdefined;
|
else print $countrynotdefined;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@@ -1700,7 +1708,15 @@ else
|
|||||||
// State
|
// State
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_STATE))
|
if (empty($conf->global->SOCIETE_DISABLE_STATE))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.fieldLabel('State','state_id').'</td><td colspan="3">';
|
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 '<tr><td>'.fieldLabel('Region-State','state_id').'</td><td colspan="3">';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<tr><td>'.fieldLabel('State','state_id').'</td><td colspan="3">';
|
||||||
|
}
|
||||||
|
|
||||||
print $formcompany->select_state($object->state_id,$object->country_code);
|
print $formcompany->select_state($object->state_id,$object->country_code);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user