SettingsForm: do not expect enum to contain...
...the default value fixes #1054
This commit is contained in:
parent
b7579e184c
commit
7c47b5a8d1
|
@ -138,12 +138,16 @@ class SettingsForm extends DirectorForm
|
|||
|
||||
protected function eventuallyConfiguredEnum($name, $enum)
|
||||
{
|
||||
return array(
|
||||
null => sprintf(
|
||||
if (array_key_exists($name, $enum)) {
|
||||
$default = sprintf(
|
||||
$this->translate('%s (default)'),
|
||||
$enum[$this->settings->getDefaultValue($name)]
|
||||
)
|
||||
) + $enum;
|
||||
);
|
||||
} else {
|
||||
$default = $this->translate('- please choose -');
|
||||
}
|
||||
|
||||
return [null => $default] + $enum;
|
||||
}
|
||||
|
||||
public function setSettings(Settings $settings)
|
||||
|
|
Loading…
Reference in New Issue