From 72c10e15298aef311eed2aeb4774bf78029ea075 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Wed, 27 Apr 2022 17:21:09 +0200 Subject: Add 'Delete user' to Users section Creates "Delete user" form. The user to be deleted is selected from the sidebar in Users section. --- ogcp/templates/auth/delete_user.html | 17 +++++++++++++++++ ogcp/templates/users.html | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 ogcp/templates/auth/delete_user.html (limited to 'ogcp/templates') diff --git a/ogcp/templates/auth/delete_user.html b/ogcp/templates/auth/delete_user.html new file mode 100644 index 0000000..42301ae --- /dev/null +++ b/ogcp/templates/auth/delete_user.html @@ -0,0 +1,17 @@ +{% extends 'users.html' %} +{% import "bootstrap/wtf.html" as wtf %} + +{% set sidebar_state = 'disabled' %} +{% set btn_back = true %} + +{% block nav_user_edit %}active{% endblock %} +{% block content %} + +

{{_('Delete user {}').format(form.username.data)}}

+ +{{ wtf.quick_form(form, + action=url_for('user_delete_post'), + method='post', + button_map={'submit_btn':'primary'}) }} + +{% endblock %} diff --git a/ogcp/templates/users.html b/ogcp/templates/users.html index 6dd056b..bd8e450 100644 --- a/ogcp/templates/users.html +++ b/ogcp/templates/users.html @@ -28,6 +28,8 @@ form="usersForm" formaction="{{ url_for('user_add_get') }}" formmethod="get"> + {% if btn_back %}