diff --git a/hosting/templates/hosting/order_detail.html b/hosting/templates/hosting/order_detail.html index 9231bca8..8a5f39f6 100644 --- a/hosting/templates/hosting/order_detail.html +++ b/hosting/templates/hosting/order_detail.html @@ -20,7 +20,7 @@
-

{% trans "Confirm Order"%}

{% trans "Order #"%} {{order.id}}

+

{{page_header_text}}

{% trans "Order #"%} {{order.id}}


diff --git a/hosting/views.py b/hosting/views.py index 520894ae..3c85d6fc 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -600,7 +600,7 @@ class PaymentVMView(LoginRequiredMixin, FormView): email = BaseEmail(**email_data) email.send() - return HttpResponseRedirect(reverse('hosting:orders', kwargs={'pk': order.id})) + return HttpResponseRedirect("{url}?{query_params}".format(url=reverse('hosting:orders', kwargs={'pk': order.id}), query_params='page=payment')) else: return self.form_invalid(form) @@ -619,6 +619,10 @@ class OrdersHostingDetailView(PermissionRequiredMixin, LoginRequiredMixin, Detai owner = self.request.user manager = OpenNebulaManager(email=owner.email, password=owner.password) + if self.request.GET.get('page', '') == 'payment': + context['page_header_text'] = _('Confirm Order') + else: + context['page_header_text'] = _('Invoice') try: vm = manager.get_vm(obj.vm_id) context['vm'] = VirtualMachineSerializer(vm).data