From 3dc5dad3f8592725b894065929a4af41c78256bb Mon Sep 17 00:00:00 2001 From: Shea Dawson Date: Wed, 1 Jul 2020 13:59:44 +1200 Subject: [PATCH] Oops --- src/Forms/DependentDropdownField.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Forms/DependentDropdownField.php b/src/Forms/DependentDropdownField.php index ae3a5d7..8874f57 100644 --- a/src/Forms/DependentDropdownField.php +++ b/src/Forms/DependentDropdownField.php @@ -169,6 +169,10 @@ public function setSource($source) */ public function Field($properties = []) { + if (!is_subclass_of(Controller::curr(), LeftAndMain::class)) { + Requirements::javascript('silverstripe/admin: thirdparty/jquery-entwine/dist/jquery.entwine-dist.js'); + } + Requirements::javascript( 'sheadawson/silverstripe-dependentdropdownfield:client/js/dependentdropdownfield.js' );