blob: 6cc454d8340844e07587c0f241eb9d29d5420ebd (
plain)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
{% if new %}
{% set action = '?/users/new' %}
{% else %}
{% set action = '?/users/' ~ user.id %}
{% endif %}
<form action="{{ action }}" method="post">
<input type="hidden" name="token" value="{{ token }}">
<table>
<tr>
<th>{% trans 'Username' %}</th>
<td>
{% if new or mod|hasPermission(config.mod.editusers) %}
<input size="20" maxlength="30" type="text" name="username" value="{{ user.username|e }}" autocomplete="off">
{% else %}
{{ user.username|e }}
{% endif %}
</td>
</tr>
<tr>
<th>{% trans 'Password' %}{% if not new %} <small style="font-weight:normal">({% trans 'new; optional' %})</small>{% endif %}</th>
<td>
{% if new or (mod|hasPermission(config.mod.editusers) or (mod|hasPermission(config.mod.change_password) and user.id == mod.id)) %}
<input size="20" maxlength="30" type="password" name="password" value="" autocomplete="off">
{% else %}
-
{% endif %}
</td>
</tr>
{% if new %}
<tr>
<th>{% trans 'Group' %}</th>
<td>
<ul style="padding:5px 8px;list-style:none">
{% for group_value, group_name in config.mod.groups if group_name != 'Disabled' %}
<li>
<input type="radio" name="type" id="group_{{ group_name }}" value="{{ group_value }}">
<label for="group_{{ group_name }}">{% trans group_name %}</label>
</li>
{% endfor %}
</ul>
</td>
</tr>
{% endif %}
<tr>
<th>{% trans 'Boards' %}</th>
<td>
<ul style="padding:0 5px;list-style:none">
<li>
<input type="checkbox" id="allboards" name="allboards"
{% if '*' in user.boards %} checked{% endif %}
{% if not mod|hasPermission(config.mod.editusers) %}
disabled
{% endif %}
>
<label for="allboards">"*" - {% trans 'All boards' %}</label>
</li>
{% for board in boards %}
<li>
<input type="checkbox" id="board_{{ board.uri }}" name="board_{{ board.uri }}"
{% if board.uri in user.boards %} checked{% endif %}
{% if not mod|hasPermission(config.mod.editusers) %}
disabled
{% endif %}
>
<label for="board_{{ board.uri }}">
{{ config.board_abbreviation|sprintf(board.uri) }}
-
{{ board.title|e }}
</label>
</li>
{% endfor %}
</ul>
</td>
</tr>
</table>
<ul style="padding:0;text-align:center;list-style:none">
{% if new %}
<li><input type="submit" value="{% trans 'Create user' %}"></li>
{% else %}
<li><input type="submit" value="{% trans 'Save changes' %}"></li>
{% if mod|hasPermission(config.mod.deleteusers) %}
<li><input name="delete" onclick="return confirm('Are you sure you want to permanently delete this user?');" type="submit" value="{% trans 'Delete user' %}"></li>
{% endif %}
{% endif %}
</ul>
</form>
{% if logs and logslength > 0 %}
<table class="modlog" style="width:600px">
<tr>
<th>{% trans 'IP address' %}</th>
<th>{% trans 'Time' %}</th>
<th>{% trans 'Board' %}</th>
<th>{% trans 'Action' %}</th>
</tr>
{% for log in logs %}
<tr>
<td class="minimal">
<a href="?/IP/{{ log.ip }}">{{ log.ip }}</a>
</td>
<td class="minimal">
<span title="{{ log.time|date(config.post_date) }}">{{ log.time|ago }}</span>
</td>
<td class="minimal">
{% if log.board %}
<a href="?/{{ config.board_path|sprintf(log.board) }}{{ config.file_index }}">{{ config.board_abbreviation|sprintf(log.board) }}</a>
{% else %}
-
{% endif %}
</td>
<td>
{{ log.text }}
</td>
</tr>
{% endfor %}
</table>
<p style="text-align:center" class="unimportant">
<a href="?/log:{{ user.username|e }}">{% trans 'View more logs for this user.' %}</a>
</p>
{% endif %}
|