From be3cf7d646fb7d0ba3cddf36a7c2e3f010c5c796 Mon Sep 17 00:00:00 2001 From: daijing Date: Wed, 1 Mar 2017 16:01:51 +0800 Subject: [PATCH] Remove parent div when pressing next step button When the modal has a warning prompt, click the next button continuously, the modal page style will be error. This patch remove parent div. Change-Id: I260c622115cfb8d16f82d89c5e3a7879b62a5c3c Closes-Bug: #1668870 (cherry picked from commit ae2db3cb114722b0ecf66e09e6d0426c09ee2079) --- horizon/static/horizon/js/horizon.modals.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/horizon/static/horizon/js/horizon.modals.js b/horizon/static/horizon/js/horizon.modals.js index b2c4f5d30b..6ad7674030 100644 --- a/horizon/static/horizon/js/horizon.modals.js +++ b/horizon/static/horizon/js/horizon.modals.js @@ -103,7 +103,7 @@ horizon.modals.init_wizard = function () { } // Clear old errors. - $form.find('div.row div.alert-danger').remove(); + $form.find('div.row div.alert-danger').parent().remove(); $form.find('.form-group.has-error').each(function () { var $group = $(this); $group.removeClass('has-error');