Form: Add prefix path for custom form validators

refs #8415
This commit is contained in:
Johannes Meyer 2015-02-11 09:50:17 +01:00
parent c31cab39cd
commit eb3063e36d
1 changed files with 8 additions and 0 deletions

View File

@ -521,6 +521,14 @@ class Form extends Zend_Form
$el = parent::createElement($type, $name, $options);
$el->addPrefixPaths(array(
array(
'prefix' => 'Icinga\\Web\\Form\\Validator\\',
'path' => Icinga::app()->getLibraryDir('Icinga/Web/Form/Validator'),
'type' => $el::VALIDATE
)
));
if (($description = $el->getDescription()) !== null && ($label = $el->getDecorator('label')) !== false) {
$label->setOptions(array(
'title' => $description,