mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 16:54:04 +02:00
parent
f23bf912eb
commit
4b1169c0a1
@ -7,6 +7,7 @@ namespace Icinga\Web;
|
|||||||
use LogicException;
|
use LogicException;
|
||||||
use Zend_Form;
|
use Zend_Form;
|
||||||
use Zend_View_Interface;
|
use Zend_View_Interface;
|
||||||
|
use Icinga\Application\Icinga;
|
||||||
use Icinga\Web\Session;
|
use Icinga\Web\Session;
|
||||||
use Icinga\Web\Form\Decorator\HelpText;
|
use Icinga\Web\Form\Decorator\HelpText;
|
||||||
use Icinga\Web\Form\Decorator\ElementWrapper;
|
use Icinga\Web\Form\Decorator\ElementWrapper;
|
||||||
@ -131,6 +132,12 @@ class Form extends Zend_Form
|
|||||||
public function create(array $formData = array())
|
public function create(array $formData = array())
|
||||||
{
|
{
|
||||||
if (false === $this->created) {
|
if (false === $this->created) {
|
||||||
|
if ($this->getAction() === '') {
|
||||||
|
// We MUST set an action as JS gets confused otherwise, if
|
||||||
|
// this form is being displayed in an additional column
|
||||||
|
$this->setAction(Icinga::app()->getFrontController()->getRequest()->getRequestUri());
|
||||||
|
}
|
||||||
|
|
||||||
$this->addElements($this->createElements($formData));
|
$this->addElements($this->createElements($formData));
|
||||||
$this->addCsrfToken()->addSubmitButton();
|
$this->addCsrfToken()->addSubmitButton();
|
||||||
$this->created = true;
|
$this->created = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user