Afform - add collapsible title as directive
authorColeman Watts <coleman@civicrm.org>
Fri, 18 Mar 2022 13:42:49 +0000 (09:42 -0400)
committerColeman Watts <coleman@civicrm.org>
Sun, 20 Mar 2022 02:02:59 +0000 (22:02 -0400)
commitbe125358b0a81655a190b6c390c13d3b1f0f8cf2
tree4a5e60dec74925c8da41e722bd2f59f0d9fd71b9
parent666a68e22a9afaa6b189b7fe7f42111bcb78fc51
Afform - add collapsible title as directive

Before: A fieldset `<legend>` was treated as its own element. This was more flexible but more complex.
After: Augenerated `<legend> for fieldsets or `<h4>` for other containers based on new `af-title` directive.

This allows central control of titles for e.g. collapsible styles.
Fixes dev/core#3110
12 files changed:
ext/afform/admin/Civi/AfformAdmin/AfformAdminMeta.php
ext/afform/admin/ang/afGuiEditor.css
ext/afform/admin/ang/afGuiEditor.js
ext/afform/admin/ang/afGuiEditor/afGuiEditor.component.js
ext/afform/admin/ang/afGuiEditor/afGuiMenuItemCollapsible.component.js [new file with mode: 0644]
ext/afform/admin/ang/afGuiEditor/afGuiMenuItemCollapsible.html [new file with mode: 0644]
ext/afform/admin/ang/afGuiEditor/elements/afGuiContainer-menu.html
ext/afform/admin/ang/afGuiEditor/elements/afGuiContainer.component.js
ext/afform/admin/ang/afGuiEditor/elements/afGuiContainer.html
ext/afform/admin/ang/afGuiEditor/elements/afGuiSearchContainer-menu.html
ext/afform/core/ang/af/afTitle.directive.js [new file with mode: 0644]
ext/afform/core/ang/afCore.css