DirectorObjectForm: hardcode boolean handling

This commit is contained in:
Thomas Gelf 2016-05-25 15:25:21 +02:00
parent 984f28bfdc
commit baf6d8f62f
1 changed files with 3 additions and 0 deletions

View File

@ -611,6 +611,9 @@ abstract class DirectorObjectForm extends QuickForm
$txtInherited = $this->translate(' (inherited from "%s")'); $txtInherited = $this->translate(' (inherited from "%s")');
if ($el instanceof Zf_Select) { if ($el instanceof Zf_Select) {
$multi = $el->getMultiOptions(); $multi = $el->getMultiOptions();
if (is_bool($inherited)) {
$inherited = $inherited ? 'y' : 'n';
}
if (array_key_exists($inherited, $multi)) { if (array_key_exists($inherited, $multi)) {
$multi[null] = $multi[$inherited] . sprintf($txtInherited, $inheritedFrom); $multi[null] = $multi[$inherited] . sprintf($txtInherited, $inheritedFrom);
} else { } else {