we should skip value changes of submit buttons, CRM-14703
authorkurund <kurund@civicrm.org>
Sat, 17 May 2014 22:41:06 +0000 (17:41 -0500)
committerkurund <kurund@civicrm.org>
Sat, 17 May 2014 22:41:06 +0000 (17:41 -0500)
----------------------------------------
* CRM-14703:
  https://issues.civicrm.org/jira/browse/CRM-14703

js/Common.js

index 8a385fb1323909c58a960e235bceca6f83bf24b3..72a27d49729055092bca72c7ae7b40dfd0bf4573 100644 (file)
@@ -247,7 +247,8 @@ CRM.validate = CRM.validate || {
     var isDirty = false;
     $(':input:visible, :input.select2-offscreen', el).each(function () {
       var initialValue = $(this).data('crm-initial-value');
-      if (initialValue !== undefined && initialValue != $(this).val()) {
+      // skip change of value for submit buttons
+      if (initialValue !== undefined && !$(this).hasClass('form-submit') && initialValue != $(this).val()) {
         isDirty = true;
       }
     });