mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Admin - allow empty values (=Select one) as first option for custom select
This commit is contained in:
parent
93647a034f
commit
529007483b
@ -349,14 +349,14 @@ class admin_customfields
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach(explode("\n",trim($content['cf_values'])) as $line)
|
||||
foreach(explode("\n",trim($content['cf_values'])) as $idx => $line)
|
||||
{
|
||||
list($var_raw,$value) = explode('=',trim($line),2);
|
||||
$var = trim($var_raw);
|
||||
if (!preg_match(self::CHECK_MULTISELCT_VALUE, $var))
|
||||
if (!preg_match(self::CHECK_MULTISELCT_VALUE, $var) && !($idx == 0 && !$var && $value))
|
||||
{
|
||||
Api\Etemplate::set_validation_error('cf_values',
|
||||
lang('Invalide value "%1", use only:', $var)."\n".
|
||||
lang('Invalid value "%1", use only:', $var)."\n".
|
||||
preg_replace('/^.*\[([^]]+)\].*$/', '$1', self::CHECK_MULTISELCT_VALUE));
|
||||
$action = 'apply'; // do not close the window to show validation error
|
||||
if (!$cf_id) break 2; // only stop storing of new CFs
|
||||
|
Loading…
Reference in New Issue
Block a user