From 31b1e920772ce6dd56f3f56b5a882c2f71333c13 Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Thu, 27 Jan 2022 16:51:35 +0100 Subject: Add confirmation page when deleting image User can confirm when deleting an image by double checking the information displayed on this page. Adds a new optional field in GenericForm: 'ids'. Used when dealing with ids instead of ips. --- ogcp/templates/actions/delete_image.html | 20 ++++++++++++++++++++ ogcp/templates/images.html | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 ogcp/templates/actions/delete_image.html (limited to 'ogcp/templates') diff --git a/ogcp/templates/actions/delete_image.html b/ogcp/templates/actions/delete_image.html new file mode 100644 index 0000000..608375f --- /dev/null +++ b/ogcp/templates/actions/delete_image.html @@ -0,0 +1,20 @@ +{% extends 'images.html' %} +{% import "bootstrap/wtf.html" as wtf %} + +{% block content %} + +{{ args }} + +

+ {{ _('Delete image %(image_name)s', image_name=image_name) }} +

+ +{{ wtf.quick_form(form, + action=url_for('action_image_delete'), + method='post', + button_map={'submit': 'primary'}, + extra_classes="mx-5") }} + +{% endblock %} + + diff --git a/ogcp/templates/images.html b/ogcp/templates/images.html index e198e6c..2a67e58 100644 --- a/ogcp/templates/images.html +++ b/ogcp/templates/images.html @@ -28,6 +28,6 @@ + form="imagesForm" formaction="{{ url_for('action_image_delete') }}" formmethod="get"> {% endblock %} -- cgit v1.2.3-18-g5258