----------------------------------------
* CRM-14353: Fix formNavigate to work with multiple forms & ajax
https://issues.civicrm.org/jira/browse/CRM-14353
})
.on('submit', function(e) {
// CRM-14353 - disable changes warn when submitting the form
- $(this).removeAttr('data-warn-changes');
+ $('[data-warn-changes]').removeAttr('data-warn-changes');
})
;
window.onbeforeunload = function() {
- if (CRM.utils.initialValueChanged($('form[data-warn-changes]'))) {
+ if (CRM.utils.initialValueChanged($('form[data-warn-changes=true]'))) {
return ts('You have unsaved changes.');
}
};