-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathusers.html
77 lines (65 loc) · 2.54 KB
/
users.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<html>
<head>
<title>{{language}} user database</title>
<link rel="stylesheet" href="/css/blueprint/screen.css" type="text/css" media="screen">
<link rel="stylesheet" href="/css/blueprint/print.css" type="text/css" media="print">
<!--[if lt IE 8]>
<link rel="stylesheet" href="/css/blueprint/ie.css" type="text/css" media="screen, projection">
<![endif]-->
<link rel="stylesheet" type="text/css" href="/css/fonts.css"> </head>
<body>
<h2>{{language}} User Database</h2>
{% if user_nickname %}
<h4>Welcome {{user_nickname}}
{% if user_logout %}
<a href={{user_logout}}>logout</a>
{% endif %}
{% else %}
<a href='{{user_login_url}}'>Log in</a>
{% endif %}
<h3>Users: {{userList|length}} registered users</h3>
{% for user in userList %}
<ul>
<li>
{{user.userName}}, {{user.userEMail}}, {{user.privileges}}, {{user.lastUpdate}}
</li>
</ul>
{% endfor %}
<hr>
<form action="/users/add/" method="GET" enctype="multipart/form-data">
<h3>Add New User:</h3>
<p>
{{userName}} Name: <input type="text" size=30 name="userName">
{{userEMail}} Email: <input type="text" size=30 name="userEmail">
<br />Privileges:
{% for role in roleList %}
<input type="checkbox" id="{{role}}" name="privileges" value="{{role}}">
<label for="{{role}}">{{role}}</label>
{% endfor %}
<p>
<input type="submit" name="submit" value="Add new user">
</form>
<hr>
<form action="/users/remove/" method="GET" enctype="multipart/form-data">
<h3>Remove User:</h3>
{% for user in userList %}
<p>
<input type="checkbox" name="userDelete"
value="{{user.userEMail}}">
{{user.userName}} ({{user.userEMail}})
</p>
{% endfor %}
<p><input type="submit" name="submit" value="Delete users?">
Confirm delete: <input type="checkbox" id="confirmDelete" name="confirmDelete"
value="confirmDelete">
<p><input type="submit" name="submit" value="Edit users?">
Confirm edit: <input type="checkbox" id="confirmEdit" name="confirmEdit"
value="confirmEdit"> </form>
<hr>
<form action="/users/clear/" enctype="multipart/form-data">
<p><input type="submit" name="submit" value="Delete all users?">
Confirm clearing database: <input type="checkbox" id="confirmDelete" name="confirmDelete"
value="confirmDelete">
</form>
</body>
</html>