Form buttons need to be added explicitly

We either demand the user to add a submit button or provide a implicit
function call to be implemented by him, adding additional elements once
the form gets rendered.

refs #5525
This commit is contained in:
Johannes Meyer 2014-07-18 09:24:49 +02:00
parent 47ae4d79dc
commit 21cd503ee7
1 changed files with 0 additions and 97 deletions

View File

@ -23,24 +23,6 @@ class Form extends Zend_Form
*/
protected $viewScript;
/**
* Label for submit button
*
* If omitted, no button will be shown
*
* @var string
*/
protected $submitLabel;
/**
* Label for cancel button
*
* If omitted, no button will be shown
*
* @var string
*/
protected $cancelLabel;
/**
* Whether this form should NOT add random generated "challenge" tokens that are associated with the user's current
* session in order to prevent Cross-Site Request Forgery (CSRF). It is the form's responsibility to verify the
@ -80,52 +62,6 @@ class Form extends Zend_Form
return $this->viewScript;
}
/**
* Set the label for the submit button of this form
*
* @param string $submitLabel The label to set
*
* @return self
*/
public function setSubmitLabel($submitLabel)
{
$this->submitLabel = $submitLabel;
return $this;
}
/**
* Return the label for the submit button of this form
*
* @return string
*/
public function getSubmitLabel()
{
return $this->submitLabel;
}
/**
* Set the label for the cancel button of this form
*
* @param string $cancelLabel The label to set
*
* @return self
*/
public function setCancelLabel($cancelLabel)
{
$this->cancelLabel = $cancelLabel;
return $this;
}
/**
* Return the label for the cancel button of this form
*
* @return string
*/
public function getCancelLabel()
{
return $this->cancelLabel;
}
/**
* Disable CSRF counter measure and remove its field if already added
*
@ -352,39 +288,6 @@ class Form extends Zend_Form
return false;
}
/**
* Add submit button to this form
*/
protected function initSubmitButton()
{
if ($this->submitLabel) {
$this->addElement(
'submit',
'btn_submit',
array(
'label' => $this->submitLabel
)
);
}
}
/**
* Add cancel button to this form
*/
protected function initCancelButton()
{
if ($this->cancelLabel) {
$this->addElement(
'reset',
'btn_reset',
array(
'label' => $this->cancelLabel,
'class' => 'pull-right'
)
);
}
}
/**
* Add CSRF counter measure field to this form
*/