form: Fix dynamic submit label retrieval

This commit is contained in:
Eric Lippmann 2014-09-19 13:39:38 +02:00
parent c13823d406
commit 5b5f553d0d
1 changed files with 3 additions and 2 deletions

View File

@ -370,13 +370,14 @@ class Form extends Zend_Form
*/ */
public function addSubmitButton() public function addSubmitButton()
{ {
if ($this->submitLabel) { $submitLabel = $this->getSubmitLabel();
if ($submitLabel) {
$this->addElement( $this->addElement(
'submit', 'submit',
'btn_submit', 'btn_submit',
array( array(
'ignore' => true, 'ignore' => true,
'label' => $this->getSubmitLabel(), 'label' => $submitLabel,
'decorators' => array( 'decorators' => array(
'ViewHelper', 'ViewHelper',
array('HtmlTag', array('tag' => 'div')) array('HtmlTag', array('tag' => 'div'))