From e6a9b1197dfaa1b69b2236069af93163ea724e13 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 19 Jul 2017 18:29:16 +0200 Subject: [PATCH] QuickForm: allow options for submit button helpers --- library/Director/Web/Form/QuickForm.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/Director/Web/Form/QuickForm.php b/library/Director/Web/Form/QuickForm.php index 3e09e3a1..26718a7f 100644 --- a/library/Director/Web/Form/QuickForm.php +++ b/library/Director/Web/Form/QuickForm.php @@ -95,9 +95,9 @@ abstract class QuickForm extends QuickBaseForm return $this; } - protected function addSubmitButton($label) + protected function addSubmitButton($label, $options = []) { - $el = $this->createElement('submit', $label) + $el = $this->createElement('submit', $label, $options) ->setLabel($label) ->setDecorators(array('ViewHelper')); $this->submitButtonName = $el->getName(); @@ -105,9 +105,9 @@ abstract class QuickForm extends QuickBaseForm $this->addElement($el); } - protected function addStandaloneSubmitButton($label) + protected function addStandaloneSubmitButton($label, $options = []) { - $this->addSubmitButton($label); + $this->addSubmitButton($label, $options); $this->addDisplayGroup([$this->submitButtonName], 'buttons', array( 'decorators' => array( 'FormElements',