From 8ca6cc32b2c789a3149861159ad258f2cb9491e3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:39:39 +0200 Subject: Adding upstream version 2.11.4. Signed-off-by: Daniel Baumann --- application/forms/ConfirmRemovalForm.php | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 application/forms/ConfirmRemovalForm.php (limited to 'application/forms/ConfirmRemovalForm.php') diff --git a/application/forms/ConfirmRemovalForm.php b/application/forms/ConfirmRemovalForm.php new file mode 100644 index 0000000..39fc661 --- /dev/null +++ b/application/forms/ConfirmRemovalForm.php @@ -0,0 +1,38 @@ +setName('form_confirm_removal'); + $this->getSubmitLabel() ?: $this->setSubmitLabel($this->translate('Confirm Removal')); + } + + /** + * {@inheritdoc} + */ + public function addSubmitButton() + { + parent::addSubmitButton(); + + if (($submit = $this->getElement('btn_submit')) !== null) { + $class = $submit->getAttrib('class'); + $submit->setAttrib('class', empty($class) ? 'autofocus' : $class . ' autofocus'); + } + + return $this; + } +} -- cgit v1.2.3