diff --git a/powerdnsadmin/templates/admin_manage_user.html b/powerdnsadmin/templates/admin_manage_user.html index ba978a1..8d1ace8 100644 --- a/powerdnsadmin/templates/admin_manage_user.html +++ b/powerdnsadmin/templates/admin_manage_user.html @@ -1,237 +1,243 @@ {% extends "base.html" %} - {% set active_page = "admin_users" %} - -{% block title %} - - User Management - {{ SITE_NAME }} - -{% endblock %} +{% block title %}Users - {{ SITE_NAME }}{% endblock %} {% block dashboard_stat %} -
-
-
-
-

- User - Manage user privileges -

+
+
+
+
+

Users

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

User Management

- - - -
-
- - - - - - - - - - - - - - {% for user in users %} - - - - - - - - - - {% endfor %} - -
UsernameFirst NameLast NameEmailRolePrivilegesAction
{{ user.username }}{{ user.firstname }}{{ user.lastname }}{{ user.email }} - - - - - -
+ +
+ + + + + + + + + + + + + + {% for user in users %} + + + + + + + + + + {% endfor %} + +
UsernameFirst NameLast NameEmailRolePrivilegesAction
{{ user.username }}{{ user.firstname }}{{ user.lastname }}{{ user.email }} + + + + + +
+
+ +
+ +
+
-
+
-
-
- + + {% endblock %} {% block extrascripts %} - + // handle user role changing + $(document.body).on('change', '.user_role', function () { + var role_name = this.value; + var username = $(this).prop('id'); + var postdata = { + 'action': 'update_user_role', + 'data': { + 'username': username, + 'role_name': role_name + }, + '_csrf_token': '{{ csrf_token() }}' + }; + applyChanges(postdata, $SCRIPT_ROOT + '/admin/manage-user', showResult = true); + }); + {% endblock %} {% block modals %} -