mirror of
https://github.com/Icinga/icingaweb2.git
synced 2026-06-08 16:12:43 -04:00
Form: Automatically set data-progress-element...
..for forms with form based autosubmit warnings. refs #8369
This commit is contained in:
parent
ebd34422cb
commit
46cd47b73c
1 changed files with 7 additions and 1 deletions
|
|
@ -668,6 +668,12 @@ class Form extends Zend_Form
|
|||
public function setUseFormAutosubmit($state = true)
|
||||
{
|
||||
$this->useFormAutosubmit = (bool) $state;
|
||||
if ($this->useFormAutosubmit) {
|
||||
$this->setAttrib('data-progress-element', 'form-header');
|
||||
} else {
|
||||
$this->removeAttrib('data-progress-element');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
@ -1203,7 +1209,7 @@ class Form extends Zend_Form
|
|||
$this->addDecorator('Description', array('tag' => 'h1'));
|
||||
if ($this->getUseFormAutosubmit()) {
|
||||
$this->addDecorator('Autosubmit', array('accessible' => true))
|
||||
->addDecorator('HtmlTag', array('tag' => 'div', 'class' => 'header'));
|
||||
->addDecorator('HtmlTag', array('tag' => 'div', 'class' => 'header', 'id' => 'form-header'));
|
||||
}
|
||||
|
||||
$this->addDecorator('FormDescriptions')
|
||||
|
|
|
|||
Loading…
Reference in a new issue