summaryrefslogtreecommitdiffstats
path: root/ogcp/templates
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/templates')
-rw-r--r--ogcp/templates/auth/edit_user.html26
-rw-r--r--ogcp/templates/users.html2
2 files changed, 28 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 %}
diff --git a/ogcp/templates/users.html b/ogcp/templates/users.html
index c14aae6..6dd056b 100644
--- a/ogcp/templates/users.html
+++ b/ogcp/templates/users.html
@@ -26,6 +26,8 @@
{% block commands %}
<input class="btn btn-light {% block nav_user_add %}{% endblock %}" type="submit" value="{{ _('Add user') }}"
form="usersForm" formaction="{{ url_for('user_add_get') }}" formmethod="get">
+ <input class="btn btn-light {% block nav_user_edit %}{% endblock %}" type="submit" value="{{ _('Edit user') }}"
+ form="usersForm" formaction="{{ url_for('user_edit_get') }}" formmethod="get">
{% if btn_back %}
<button class="btn btn-danger ml-3" type="button" id="backButton" onclick="history.back()">
{{ _("Back") }}