From 5fb8d8f685822ff5ed9cbedc4d308a5bcbae3886 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 28 Jun 2021 17:00:08 +0200 Subject: [PATCH] Use RejectEverythingFormField in PackageEnableUpgradeOverrideForm --- ...PackageEnableUpgradeOverrideForm.class.php | 31 ++----------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/form/PackageEnableUpgradeOverrideForm.class.php b/wcfsetup/install/files/lib/acp/form/PackageEnableUpgradeOverrideForm.class.php index 9ab9b183ec..96037f68d8 100644 --- a/wcfsetup/install/files/lib/acp/form/PackageEnableUpgradeOverrideForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PackageEnableUpgradeOverrideForm.class.php @@ -5,9 +5,8 @@ namespace wcf\acp\form; use wcf\data\package\update\server\PackageUpdateServer; use wcf\form\AbstractForm; use wcf\form\AbstractFormBuilderForm; -use wcf\system\form\builder\field\AbstractFormField; use wcf\system\form\builder\field\BooleanFormField; -use wcf\system\form\builder\field\validation\FormFieldValidationError; +use wcf\system\form\builder\field\RejectEverythingFormField; use wcf\system\form\builder\TemplateFormNode; use wcf\system\registry\RegistryHandler; use wcf\system\WCF; @@ -61,33 +60,7 @@ final class PackageEnableUpgradeOverrideForm extends AbstractFormBuilderForm ->variables([ 'issues' => $issues, ]), - new class extends AbstractFormField { - // TODO: Replace this with RejectEverythingFormField in 5.4+. - public function __construct() - { - $this->id('rejectEverything'); - } - - public function getFieldHtml() - { - return ''; - } - - public function getHtml() - { - return ''; - } - - public function readValue() - { - return $this; - } - - public function validate() - { - $this->addValidationError(new FormFieldValidationError('rejectEverything')); - } - }, + RejectEverythingFormField::create(), ]); } } -- 2.20.1