From f4ff2c90f2331926a42a3e0a1bbde7955b89052e Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 18 Jul 2014 09:54:36 +0200 Subject: [PATCH] It's a form's responsibility how its submit button should look like refs #5525 --- library/Icinga/Web/Form.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Web/Form.php b/library/Icinga/Web/Form.php index 110376c08..11eab413a 100644 --- a/library/Icinga/Web/Form.php +++ b/library/Icinga/Web/Form.php @@ -132,7 +132,7 @@ class Form extends Zend_Form { if (false === $this->created) { $this->addElements($this->createElements($formData)); - $this->addCsrfToken(); + $this->addCsrfToken()->addSubmitButton(); $this->created = true; } @@ -153,6 +153,18 @@ class Form extends Zend_Form return array(); } + /** + * Add a submit button to this form + * + * Intended to be implemented by concrete form classes. + * + * @return self + */ + public function addSubmitButton() + { + return $this; + } + /** * Add a new element *