Merge "Check if the alert box has a sibling element, delete its parent if it doesn't exist"
This commit is contained in:
commit
3ffd1feca9
@ -109,7 +109,11 @@ horizon.modals.init_wizard = function () {
|
||||
}
|
||||
|
||||
// Clear old errors.
|
||||
if ($form.find('div.row div.alert-danger').siblings().length == 0) {
|
||||
$form.find('div.row div.alert-danger').parent().remove();
|
||||
} else {
|
||||
$form.find('div.row div.alert-danger').remove();
|
||||
}
|
||||
$form.find('.form-group.has-error').each(function () {
|
||||
var $group = $(this);
|
||||
$group.removeClass('has-error');
|
||||
|
Loading…
Reference in New Issue
Block a user