MDL-71644 Quiz: The issues outstanding from MDL-70947.

Issue 1: While essay question's uploading progress, we need to disable submit
buttons to prevent submit form event.

Issue 2: Enable buttons after pressing cancel button on the popup
confirming overwrite file existed.
This commit is contained in:
Thong Bui 2021-05-18 18:15:25 +07:00
parent 0b69b37f04
commit f81cdd42b2
5 changed files with 38 additions and 10 deletions

View file

@ -175,6 +175,12 @@ M.mod_quiz.nav.init = function(Y) {
// Automatically submit the form. We do it this strange way because just
// calling form.submit() does not run the form's submit event handlers.
var submit = form.one('input[name="next"]');
// Navigation when button enable.
if (submit.get('disabled')) {
return;
}
submit.set('name', '');
submit.getDOMNode().click();
};