From 73963a0273b64cb3fb8dedcd0886dcfaf92dfc20 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Fri, 14 Jan 2022 15:04:58 +0100 Subject: Ask twice to delete clients This commit adds an extra view to ensure users do not clients accidentally. It also includes Spanish translation of the new strings. --- ogcp/templates/actions/delete_client.html | 25 +++++++++++++++++++++++++ ogcp/templates/scopes.html | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 ogcp/templates/actions/delete_client.html (limited to 'ogcp/templates') diff --git a/ogcp/templates/actions/delete_client.html b/ogcp/templates/actions/delete_client.html new file mode 100644 index 0000000..0c793c1 --- /dev/null +++ b/ogcp/templates/actions/delete_client.html @@ -0,0 +1,25 @@ +{% extends 'scopes.html' %} +{% import "bootstrap/wtf.html" as wtf %} + +{% block content %} + +{% set ip_list = form.ips.data.split(' ') %} +{% set ip_count = ip_list | length %} +

+ {{ _('Delete %(ip_count)d client(s)', ip_count=ip_count) }} +

+ + + +{{ wtf.quick_form(form, + action=url_for('action_client_delete'), + method='post', + button_map={'submit': 'primary'}, + extra_classes="mx-5") }} + +{% endblock %} + diff --git a/ogcp/templates/scopes.html b/ogcp/templates/scopes.html index 8ab30c0..6c543fa 100644 --- a/ogcp/templates/scopes.html +++ b/ogcp/templates/scopes.html @@ -23,7 +23,7 @@ + form="scopesForm" formaction="{{ url_for('action_client_delete') }}" formmethod="get">