Skip to content
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#3085 - Checkbox fields on profile admin page can't be unchecked #22916

Merged
merged 1 commit into from
Mar 9, 2022

Conversation

spalmstr
Copy link
Contributor

@spalmstr spalmstr commented Mar 9, 2022

Overview

This is a third attempt at a PR for issue 3085 Checkbox fields on profile admin page can't be unchecked.

Before

Once a profile checkbox was checked it would not stay cleared.

After

Cleared checkboxes stay cleared.

Technical Details

Change 'checkbox' to 'advcheckbox' in ...civicrm-core/CRM/UF/Form/Group.php and AdvanceSetting.php. It is no longer necessary to check if $params['is_active'] exists, as advcheckbox makes sure it exists, even if cleared.

Comments

Thanks to @demeritcowboy for pointing out the advcheckbox fix.

@civibot
Copy link

civibot bot commented Mar 9, 2022

(Standard links)

@civibot civibot bot added the master label Mar 9, 2022
@demeritcowboy demeritcowboy changed the title Checkbox fields on profile admin page can't be unchecked dev/core#3085 - Checkbox fields on profile admin page can't be unchecked Mar 9, 2022
@demeritcowboy
Copy link
Contributor

This works for me.

Aside: One thing I never noticed before but might be on purpose and also happens without the patch: If you uncheck is_active, then it removes any "Used For" checkboxes you had checked when it saves.

@demeritcowboy demeritcowboy merged commit 0ba7414 into civicrm:master Mar 9, 2022
@spalmstr spalmstr deleted the Issue_3085 branch November 1, 2022 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants