spicywebau / craft-fieldlabels

Override Craft CMS field labels and instructions in the field layout designer
MIT License
123 stars 9 forks source link

If there's a draftEditor return early #53

Closed leevigraham closed 4 years ago

leevigraham commented 4 years ago

Related to #51

There's a case where the user can create a draft but not publish. In these cases there's no button to find.

This PR uses the global window.draftEditor to test to see if the elementType is an entry which also shortcuts a lot of the existing code (which I've left for backwards compatibility).

This has only been tested on Craft 3.5.beta 2 for the use case above.

ttempleton commented 4 years ago

Thanks!