From b15475950c41c1bbd7d375f382f15a398c93ce9f Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 24 Feb 2019 14:29:23 +0100 Subject: [PATCH] Add default id to tag form field See #2509 --- .../form/builder/field/tag/TagFormField.class.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/form/builder/field/tag/TagFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/tag/TagFormField.class.php index f2aa270534..03e884d688 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/tag/TagFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/tag/TagFormField.class.php @@ -5,6 +5,7 @@ use wcf\data\IStorableObject; use wcf\system\form\builder\field\AbstractFormField; use wcf\system\form\builder\field\data\processor\CustomFormFieldDataProcessor; use wcf\system\form\builder\field\IObjectTypeFormField; +use wcf\system\form\builder\field\TDefaultIdFormField; use wcf\system\form\builder\field\TObjectTypeFormField; use wcf\system\form\builder\IFormDocument; use wcf\system\tagging\TagEngine; @@ -14,7 +15,8 @@ use wcf\util\ArrayUtil; * Implementation of a form field for tags. * * This field uses the `wcf.tagging.tags` and `wcf.tagging.tags.description` language - * item as the default form field label and description, respectively. + * item as the default form field label and description, respectively. The default id + * of fields of this class is `tags`. * * @author Matthias Schmidt * @copyright 2001-2019 WoltLab GmbH @@ -23,6 +25,7 @@ use wcf\util\ArrayUtil; * @since 5.2 */ class TagFormField extends AbstractFormField implements IObjectTypeFormField { + use TDefaultIdFormField; use TObjectTypeFormField; /** @@ -154,4 +157,11 @@ class TagFormField extends AbstractFormField implements IObjectTypeFormField { return parent::value($stringTags); } + + /** + * @inheritDoc + */ + protected static function getDefaultId() { + return 'tags'; + } } -- 2.20.1