-
Notifications
You must be signed in to change notification settings - Fork 2k
/
users_form.html
62 lines (56 loc) · 1.91 KB
/
users_form.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
{% import 'macros/form.html' as form %}
<form class="form-horizontal organization-form-users" method="post" data-module="organization-users">
<input type="hidden" name="type" value="organization">
{{ form.errors(error_summary) }}
<table class="table table-bordered table-striped">
<colgroup>
<col width="58%">
<col width="30%">
<col width="12%">
</colgroup>
<thead>
<tr>
<th>{{ _('User') }}</th>
<th>{{ _('Role') }}</th>
<th><span class="pull-right">{{ _('Actions') }}</span></th>
</tr>
</thead>
<tbody>
{% for user in data.users %}
<tr>
<td class="username">{{ user.name }}</td>
<td>
<div class="control-group">
<label class="radio inline">
<input type="radio" name="users__{{ loop.index0 + 1 }}__capacity" value="admin" {{"checked" if (user or {}).get('capacity','') == 'admin' else ''}}>
{{ _('Admin') }}
</label>
<label class="radio inline">
<input type="radio" name="users__{{ loop.index0 + 1 }}__capacity" value="editor" {{"checked" if (user or {}).get('capacity','') in ['editor', 'member', ''] else ''}}>
{{ _('Editor') }}
</label>
</div>
</td>
<td>
<div class="control-group">
<label class="orginization-remove">
<input id="users__{{ loop.index0 + 1 }}__name" name="users__{{ loop.index0 + 1 }}__name" type="checkbox" value="{{ user.name }}" checked="checked">
<span>{{ _('Keep this user?') }}</span>
</label>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<legend>{{ _('Add user') }}</legend>
<div class="control-group organization-adduser">
<label for="users__0__name" class="control-label">{{ _('Username') }}</label>
<div class="controls">
<input id="users__0__name" name="users__0__name" type="text">
</div>
</div>
<div class="form-actions">
<button name="save" type="submit" class="btn btn-primary">{{ _('Save') }}</button>
</div>
</form>