Issue #2978747: Hide field groups when all children hidden via js states
Closes #2978747
Add field group Javascript States testing to highlight the current issue.
Fixes the issue by:
- Adding a css class to all group children on forms to make it easier to identify group children in js
- Adding
state:visible
event listener and associated methods to check if an element being hidden/shown is a field group child, and if it is, determines if its parent group/s are empty or not empty and triggers either afield_group:group_empty
orfield_group:group_not_empty
event. - Adding
field_group:group_empty
&field_group:group_not_empty
listeners to specific group type js files to handle hiding and showing the group element/s.