QuickForm: add buttons to group
TODO: create list of buttons, get rid of hardcoded delete
This commit is contained in:
parent
0adfc66762
commit
51ee2a1fa5
|
@ -107,16 +107,18 @@ abstract class QuickForm extends Zend_Form
|
||||||
$this->submitButtonName = $el->getName();
|
$this->submitButtonName = $el->getName();
|
||||||
$this->addElement($el);
|
$this->addElement($el);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: This is ugly, we need to defer button creation
|
$grp = array(
|
||||||
protected function moveSubmitToBottom()
|
$this->submitButtonName,
|
||||||
{
|
$this->deleteButtonName
|
||||||
$name = $this->submitButtonName;
|
);
|
||||||
if ($name && ($submit = $this->getElement($name))) {
|
$this->addDisplayGroup($grp, 'buttons', array(
|
||||||
$this->removeElement($name);
|
'decorators' => array(
|
||||||
$this->addElement($submit);
|
'FormElements',
|
||||||
}
|
'DtDdWrapper',
|
||||||
|
),
|
||||||
|
'order' => 1000,
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function createIdElement()
|
protected function createIdElement()
|
||||||
|
|
Loading…
Reference in New Issue