-
Improvement
-
Resolution: Fixed
-
Minor
-
3.7.4, 3.8.1
-
MOODLE_37_STABLE, MOODLE_38_STABLE
-
MOODLE_39_STABLE
-
I need this for https://moodle.org/plugins/filter_embedquestion.
My form has a button which does not acutally save the data. (It is a sort-of reset button.) I want it to give the standard warning if you change some ther data and then click the button.
This is not currently possible becuase any submit button always marks the form data as saved: https://github.com/moodle/moodle/blob/cb38ab1e3926720b3230ce20b66a9c46c398eb80/lib/yui/src/formchangechecker/js/formchangechecker.js#L56.
I want to introduce a mechanism like 'ignoredirty' method (which does the opposite and gets it to ignore changes in certain form fields.
I think this sort of thing is better done with data attributes than CSS classes. Therefore, I am proposing to add an attribute data-formchangechecker-ignore-submit.
At the same time, I will add data-formchangechecker-ignore-dirty as an alternative to the existing CSS class (but I won't remove the existing class because backwards compatibility).
- Testing discovered
-
MDL-67925 Form multiple submission prevention is flakey
-
- Closed
-