diff --git a/_config/config.yml b/_config/config.yml new file mode 100644 index 0000000..cf80fe7 --- /dev/null +++ b/_config/config.yml @@ -0,0 +1,9 @@ +--- +Name: tagfieldrequirements +--- + +SilverStripe\Admin\LeftAndMain: + extra_requirements_javascript: + - 'silverstripe/tagfield:client/dist/js/bundle.js' + extra_requirements_css: + - 'silverstripe/tagfield:client/dist/styles/bundle.css' diff --git a/src/StringTagField.php b/src/StringTagField.php index af907d3..06dd1b1 100644 --- a/src/StringTagField.php +++ b/src/StringTagField.php @@ -144,9 +144,6 @@ class StringTagField extends DropdownField public function Field($properties = []) { - Requirements::css('silverstripe/tagfield:client/dist/styles/bundle.css'); - Requirements::javascript('silverstripe/tagfield:client/dist/js/bundle.js'); - $this->addExtraClass('ss-tag-field'); return $this diff --git a/src/TagField.php b/src/TagField.php index 740c934..5b74bc5 100644 --- a/src/TagField.php +++ b/src/TagField.php @@ -200,9 +200,6 @@ class TagField extends DropdownField */ public function Field($properties = []) { - Requirements::css('silverstripe/tagfield:client/dist/styles/bundle.css'); - Requirements::javascript('silverstripe/tagfield:client/dist/js/bundle.js'); - $this->addExtraClass('ss-tag-field'); return $this->customise($properties)->renderWith(self::class);