diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-10-14 19:01:09 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-10-14 19:01:09 +0000 |
commit | c7544532c6049c932cb18f59f66b2cff44749e2f (patch) | |
tree | 9f3593cae106e9c4212c1bdf967e1675cd51f517 | |
parent | ce45b0b7fe4d9b2a28fbe6bcd2306bb0f09477e5 (diff) | |
parent | 1be9630fd1e2a4a1b537f074b04fb09f12c475ad (diff) | |
download | tuskar-ui-c7544532c6049c932cb18f59f66b2cff44749e2f.tar.gz |
Merge "Remove the buttons from modal templates"
11 files changed, 8 insertions, 44 deletions
diff --git a/tuskar_ui/infrastructure/images/templates/images/_update.html b/tuskar_ui/infrastructure/images/templates/images/_update.html index ea62dec3..3ac3c6c8 100644 --- a/tuskar_ui/infrastructure/images/templates/images/_update.html +++ b/tuskar_ui/infrastructure/images/templates/images/_update.html @@ -19,8 +19,3 @@ <p>{% trans "Modify different properties of an image." %}</p> </div> {% endblock %} - -{% block modal-footer %} - <input class="btn btn-primary pull-right" type="submit" value="{% trans "Update Image" %}" /> - <a href="{% url 'horizon:infrastructure:images:index' %}" class="btn btn-default secondary cancel close">{% trans "Cancel" %}</a> -{% endblock %} diff --git a/tuskar_ui/infrastructure/images/views.py b/tuskar_ui/infrastructure/images/views.py index 775e873e..6dd6fa85 100644 --- a/tuskar_ui/infrastructure/images/views.py +++ b/tuskar_ui/infrastructure/images/views.py @@ -105,6 +105,7 @@ class UpdateView(views.UpdateView): template_name = 'infrastructure/images/update.html' form_class = forms.UpdateImageForm success_url = reverse_lazy('horizon:infrastructure:images:index') + submit_label = _("Update Image") @memoized.memoized_method def get_object(self): diff --git a/tuskar_ui/infrastructure/nodes/templates/nodes/_register.html b/tuskar_ui/infrastructure/nodes/templates/nodes/_register.html index 587bf815..5e17b374 100644 --- a/tuskar_ui/infrastructure/nodes/templates/nodes/_register.html +++ b/tuskar_ui/infrastructure/nodes/templates/nodes/_register.html @@ -10,11 +10,3 @@ {% block modal-body %} {% include "formset_table/menu_formset.html" with formset=form form_template="infrastructure/nodes/_nodes_formset_form.html" %} {% endblock %} - -{% block modal-footer %} - <input class="btn btn-primary pull-right" type="submit" - value="{% trans "Register Nodes" %}" /> - <a href="{% url 'horizon:infrastructure:nodes:index' %}" - class="btn secondary cancel close">{% trans "Cancel" %}</a> -{% endblock %} - diff --git a/tuskar_ui/infrastructure/nodes/templates/nodes/_upload.html b/tuskar_ui/infrastructure/nodes/templates/nodes/_upload.html index 7638cb49..23a3a778 100644 --- a/tuskar_ui/infrastructure/nodes/templates/nodes/_upload.html +++ b/tuskar_ui/infrastructure/nodes/templates/nodes/_upload.html @@ -12,13 +12,3 @@ {% block modal-body %} {% include "horizon/common/_form_fields.html" %} {% endblock %} - -{% block modal-footer %} - <button class="btn btn-primary pull-right" type="submit"> - <i class="fa fa-upload"></i> - {% trans "Upload" %} - </button> - <a href="{% url 'horizon:infrastructure:nodes:index' %}" - class="btn secondary cancel close">{% trans "Cancel" %}</a> -{% endblock %} - diff --git a/tuskar_ui/infrastructure/nodes/views.py b/tuskar_ui/infrastructure/nodes/views.py index 0db92b2e..70448401 100644 --- a/tuskar_ui/infrastructure/nodes/views.py +++ b/tuskar_ui/infrastructure/nodes/views.py @@ -47,6 +47,7 @@ class RegisterView(horizon_forms.ModalFormView): template_name = 'infrastructure/nodes/register.html' success_url = reverse_lazy( 'horizon:infrastructure:nodes:index') + submit_label = _("Register Nodes") def get_data(self): return [] @@ -77,6 +78,7 @@ class UploadView(horizon_forms.ModalFormView): template_name = 'infrastructure/nodes/upload.html' success_url = reverse_lazy( 'horizon:infrastructure:nodes:index') + submit_label = _("Upload Nodes") def post(self, request, *args, **kwargs): # This form's POST is handled in RegisterView. diff --git a/tuskar_ui/infrastructure/overview/views.py b/tuskar_ui/infrastructure/overview/views.py index c76d7aca..7d92aff6 100644 --- a/tuskar_ui/infrastructure/overview/views.py +++ b/tuskar_ui/infrastructure/overview/views.py @@ -236,6 +236,7 @@ class IndexView(horizon.forms.ModalFormView, StackMixin): class DeployConfirmationView(horizon.forms.ModalFormView, StackMixin): form_class = forms.DeployOvercloud template_name = 'infrastructure/overview/deploy_confirmation.html' + submit_label = _("Deploy") def get_context_data(self, **kwargs): context = super(DeployConfirmationView, @@ -253,6 +254,7 @@ class DeployConfirmationView(horizon.forms.ModalFormView, StackMixin): class UndeployConfirmationView(horizon.forms.ModalFormView, StackMixin): form_class = forms.UndeployOvercloud template_name = 'infrastructure/overview/undeploy_confirmation.html' + submit_label = _("Undeploy") def get_success_url(self): return reverse(INDEX_URL) @@ -272,6 +274,7 @@ class UndeployConfirmationView(horizon.forms.ModalFormView, StackMixin): class PostDeployInitView(horizon.forms.ModalFormView, StackMixin): form_class = forms.PostDeployInit template_name = 'infrastructure/overview/post_deploy_init.html' + submit_label = _("Initialize") def get_success_url(self): return reverse(INDEX_URL) diff --git a/tuskar_ui/infrastructure/parameters/templates/parameters/_service_config.html b/tuskar_ui/infrastructure/parameters/templates/parameters/_service_config.html index cae02765..a23b6a2d 100644 --- a/tuskar_ui/infrastructure/parameters/templates/parameters/_service_config.html +++ b/tuskar_ui/infrastructure/parameters/templates/parameters/_service_config.html @@ -24,9 +24,3 @@ </p> </div> {% endblock %} - -{% block modal-footer %} - <input class="btn btn-primary" type="submit" value="{% trans "Save Configuration" %}" /> - <a href="{% url 'horizon:infrastructure:parameters:index' %}" class="btn secondary cancel close">{% trans "Cancel" %}</a> -{% endblock %} -{% load form_helpers %} diff --git a/tuskar_ui/infrastructure/parameters/views.py b/tuskar_ui/infrastructure/parameters/views.py index ba0cbecd..8e23eafb 100644 --- a/tuskar_ui/infrastructure/parameters/views.py +++ b/tuskar_ui/infrastructure/parameters/views.py @@ -13,6 +13,7 @@ # under the License. from django.core.urlresolvers import reverse_lazy +from django.utils.translation import ugettext_lazy as _ import horizon.forms from horizon import tabs as horizon_tabs @@ -25,6 +26,7 @@ class ServiceConfigView(horizon.forms.ModalFormView): template_name = "infrastructure/parameters/service_config.html" form_class = forms.EditServiceConfig success_url = reverse_lazy('horizon:infrastructure:parameters:index') + submit_label = _("Save Configuration") def get_initial(self): plan = api.tuskar.Plan.get_the_plan(self.request) diff --git a/tuskar_ui/infrastructure/templates/infrastructure/overview/_deploy_confirmation.html b/tuskar_ui/infrastructure/templates/infrastructure/overview/_deploy_confirmation.html index c8b5e840..fbd83b51 100644 --- a/tuskar_ui/infrastructure/templates/infrastructure/overview/_deploy_confirmation.html +++ b/tuskar_ui/infrastructure/templates/infrastructure/overview/_deploy_confirmation.html @@ -19,8 +19,3 @@ <p>{% trans "This operation cannot be undone. Are you sure you want to do that?" %}</p> </div> {% endblock %} - -{% block modal-footer %} - <input class="btn btn-primary" type="submit" value="{% trans "Deploy" %}" /> - <a href="{% url 'horizon:infrastructure:overview:index' %}" class="btn secondary cancel close">{% trans "Cancel" %}</a> -{% endblock %} diff --git a/tuskar_ui/infrastructure/templates/infrastructure/overview/_post_deploy_init.html b/tuskar_ui/infrastructure/templates/infrastructure/overview/_post_deploy_init.html index 9e5dfee2..d0f9c52a 100644 --- a/tuskar_ui/infrastructure/templates/infrastructure/overview/_post_deploy_init.html +++ b/tuskar_ui/infrastructure/templates/infrastructure/overview/_post_deploy_init.html @@ -20,8 +20,3 @@ </fieldset> </div> {% endblock %} - -{% block modal-footer %} - <input class="btn btn-primary" type="submit" value="{% trans "Initialize" %}" /> - <a href="{% url 'horizon:infrastructure:overview:index' %}" class="btn secondary cancel close">{% trans "Cancel" %}</a> -{% endblock %} diff --git a/tuskar_ui/infrastructure/templates/infrastructure/overview/_undeploy_confirmation.html b/tuskar_ui/infrastructure/templates/infrastructure/overview/_undeploy_confirmation.html index 9fc0c5e2..50b2c943 100644 --- a/tuskar_ui/infrastructure/templates/infrastructure/overview/_undeploy_confirmation.html +++ b/tuskar_ui/infrastructure/templates/infrastructure/overview/_undeploy_confirmation.html @@ -18,8 +18,3 @@ </fieldset> </div> {% endblock %} - -{% block modal-footer %} - <input class="btn btn-primary" type="submit" value="{% trans "Undeploy" %}" /> - <a href="{% url 'horizon:infrastructure:overview:index' %}" class="btn secondary cancel close">{% trans "Cancel" %}</a> -{% endblock %} |