mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-25 10:57:41 +02:00
QuickForm: allow options for submit button helpers
This commit is contained in:
parent
59881508bd
commit
e6a9b1197d
@ -95,9 +95,9 @@ abstract class QuickForm extends QuickBaseForm
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function addSubmitButton($label)
|
protected function addSubmitButton($label, $options = [])
|
||||||
{
|
{
|
||||||
$el = $this->createElement('submit', $label)
|
$el = $this->createElement('submit', $label, $options)
|
||||||
->setLabel($label)
|
->setLabel($label)
|
||||||
->setDecorators(array('ViewHelper'));
|
->setDecorators(array('ViewHelper'));
|
||||||
$this->submitButtonName = $el->getName();
|
$this->submitButtonName = $el->getName();
|
||||||
@ -105,9 +105,9 @@ abstract class QuickForm extends QuickBaseForm
|
|||||||
$this->addElement($el);
|
$this->addElement($el);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function addStandaloneSubmitButton($label)
|
protected function addStandaloneSubmitButton($label, $options = [])
|
||||||
{
|
{
|
||||||
$this->addSubmitButton($label);
|
$this->addSubmitButton($label, $options);
|
||||||
$this->addDisplayGroup([$this->submitButtonName], 'buttons', array(
|
$this->addDisplayGroup([$this->submitButtonName], 'buttons', array(
|
||||||
'decorators' => array(
|
'decorators' => array(
|
||||||
'FormElements',
|
'FormElements',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user