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

change .removeAttr('checked') to .prop('checked', false) in resetFields #902

Conversation

AsylumSeekersCentre
Copy link
Contributor

Overview

Addressing this issue:

https://www.drupal.org/project/webform_civicrm/issues/3381559#comment-15198961

Before

If you search for an Existing Contact, causing checkboxes to be autofilled, those checkboxes are not unchecked when clicking the 'x' to search for a different contact (full issue description and reproduction steps in the link above).

After

Checkboxes are unchecked as appropriate.

Technical Details

I haven't understood the second part of the line, I've just assumed that it should be retained:

.trigger('change', 'webform_civicrm:reset')

Comments

There are other uses of .removeAttr in the same file and elsewhere, which may or may not be correct. I haven't looked into changing them because I'm not aware of any specific bug which they might be causing.

…heckboxes in resetFields function (webform_civicrm_forms.js)
@KarinG
Copy link
Collaborator

KarinG commented Aug 21, 2023

@jitendrapurohit - if you can please review/verify this - that would be great.

Thanks Jude!

@jitendrapurohit
Copy link
Collaborator

@jitendrapurohit jitendrapurohit merged commit 7878cc2 into colemanw:6.x Sep 3, 2023
5 checks passed
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.

3 participants