diff --git a/datacenterlight/views.py b/datacenterlight/views.py index c45aea61..57a400e1 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -529,9 +529,9 @@ class OrderConfirmationView(DetailView): section='payment_error'), 'msg_title': str(_('Error.')), 'msg_body': str( - _('There was a payment related error.
' - 'Details: {error_detail}
' - 'On close of this popup, you will be redirected back to' + _('There was a payment related error.' + ' Details: {error_detail}.' + ' On close of this popup, you will be redirected back to' ' the payment page.'.format(error_detail=msg))) } return HttpResponse(json.dumps(response), diff --git a/hosting/static/hosting/js/virtual_machine_detail.js b/hosting/static/hosting/js/virtual_machine_detail.js index 8838bb8c..7f9eff95 100644 --- a/hosting/static/hosting/js/virtual_machine_detail.js +++ b/hosting/static/hosting/js/virtual_machine_detail.js @@ -88,15 +88,16 @@ $(document).ready(function() { data: create_vm_form.serialize(), success: function (data) { fa_icon = $('.modal-icon > .fa'); + modal_btn = $('#createvm-modal-done-btn'); $('#createvm-modal-title').text(data.msg_title); $('#createvm-modal-body').html(data.msg_body); - $('#createvm-modal-done-btn') - .attr('href', data.redirect) + modal_btn.attr('href', data.redirect) .removeClass('hide'); if (data.status === true) { fa_icon.attr('class', 'checkmark'); } else { fa_icon.attr('class', 'fa fa-close'); + modal_btn.attr('class', '').addClass('btn btn-danger btn-ok btn-wide'); } }, error: function (xmlhttprequest, textstatus, message) {