QuickForm: fully respect false submit label
This commit is contained in:
parent
5b509a1b7c
commit
3b4b85374d
|
@ -83,20 +83,22 @@ abstract class QuickForm extends QuickBaseForm
|
|||
|
||||
protected function addSubmitButtonIfSet()
|
||||
{
|
||||
if (false !== ($label = $this->getSubmitLabel())) {
|
||||
$el = $this->createElement('submit', $label)
|
||||
->setLabel($label)
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->submitButtonName = $el->getName();
|
||||
$this->addElement($el);
|
||||
|
||||
$fakeEl = $this->createElement('submit', '_FAKE_SUBMIT')
|
||||
->setLabel($label)
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->fakeSubmitButtonName = $fakeEl->getName();
|
||||
$this->addElement($fakeEl);
|
||||
if (false === ($label = $this->getSubmitLabel())) {
|
||||
return;
|
||||
}
|
||||
|
||||
$el = $this->createElement('submit', $label)
|
||||
->setLabel($label)
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->submitButtonName = $el->getName();
|
||||
$this->addElement($el);
|
||||
|
||||
$fakeEl = $this->createElement('submit', '_FAKE_SUBMIT')
|
||||
->setLabel($label)
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->fakeSubmitButtonName = $fakeEl->getName();
|
||||
$this->addElement($fakeEl);
|
||||
|
||||
$this->addDisplayGroup(
|
||||
array($this->fakeSubmitButtonName),
|
||||
'fake_button',
|
||||
|
|
Loading…
Reference in New Issue