Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-33874 Don't warn about focussed form fields with the ignoredirty …

…class
  • Loading branch information...
commit 35ee7758822387dea3f6359b037f0550d7b799d1 1 parent 52dc017
@andrewnicols andrewnicols authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/yui/formchangechecker/formchangechecker.js
View
4 lib/yui/formchangechecker/formchangechecker.js
@@ -43,6 +43,10 @@ YUI.add('moodle-core-formchangechecker',
* get_form_dirty_state function later.
*/
store_initial_value : function(e) {
+ if (e.target.hasClass('ignoredirty')) {
+ // Don't warn on elements with the ignoredirty class
+ return;
+ }
if (M.core_formchangechecker.get_form_dirty_state()) {
// Clear the store_initial_value listeners as the form is already dirty so
// we no longer need to call this function
Please sign in to comment.
Something went wrong with that request. Please try again.