diff --git a/matrixhosting/static/matrixhosting/js/order.js b/matrixhosting/static/matrixhosting/js/order.js index f910ba4..abf1973 100644 --- a/matrixhosting/static/matrixhosting/js/order.js +++ b/matrixhosting/static/matrixhosting/js/order.js @@ -26,9 +26,10 @@ $( document ).ready(function() { } else { // The payment has succeeded // Display a success message - modal_btn.attr('href', data.redirect).removeClass('sr-only sr-only-focusable'); - $('#createvm-modal-title').text("Order Succeeded"); - $('#createvm-modal-body').html("Order has been added and the instance will be ready soon"); + window.location.href = '/order/success/'; + // modal_btn.attr('href', data.redirect).removeClass('sr-only sr-only-focusable'); + // $('#createvm-modal-title').text("Order Succeeded"); + // $('#createvm-modal-body').html("Order has been added and the instance will be ready soon"); } } }); diff --git a/matrixhosting/static/matrixhosting/js/payment.js b/matrixhosting/static/matrixhosting/js/payment.js index dd4f70d..14d806e 100644 --- a/matrixhosting/static/matrixhosting/js/payment.js +++ b/matrixhosting/static/matrixhosting/js/payment.js @@ -10,7 +10,7 @@ function setBrandIcon(brand) { $(document).ready(function () { var hasCreditcard = window.hasCreditcard || false; - if (!hasCreditcard && window.stripeKey) { + if (hasCreditcard && window.stripeKey) { var stripe = Stripe(window.stripeKey); if (window.pm_id == undefined) { var element_style = { diff --git a/matrixhosting/templates/matrixhosting/includes/_navbar.html b/matrixhosting/templates/matrixhosting/includes/_navbar.html index 9c11b8b..4aa8c71 100644 --- a/matrixhosting/templates/matrixhosting/includes/_navbar.html +++ b/matrixhosting/templates/matrixhosting/includes/_navbar.html @@ -16,16 +16,18 @@ + {% url 'matrix:index' as index_url %} + {% url 'matrix:payments' as payments_url %}