spicywebau / craft-fieldlabels

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

Fix labels not being deleted when name/instructions removed #33

Closed ttempleton closed 5 years ago

ttempleton commented 5 years ago

This would ensure that, when saving a field layout, any labels associated with that layout's unlabelled fields (i.e. labels that the user removed in the field layout designer) are deleted from the DB and project.yaml.

Note that this PR makes use of Craft's recently-added craft\services\Fields::getFieldIdsByLayoutId() method to help determine the unlabelled fields, so this would bump Field Labels' minimum Craft version requirement to 3.1.24.

Fixes part two of issue #30.