Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit e7bf0155f7ce189f65e668d487b56a2baa43bf40 1 parent bac9070
@andrewnicols andrewnicols authored samhemelryk committed
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.