summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/auth
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2022-04-27 17:19:54 +0200
committerJavier Sánchez Parra <jsanchez@soleta.eu>2022-04-27 17:34:26 +0200
commiteb8ddd236acac593cce7c341d84a5ab3da834aff (patch)
tree95bc0dbb0d8b62fe5370c11ee46784d26c43c5f4 /ogcp/templates/auth
parent661254b76edd51c36090edd0f898bdca16f23277 (diff)
Add 'Edit user' to Users section
Creates "Edit user" form with the following inputs: password, password confirmation, role (administrator or regular), allowed scopes. It does no allow to change/edit the username.
Diffstat (limited to 'ogcp/templates/auth')
-rw-r--r--ogcp/templates/auth/edit_user.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/ogcp/templates/auth/edit_user.html b/ogcp/templates/auth/edit_user.html
new file mode 100644
index 0000000..9e1b2b9
--- /dev/null
+++ b/ogcp/templates/auth/edit_user.html
@@ -0,0 +1,26 @@
+{% 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 %}
+
+<h1 class="m-5">{{_('Edit user {}').format(form.username.data)}}</h1>
+
+{{ wtf.quick_form(form,
+ action=url_for('user_edit_post'),
+ method='post',
+ button_map={'submit_btn':'primary'},
+ id='user-form') }}
+
+<script>
+ document.addEventListener('readystatechange', () => {
+ if (document.readyState === 'complete') {
+ digestUserFormPassword()
+ }
+ });
+</script>
+
+{% endblock %}