-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Afform - UI and contextual titles for search displays #22319
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Allows filters from the URL and/or fixed values to be added to an embedded search display.
…n entity The html type info is needed for the fields to be usable in the Afform GUI. The reason for adding the pseudoconstant is to facilitate automatically fetching the title from the afAdminFormSubmissionList form. This could be inefficient for sites with thousands of forms, but I think that's sufficiently mitigated by the fact that this pseudoconstant won'be be used for much; it won't generally be loaded onto the client-side.
…ndalone mode When displaying a full-page search with contextual filters, e.g. submissions for a particular form, provides a contextual title based on the url filter arg, e.g. "My Great Form Submissions"
(Standard links)
|
test this please |
I've seen this working and happy with this |
Unrelated fail. |
colemanw
added a commit
to colemanw/civicrm-core
that referenced
this pull request
Jun 15, 2022
This narrows the scope of contextual titles from civicrm#22319 to only those filters passed internally, as used in drilldown forms. It makes sense to exclude values from exposed filters because that can lead to a confusing UI.
colemanw
added a commit
to colemanw/civicrm-core
that referenced
this pull request
Jun 16, 2022
This narrows the scope of contextual titles from civicrm#22319 to only those filters passed internally, as used in drilldown forms. It makes sense to exclude values from exposed filters because that can lead to a confusing UI.
eileenmcnaughton
pushed a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Jun 20, 2022
This narrows the scope of contextual titles from civicrm#22319 to only those filters passed internally, as used in drilldown forms. It makes sense to exclude values from exposed filters because that can lead to a confusing UI.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Makes it easy to create drilldown search displays, passing in a url arg to specify a category/container. E.g. "Custom fields in group X", "Option values for Individual Prefix", "Email addresses for Bob Smith".
Related: https://lab.civicrm.org/dev/user-interface/-/issues/44#note_68378
Before
It could be done but was clunky; the form code had to be hand-tweaked to pass in the url arg, and getting a contextual title required a big hack in the form using
crm-api4-ctrl
.After
Now there's a UI for adding filters, and the contextual title displays automatically.
Technical Details
The upshot of the change can be summarized by looking at the changes in afAdminFormSubmissionList.aff.html which no longer requires inline APIv4 code to make a title appear, and the screenshot above which shows how the
filters="{afform_name: routeParams.name}"
markup which was previously hand-written into that file is now configurable in the FormBuilder UI.