From 1e68ecb047076bbcaf461e8646120c565d7c979b Mon Sep 17 00:00:00 2001 From: PCoder Date: Mon, 24 Jun 2019 04:31:29 +0200 Subject: [PATCH] Confirm order button close: Redirect only to url specified --- hosting/static/hosting/js/virtual_machine_detail.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hosting/static/hosting/js/virtual_machine_detail.js b/hosting/static/hosting/js/virtual_machine_detail.js index 5fb9f6e5..e90e73f6 100644 --- a/hosting/static/hosting/js/virtual_machine_detail.js +++ b/hosting/static/hosting/js/virtual_machine_detail.js @@ -161,8 +161,11 @@ $(document).ready(function() { modal_btn = $('#createvm-modal-done-btn'); $('#createvm-modal-title').text(data.msg_title); $('#createvm-modal-body').html(data.msg_body); - modal_btn.attr('href', data.redirect) - .removeClass('hide'); + if (data.redirect) { + modal_btn.attr('href', data.redirect).removeClass('hide'); + } else { + modal_btn.attr('href', ""); + } if (data.status === true) { fa_icon.attr('class', 'checkmark'); } else {