fix: reset form and quiz color on reset lesson (#1903)
* ./mvnw spotless:apply ``` [INFO] --- spotless-maven-plugin:2.41.1:apply (default-cli) @ webgoat --- [INFO] Writing clean file: /home/ulyssa/labs/WebGoat/WebGoat-bb6e84d/src/main/java/org/owasp/webgoat/lessons/sqlinjection/introduction/SqlInjectionLesson5a.java ``` * On reset lesson: reset form and quizzes colors
This commit is contained in:
		| @ -41,8 +41,8 @@ public class SqlInjectionLesson5a extends AssignmentEndpoint { | |||||||
|           + " '1'</span> always evaluates to true (The string ending literal for '1 is closed by" |           + " '1'</span> always evaluates to true (The string ending literal for '1 is closed by" | ||||||
|           + " the query itself, so you should not inject it). So the injected query basically looks" |           + " the query itself, so you should not inject it). So the injected query basically looks" | ||||||
|           + " like this: <span style=\"font-style: italic\">SELECT * FROM user_data WHERE" |           + " like this: <span style=\"font-style: italic\">SELECT * FROM user_data WHERE" | ||||||
|           + " first_name = 'John' and last_name = '' or TRUE</span>, which will always evaluate to" |           + " (first_name = 'John' and last_name = '') or (TRUE)</span>, which will always evaluate" | ||||||
|           + " true, no matter what came before it."; |           + " to true, no matter what came before it."; | ||||||
|   private final LessonDataSource dataSource; |   private final LessonDataSource dataSource; | ||||||
|  |  | ||||||
|   public SqlInjectionLesson5a(LessonDataSource dataSource) { |   public SqlInjectionLesson5a(LessonDataSource dataSource) { | ||||||
|  | |||||||
| @ -147,7 +147,6 @@ define(['jquery', | |||||||
|             }, |             }, | ||||||
|  |  | ||||||
|             markAssignmentComplete: function () { |             markAssignmentComplete: function () { | ||||||
|                 this.curForm.reset(); |  | ||||||
|                 $(this.curForm).siblings('.assignment-success').find('i').removeClass('hidden'); |                 $(this.curForm).siblings('.assignment-success').find('i').removeClass('hidden'); | ||||||
|                 this.paginationControlView.updateCollection(); |                 this.paginationControlView.updateCollection(); | ||||||
|             }, |             }, | ||||||
| @ -222,6 +221,8 @@ define(['jquery', | |||||||
|             }, |             }, | ||||||
|  |  | ||||||
|             resetLesson: function () { |             resetLesson: function () { | ||||||
|  |                 this.$el.find(form).trigger("reset"); | ||||||
|  |                 this.$el.find(".quiz_question").removeClass('correct incorrect'); | ||||||
|                 this.$el.find('.attack-feedback').hide(); |                 this.$el.find('.attack-feedback').hide(); | ||||||
|                 this.$el.find('.attack-output').hide(); |                 this.$el.find('.attack-output').hide(); | ||||||
|                 this.markAssignmentIncomplete(); |                 this.markAssignmentIncomplete(); | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user