-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
dev/core#5571 dev/core#5566 Fix regressions on radio options rendering in profiles #31706
Open
eileenmcnaughton
wants to merge
3
commits into
civicrm:5.81
Choose a base branch
from
eileenmcnaughton:batman
base: 5.81
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+131
−62
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
'n' is not very meaningful. The 'sister' template uses profileFieldName - so let's align
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
eileenmcnaughton
force-pushed
the
batman
branch
from
January 3, 2025 05:54
48e5ed1
to
7ba34a0
Compare
eileenmcnaughton
changed the title
Batman
dev/core#5571 Fix regressions on radio options rendering in profiles
Jan 3, 2025
eileenmcnaughton
force-pushed
the
batman
branch
from
January 3, 2025 06:19
7ba34a0
to
564391b
Compare
eileenmcnaughton
changed the title
dev/core#5571 Fix regressions on radio options rendering in profiles
dev/core#5571 dev/core#5566 Fix regressions on radio options rendering in profiles
Jan 3, 2025
|
@vingle the classes I was referring to are php classes - no change to the css classes in this PR |
@eileenmcnaughton 🤦♂️ sorry, that's me not reading the PR properly before piping in! 🤦♂️ |
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
Alternative to #31705
@totten @artfulrobot - this is my preferred approach
Before
This addresses 2 regressions from This change b163ff8#diff-6848a25bfee634154a321db3c9c9125345b96609e62dcf7155ecbdd4d4fe4f64L35 that affect Radio Custom Fields in profiles when the 'options_per_line' is set
That PR improved the mark-up but by trying to alter it post render & missed some edge cases - this moves the markup to pre-render
when the field is not required : the 'clear' button is missing for non admin users (and always missing on the uf screen - e.g https://dmaster.localhost:32353/civicrm/profile/create?gid=1&reset=1 - but that is longer standing )
when the field is required : the options html renders twice if when rendering the 'required field missing' if not entered
After
Both of the above are fixed when options_per_line is set - as of writing I have not tested when they are not set but expect the issues may persist as they are in a separate copy & paste of the code
Technical Details
I think this is the right approach - but I have only looked at the ones with options_per_line set - I think it would be extended for the others. I suspect the classes should be renamed to 'crm_radio' and 'crm_group' rather than 'radio_with_div' and 'group_with_div' since I think I land on these being classes to add civi-specific divs rather than try to make them flexible enough to force in the relevant divs / html from the outside
Comments