mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
Use custom label as label, if it's not just a number
This commit is contained in:
parent
93a07c2ff4
commit
5301af7a82
@ -141,7 +141,15 @@ class select_widget
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'select-country': // #Row|Extralabel,1=use country name, 0=use 2 letter-code,custom country field name
|
case 'select-country': // #Row|Extralabel,1=use country name, 0=use 2 letter-code,custom country field name
|
||||||
$cell['sel_options'] = ($type == 0 && $type2 ? array('-custom-' => lang('Custom')) : array()) + $GLOBALS['egw']->country->countries();
|
if($type == 0 && $type2)
|
||||||
|
{
|
||||||
|
$custom_label = is_numeric($type2) ? 'Custom' : $type2;
|
||||||
|
$cell['sel_options'] = array('-custom-' => lang($custom_label)) + $GLOBALS['egw']->country->countries();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$cell['sel_options'] = $GLOBALS['egw']->country->countries();
|
||||||
|
}
|
||||||
if (($extension_data['country_use_name'] = $type) && $value)
|
if (($extension_data['country_use_name'] = $type) && $value)
|
||||||
{
|
{
|
||||||
$value = $GLOBALS['egw']->country->country_code($value);
|
$value = $GLOBALS['egw']->country->country_code($value);
|
||||||
|
Loading…
Reference in New Issue
Block a user