From b6cb7389a158b902ac15594bca05c2c5413d0c15 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 4 Mar 2016 18:18:56 +0100 Subject: [PATCH] QuickForm: add prefix path for local elements --- library/Director/Web/Form/QuickForm.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/library/Director/Web/Form/QuickForm.php b/library/Director/Web/Form/QuickForm.php index fe150b57..f8d3a718 100644 --- a/library/Director/Web/Form/QuickForm.php +++ b/library/Director/Web/Form/QuickForm.php @@ -73,6 +73,21 @@ abstract class QuickForm extends Zend_Form public function __construct($options = null) { parent::__construct($this->handleOptions($options)); + + $basedir = Icinga::app() + ->getModuleManager() + ->getModule('director') + ->getLibDir() + . '/Director/Web/Form'; + + $this->addPrefixPaths(array( + array( + 'prefix' => __NAMESPACE__ . '\\Element\\', + 'path' => $basedir . '/Element', + 'type' => static::ELEMENT + ) + )); + $this->setMethod('post'); $this->setAction(Url::fromRequest()); $this->createIdElement();