Skip to content

Commit

Permalink
MDL-33874 Don't warn about focussed form fields with the ignoredirty …
Browse files Browse the repository at this point in the history
…class
  • Loading branch information
Andrew Robert Nicols authored and Sam Hemelryk committed Jul 17, 2012
1 parent a64fbc8 commit 8a172fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/yui/formchangechecker/formchangechecker.js
Expand Up @@ -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
Expand Down

0 comments on commit 8a172fa

Please sign in to comment.