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

This commit is contained in:
Andrew Robert Nicols
2012-07-18 09:35:12 +12:00
committed by Sam Hemelryk
parent a64fbc87b6
commit 8a172fa7cf
+4
View File
@@ -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