mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 14:54:24 +02:00
parent
ceeb3a9ff8
commit
e7c021845d
@ -370,7 +370,7 @@ class Form extends Zend_Form
|
|||||||
*/
|
*/
|
||||||
public function addSubmitButton()
|
public function addSubmitButton()
|
||||||
{
|
{
|
||||||
if ($this->submitLabel !== null) {
|
if ($this->submitLabel) {
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'submit',
|
'submit',
|
||||||
'btn_submit',
|
'btn_submit',
|
||||||
@ -388,6 +388,31 @@ class Form extends Zend_Form
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a subform
|
||||||
|
*
|
||||||
|
* @param Zend_Form $form The subform to add
|
||||||
|
* @param string $name The name of the subform or null to use the name of $form
|
||||||
|
* @param int $order The location where to insert the form
|
||||||
|
*
|
||||||
|
* @return Zend_Form
|
||||||
|
*/
|
||||||
|
public function addSubForm(Zend_Form $form, $name = null, $order = null)
|
||||||
|
{
|
||||||
|
if ($form instanceof self) {
|
||||||
|
$form->removeDecorator('Form');
|
||||||
|
$form->setSubmitLabel('');
|
||||||
|
$form->setTokenDisabled();
|
||||||
|
$form->setUidDisabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($name === null) {
|
||||||
|
$name = $form->getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
return parent::addSubForm($form, $name, $order);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new element
|
* Create a new element
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user