From ef23b1d776d465cbb1959fceb46fb2e14b329940 Mon Sep 17 00:00:00 2001 From: George Drummond Date: Mon, 6 May 2019 15:18:53 -0400 Subject: [PATCH] Move to a component --- .../applications/edit_environments.html | 10 +++--- .../portfolios/applications/settings.html | 34 ++++++------------- 2 files changed, 15 insertions(+), 29 deletions(-) diff --git a/templates/fragments/applications/edit_environments.html b/templates/fragments/applications/edit_environments.html index b2c5349b..6e69a50c 100644 --- a/templates/fragments/applications/edit_environments.html +++ b/templates/fragments/applications/edit_environments.html @@ -1,9 +1,9 @@ -{% from "components/icon.html" import Icon %} -{% from "components/toggle_list.html" import ToggleButton, ToggleSection %} -{% from "components/text_input.html" import TextInput %} -{% from "components/save_button.html" import SaveButton %} -{% from "components/modal.html" import Modal %} {% from "components/delete_confirmation.html" import DeleteConfirmation %} +{% from "components/icon.html" import Icon %} +{% from "components/modal.html" import Modal %} +{% from "components/save_button.html" import SaveButton %} +{% from "components/text_input.html" import TextInput %} +{% from "components/toggle_list.html" import ToggleButton, ToggleSection %} {% macro RolePanel(users=[], role='no_access') %} {% if role == 'no_access' %} diff --git a/templates/portfolios/applications/settings.html b/templates/portfolios/applications/settings.html index 49739d2f..7de3e1b5 100644 --- a/templates/portfolios/applications/settings.html +++ b/templates/portfolios/applications/settings.html @@ -1,9 +1,10 @@ {% extends "portfolios/applications/base.html" %} {% from "components/alert.html" import Alert %} -{% from "components/text_input.html" import TextInput %} +{% from "components/delete_confirmation.html" import DeleteConfirmation %} {% from "components/icon.html" import Icon %} {% from "components/modal.html" import Modal %} +{% from "components/text_input.html" import TextInput %} {% set secondary_breadcrumb = 'portfolios.applications.existing_application_title' | translate({ "application_name": application.name }) %} @@ -94,29 +95,14 @@ ) }} - -
-
- - -
-
-
- {{ form.csrf_token }} - -
- -
-
-
+ {{ + DeleteConfirmation( + modal_id=delete_modal_environment_id, + delete_text=('portfolios.applications.delete.button' | translate), + delete_action= url_for('applications.delete', application_id=application.id), + form=form + ) + }} {% endcall %} {% endif %}