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 %} -