From 59a2f23577059bc82d52d04185af460e34f33951 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 15 Jan 2021 16:02:15 +0100 Subject: [PATCH] Fix fields selector in `Form/Builder/Field/Checkboxes` --- ts/WoltLabSuite/Core/Form/Builder/Field/Checkboxes.ts | 2 +- .../files/js/WoltLabSuite/Core/Form/Builder/Field/Checkboxes.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/WoltLabSuite/Core/Form/Builder/Field/Checkboxes.ts b/ts/WoltLabSuite/Core/Form/Builder/Field/Checkboxes.ts index 33fdfd0cac..7dd5d3aa6f 100644 --- a/ts/WoltLabSuite/Core/Form/Builder/Field/Checkboxes.ts +++ b/ts/WoltLabSuite/Core/Form/Builder/Field/Checkboxes.ts @@ -32,7 +32,7 @@ class Checkboxes extends Field { } protected _readField(): void { - this._fields = Array.from(document.querySelectorAll("input[name=" + this._fieldId + "]")); + this._fields = Array.from(document.querySelectorAll(`input[name="${this._fieldId}[]"]`)); } } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Checkboxes.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Checkboxes.js index 5e131d2a90..3234c0db42 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Checkboxes.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Checkboxes.js @@ -26,7 +26,7 @@ define(["require", "exports", "tslib", "./Field", "../../../Core"], function (re }; } _readField() { - this._fields = Array.from(document.querySelectorAll("input[name=" + this._fieldId + "]")); + this._fields = Array.from(document.querySelectorAll(`input[name="${this._fieldId}[]"]`)); } } Core.enableLegacyInheritance(Checkboxes); -- 2.20.1