#303 Clear current form on successful submission
This commit is contained in:
parent
3274ff7a93
commit
f8b39d7d8c
@ -94,6 +94,7 @@ define(['jquery',
|
||||
var prepareDataFunctionName = $(curForm).attr('prepareData');
|
||||
var submitData = (typeof webgoat.customjs[prepareDataFunctionName] === 'function') ? webgoat.customjs[prepareDataFunctionName]() : $(curForm).serialize();
|
||||
// var submitData = this.$form.serialize();
|
||||
this.curForm = curForm;
|
||||
this.$curFeedback = $(curForm).closest('.attack-container').find('.attack-feedback');
|
||||
this.$curOutput = $(curForm).closest('.attack-container').find('.attack-output');
|
||||
var formUrl = $(curForm).attr('action');
|
||||
@ -114,6 +115,7 @@ define(['jquery',
|
||||
|
||||
this.renderOutput(data.output || "");
|
||||
if (data.lessonCompleted) {
|
||||
this.curForm.reset();
|
||||
this.trigger('lesson:complete');
|
||||
}
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user