Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 52dc017114592bd75901f93ba15455d9e26e7756 1 parent 2cbdaa7
@andrewnicols andrewnicols authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/yui/formchangechecker/formchangechecker.js
View
6 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
Please sign in to comment.
Something went wrong with that request. Please try again.