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()
{
if ($this->submitLabel) {
$submitLabel = $this->getSubmitLabel();
if ($submitLabel) {
$this->addElement(
'submit',
'btn_submit',
array(
'ignore' => true,
'label' => $this->getSubmitLabel(),
'label' => $submitLabel,
'decorators' => array(
'ViewHelper',
array('HtmlTag', array('tag' => 'div'))