From 500a679b298b4a9b498268b49d83fc79b2670a9a Mon Sep 17 00:00:00 2001 From: "Gary W. Smith" Date: Tue, 24 Mar 2015 14:18:21 -0700 Subject: [PATCH] Modify form for Volume Transfer Details Change the Volume Transfer Details form to avoid displaying the Submit button, which is not relevant to this read-only form. Change-Id: I3e1929f27ae6fe03087ad54c628aaec9cede617e Closes-Bug: 1435924 --- .../volumes/templates/volumes/volumes/_show_transfer.html | 6 ++++++ .../dashboards/project/volumes/volumes/views.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_show_transfer.html b/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_show_transfer.html index c776c560ec..3487023571 100644 --- a/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_show_transfer.html +++ b/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_show_transfer.html @@ -6,3 +6,9 @@

{% trans "The Transfer ID and the Authorization Key are needed by the recipient in order to accept the transfer. Please capture both the Transfer ID and the Authorization Key and provide them to your transfer recipient." %}

{% trans "The Authorization Key will not be available after closing this page, so you must capture it now, or else you will be unable to use the transfer." %}

{% endblock %} +{% block modal-footer %} + + {{ cancel_label }} + +{% endblock %} diff --git a/openstack_dashboard/dashboards/project/volumes/volumes/views.py b/openstack_dashboard/dashboards/project/volumes/volumes/views.py index d87078c6c4..991ff7477f 100644 --- a/openstack_dashboard/dashboards/project/volumes/volumes/views.py +++ b/openstack_dashboard/dashboards/project/volumes/volumes/views.py @@ -242,6 +242,7 @@ class ShowTransferView(forms.ModalFormView): modal_id = "show_volume_transfer_modal" modal_header = _("Volume Transfer") submit_url = "horizon:project:volumes:volumes:show_transfer" + cancel_label = _("Close") def get_object(self): try: @@ -275,7 +276,6 @@ class UpdateView(forms.ModalFormView): modal_header = _("Edit Volume") modal_id = "update_volume_modal" template_name = 'project/volumes/volumes/update.html' - submit_label = _("Save") submit_url = "horizon:project:volumes:volumes:update" success_url = reverse_lazy("horizon:project:volumes:index")