Skip to content

Commit

Permalink
MDL-33874 Allow form fields to be ignored by the formchangechecker
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Robert Nicols committed Jul 12, 2012
1 parent 2cbdaa7 commit 52dc017
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/yui/formchangechecker/formchangechecker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 52dc017

Please sign in to comment.