Skip to content

Commit

Permalink
Oops
Browse files Browse the repository at this point in the history
  • Loading branch information
sheadawson authored Jul 1, 2020
1 parent 5b560e4 commit 3dc5dad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Forms/DependentDropdownField.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);
Expand Down

1 comment on commit 3dc5dad

@kinglozzer
Copy link

@kinglozzer kinglozzer commented on 3dc5dad Jul 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing a couple of imports there @sheadawson 😉

Edit: #35

Please sign in to comment.