diff --git a/webgoat-container/src/main/resources/static/js/goatApp/controller/LessonController.js b/webgoat-container/src/main/resources/static/js/goatApp/controller/LessonController.js index 911db2f08..4fedc2bf5 100644 --- a/webgoat-container/src/main/resources/static/js/goatApp/controller/LessonController.js +++ b/webgoat-container/src/main/resources/static/js/goatApp/controller/LessonController.js @@ -182,7 +182,12 @@ define(['jquery', this.hideShowAttack = function (options) { // will likely expand this to encompass if (options.show) { - $('div.attack-container').show(); + $('div#attack-container').show(); + $('div#attack-container div.modal-header button.close, #about-modal div.modal-footer button').unbind('click').on('click', function() { + $('div#attack-container').hide(200); + }); + //this.lessonView.makeFormsAjax(); + //this.lessonView.ajaxifyAttackHref(); } }; diff --git a/webgoat-container/src/main/resources/static/js/goatApp/view/LessonContentView.js b/webgoat-container/src/main/resources/static/js/goatApp/view/LessonContentView.js index 5528ef31c..fedb09450 100644 --- a/webgoat-container/src/main/resources/static/js/goatApp/view/LessonContentView.js +++ b/webgoat-container/src/main/resources/static/js/goatApp/view/LessonContentView.js @@ -32,14 +32,14 @@ define(['jquery', //timeout: 3000 }; //hook forms //TODO: clarify form selectors later - $("form.attack").ajaxForm(options); + $("form.attack-form").ajaxForm(options); }, ajaxifyAttackHref: function() { // rewrite any links with hrefs point to relative attack URLs var self = this; // The current LessonAdapter#getLink() generates a hash-mark link. It will not match the mask below. // Besides, the new MVC code registers an event handler that will reload the lesson according to the route. - $.each($('a[href^="attack?"]'),function(i,el) { + $.each($('a[href^="attack?"]'),function(i,el) { //FIXME: need to figure out what to do here ... var url = $(el).attr('href'); $(el).unbind('click').attr('href','#').attr('link',url); //TODO pull currentMenuId