From 4a12d6282865d10c8b39393f1c4954f31c49dc13 Mon Sep 17 00:00:00 2001 From: Matt Scott Date: Mon, 20 Feb 2023 09:22:41 -0500 Subject: [PATCH] Completed first-found updates for the user create / edit view. --- powerdnsadmin/templates/admin_edit_user.html | 353 ++++++++++--------- 1 file changed, 184 insertions(+), 169 deletions(-) diff --git a/powerdnsadmin/templates/admin_edit_user.html b/powerdnsadmin/templates/admin_edit_user.html index 9e954fe..20e6af6 100644 --- a/powerdnsadmin/templates/admin_edit_user.html +++ b/powerdnsadmin/templates/admin_edit_user.html @@ -1,190 +1,205 @@ {% extends "base.html" %} - {% set active_page = "admin_users" %} - -{% block title %} - - {% if create %}Add user{% else %}Edit user "{{ user.username }}"{% endif %} - {{ SITE_NAME }} - -{% endblock %} +{% if create %} + {% set action_label = 'Create' %} + {% set form_action = url_for('admin.edit_user') %} +{% else %} + {% set action_label = 'Edit' %} + {% set form_action = url_for('admin.edit_user', user_username=user.username) %} +{% endif %} +{% block title %}{{ action_label }} User - {{ SITE_NAME }}{% endblock %} {% block dashboard_stat %} -
-
-
-
-

- Users - {% if create %}New user{% else %}Edit user {{ user.username }}{% endif %} -

+
+
+
+
+

{{ action_label }} User

+
+
+ +
+
-
- -
-
-
{% endblock %} {% block content %} -
-
-
-
-
-
-

{% if create %}Add{% else %}Edit{% endif %} user

-
-
- - -
- {% if error %} -
- -

Error!

- {{ error }} +
+
+
+
+ + + +
+
+

User Editor

+
+ +
+ {% if error %} +
+ +

Error!

+ {{ error }} +
+ {{ error }} + {% endif %} +
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + + {% if blank_password %} + The password cannot be blank. + {% endif %} +
+
+ + + +
+ + {% if not create %} + {% if user.otp_secret %} +
+
+

Two Factor Authentication

+
+
+

If two-factor authentication is configured for this user and is causing problems + due to a lost device or + technical issue, it can be disabled here. +

+

The user will need to reconfigure two-factor authentication, to re-enable it.

+

Beware: This could compromise security!

+
+ +
+ {% endif %} + {% endif %}
- {{ error }} - {% endif %} -
- - - -
-
- - - -
-
- - - -
- -
- - - -
-
- - - - {% if blank_password %} - The password cannot be blank. - {% endif %} -
+ + +
+
+
+

User Editor Help

+
+ +
+

Fill in all the fields to the in the form to the left.

+ {% if create %} +

Newly created users do not have access to any domains. You will need + to grant + access to the user once it is created via the domain management buttons on the + dashboard. +

+ {% else %} +

Username cannot be changed.

+

Password can be left empty to keep the current password.

+ {% endif %} +
+ +
+ +
+
- - +
- {% if not create %} - {% if user.otp_secret %} -
-
-

Two Factor Authentication

-
-
-

If two factor authentication is configured for this user and is causing problems due to a lost device or - technical issue, it can be disabled here. -

-

The user will need to reconfigure two factor authentication, to re-enable it.

-

Beware: This could compromise security!

-
- -
- {% endif %} - {% endif %} -
-
-
-
-

- Help with {% if create %}creating a new{% else%}editing a{% endif %} user -

-
-
-

Fill in all the fields to the in the form to the left.

- {% if create %} -

Newly created users do not have access to any domains. You will need to grant - access to the user once it is created via the domain management buttons on the dashboard. -

- {% else %} -

Username cannot be changed.

-

Password can be left empty to keep the current password.

- {% endif %} -
-
-
-
-
-
+ + {% endblock %} {% block extrascripts %} - + {% endblock %} + {% block modals %} -