Permalink
Browse files

MDL-33874 Allow form fields to be ignored by the formchangechecker

  • Loading branch information...
1 parent 2cbdaa7 commit 52dc017114592bd75901f93ba15455d9e26e7756 @andrewnicols andrewnicols committed Jul 11, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/yui/formchangechecker/formchangechecker.js
@@ -88,7 +88,11 @@ YUI.add('moodle-core-formchangechecker',
/**
* Set the form changed state to true
*/
- M.core_formchangechecker.set_form_changed = function() {
+ M.core_formchangechecker.set_form_changed = function(e) {
+ if (e.target.hasClass('ignoredirty')) {
+ // Don't warn on elements with the ignoredirty class
+ return;
+ }
M.core_formchangechecker.stateinformation.formchanged = 1;
// Once the form has been marked as dirty, we no longer need to keep track of form elements

0 comments on commit 52dc017

Please sign in to comment.