Make correct icons load on dcl createvm error modal
This commit is contained in:
parent
9cab43f051
commit
f60a2c3482
2 changed files with 6 additions and 5 deletions
|
@ -529,9 +529,9 @@ class OrderConfirmationView(DetailView):
|
||||||
section='payment_error'),
|
section='payment_error'),
|
||||||
'msg_title': str(_('Error.')),
|
'msg_title': str(_('Error.')),
|
||||||
'msg_body': str(
|
'msg_body': str(
|
||||||
_('There was a payment related error.<br/>'
|
_('There was a payment related error.'
|
||||||
'Details: {error_detail}<br/>'
|
' Details: {error_detail}.'
|
||||||
'On close of this popup, you will be redirected back to'
|
' On close of this popup, you will be redirected back to'
|
||||||
' the payment page.'.format(error_detail=msg)))
|
' the payment page.'.format(error_detail=msg)))
|
||||||
}
|
}
|
||||||
return HttpResponse(json.dumps(response),
|
return HttpResponse(json.dumps(response),
|
||||||
|
|
|
@ -88,15 +88,16 @@ $(document).ready(function() {
|
||||||
data: create_vm_form.serialize(),
|
data: create_vm_form.serialize(),
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
fa_icon = $('.modal-icon > .fa');
|
fa_icon = $('.modal-icon > .fa');
|
||||||
|
modal_btn = $('#createvm-modal-done-btn');
|
||||||
$('#createvm-modal-title').text(data.msg_title);
|
$('#createvm-modal-title').text(data.msg_title);
|
||||||
$('#createvm-modal-body').html(data.msg_body);
|
$('#createvm-modal-body').html(data.msg_body);
|
||||||
$('#createvm-modal-done-btn')
|
modal_btn.attr('href', data.redirect)
|
||||||
.attr('href', data.redirect)
|
|
||||||
.removeClass('hide');
|
.removeClass('hide');
|
||||||
if (data.status === true) {
|
if (data.status === true) {
|
||||||
fa_icon.attr('class', 'checkmark');
|
fa_icon.attr('class', 'checkmark');
|
||||||
} else {
|
} else {
|
||||||
fa_icon.attr('class', 'fa fa-close');
|
fa_icon.attr('class', 'fa fa-close');
|
||||||
|
modal_btn.attr('class', '').addClass('btn btn-danger btn-ok btn-wide');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function (xmlhttprequest, textstatus, message) {
|
error: function (xmlhttprequest, textstatus, message) {
|
||||||
|
|
Loading…
Reference in a new issue