From: mzd Date: Fri, 2 May 2014 21:11:21 +0000 (-0400) Subject: CRM-14353 fix for changed fields check not being disabled on submit X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=70408d1f63013d5175d85c6adca1ad78f18308ce;p=civicrm-core.git CRM-14353 fix for changed fields check not being disabled on submit ---------------------------------------- * CRM-14353: Fix formNavigate to work with multiple forms & ajax https://issues.civicrm.org/jira/browse/CRM-14353 --- diff --git a/js/Common.js b/js/Common.js index 2818abc18c..4b0ec52773 100644 --- a/js/Common.js +++ b/js/Common.js @@ -510,12 +510,12 @@ CRM.validate = CRM.validate || { }) .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.'); } };