mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 09:53:20 +01:00
Add a parameter to allow an extra 'Custom' country option when using 2 letter codes
This commit is contained in:
parent
22ed1ab411
commit
9f6c1c1994
@ -139,15 +139,17 @@ class select_widget
|
||||
);
|
||||
break;
|
||||
|
||||
case 'select-country': // #Row|Extralabel,1=use country name, 0=use 2 letter-code
|
||||
$cell['sel_options'] = $GLOBALS['egw']->country->countries();
|
||||
|
||||
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 (($extension_data['country_use_name'] = $type) && $value)
|
||||
{
|
||||
$value = $GLOBALS['egw']->country->country_code($value);
|
||||
if (!isset($cell['sel_options'][$value]))
|
||||
{
|
||||
$cell['sel_options'][$value] = $value;
|
||||
if($type2)
|
||||
{
|
||||
$cell['sel_options'][$value] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
$cell['no_lang'] = True;
|
||||
|
Loading…
Reference in New Issue
Block a user