Modified File: wp-content/plugins/civicrm/civicrm/ext/afform/core/ang/af/afForm.component.js
PR: Field Validation
Note: Custom field validation has been added to meet project requirements and priorities. This change should be revisited and replaced with a more robust solution in the future.
-
Backup the Modified File: Ensure you have a backup of
afForm.component.jsandqrcodecheckin.jsthat includes custom changes. -
Review the Upgraded Plugin: After upgrading, check for any conflicts or overwrites in the
afForm.component.jsandqrcodecheckin.jsfiles. -
Re-apply Changes: If necessary, manually re-apply the custom logic to the updated files.
-
Test the Changes: Thoroughly test the QR code check-in functionality and form validations to ensure everything works as expected after the re-application of changes.
Modified File: wp-content/plugins/civicrm/civicrm/ext/afform/core/ang/qrcodecheckin.js
- Replaced
window.location.pathnamewithwindow.location.hreffor fetching the URL. - Used
decodeURIComponent()to decode the URL instead of the previous string replacement method.var path_name = window.location.href; var sanitized_path_name = decodeURIComponent(path_name);
- API calls now use
CRM.api4()instead ofCRM.api3()for better performance and maintainability.CRM.api4('Participant', 'update', { values: { "status_id": 2 }, where: [["id", "=", participant_id]], }).then(function(results) { console.log(results); if (results) { CRM.$('#qrcheckin-status').html('Attended'); CRM.$('#qrcheckin-status-line') .removeClass("qrcheckin-status-registered") .addClass("qrcheckin-status-attended"); CRM.$('#qrcheckin-update-button').hide(); } }, function(failure) { console.error("API request failed:", failure); });
We made modifications to the mail templates in CiviCRM → Mailings → Message Template → System Workflow Message. Specifically, we updated the following three templates:
- Contributions – Receipt (off-line)
- Contributions – Receipt (on-line)
- Contributions – Invoice
Document: The custom code for the message templates is saved in the following files:
Production
Staging
We made modifications to the mail templates in CiviCRM → Mailings → Message Template → System Workflow Message. Specifically, we updated the following templates for event flow:
- Events - Pending Registration Expiration Notice
- Events - Registration Cancellation Notice
- Events - Registration Confirmation and Receipt (off-line)
- Events - Registration Confirmation and Receipt (on-line)
- Events - Registration Confirmation Invite
- Events - Registration Transferred Notice
Document: The custom code for the message templates is saved in the following files:
Production
- Events - Pending Registration Expiration Notice)
- Events - Registration Cancellation Notice
- Events - Registration Confirmation and Receipt (off-line)
- Events - Registration Confirmation and Receipt (on-line)
- Events - Registration Confirmation Invite
- Events - Registration Transferred Notice
Staging
- Events - Registration Cancellation Notice
- Events - Registration Confirmation and Receipt (off-line)
- Events - Registration Confirmation and Receipt (on-line)
Note: The custom changes made to the receipt templates were implemented to meet specific project requirements and priorities. When updating CiviCRM, we need to revisit these templates and apply the necessary modifications accordingly.