-
-
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
CRM-21840: Show Options Edit Link for Radio and Checkbox Groups #11819
CRM-21840: Show Options Edit Link for Radio and Checkbox Groups #11819
Conversation
@mickadoo the reason that only |
@colemanw ah right, that makes sense. I've added a few changes to support refreshing radio options after saving. I'm no whiz with Javascript so prepare yourself. I've also added a GIF to the PR description showing it in action. |
I'd suggest not putting that code in Common.js since it is not needed elsewhere. Just leave it in the |
@colemanw I've added support for checkboxes, updated the PR description and added another gif showing checkbox options editing. |
This looks great @mickadoo - thanks for the screencasts. |
@colemanw I did some refactoring in the last commit to remove duplicate code. I noticed that non-custom checkbox inputs do not have a hidden input:
But custom fields checkbox options all seem to have a hidden element with duplicate name, and no value:
Any idea why the hidden element exists? I've tested without it and it doesn't seem to make any difference to saving the values. |
@mickadoo final task in this PR would be to rebase & squash it into one commit. That keeps the commit history on the master branch clean, minus the WIP back & forth commits in the PR. |
e219d4d
to
3ef9334
Compare
@colemanw squashed into one commit, there was one civilint warning before this but hopefully that should be fixed now too. |
I've reviewed the code and tested this. |
Included in CiviCRM 5.1.0 Core PR: civicrm#11819
Overview
A tool icon is provided to allow editing of option groups, however this icon is only shown for
select
input types.To make it easier to edit option groups this PR will also display the edit link for
radio
andcheckbox
input types.Before
The edit link is only shown for
select
input typesAfter
The edit link is also shown for radio groups.
The same is true for radio options belonging to custom fields
It is also shown for checkbox groups.
Radio button edit example
Checkbox group edit example