ref: 795764886b3c887a6e4988efe77eea8f7665d71a fanboi2/fanboi2/templates/admin/bans/edit.mako -rw-r--r-- 2.1 KiB View raw
                                                                                
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
<%inherit file='../_layout.mako' />
<%def name='title()'>Bans - Admin Panel</%def>
<%def name='subheader_title()'>Bans</%def>
<%def name='subheader_body()'>Manage IP bans.</%def>
<h2 class="sheet-title">${ban.ip_address}</h2>
<%include file='_nav.mako' />
<form class="form noshade" action="${request.route_path('admin_ban_edit', ban=ban.id)}" method="post">
    <input type="hidden" name="csrf_token" value="${get_csrf_token()}">
    <div class="form-item${' error' if form.ip_address.errors else ''}">
        <label class="form-item-label" for="${form.ip_address.id}">IP address</label>
        ${form.ip_address(class_="input block font-large")}
        % if form.ip_address.errors:
            <span class="form-item-error">${form.ip_address.errors[0]}</span>
        % endif
    </div>
    <div class="form-item${' error' if form.description.errors else ''}">
        <label class="form-item-label" for="${form.description.id}">Description</label>
        ${form.description(class_="input block font-large")}
        % if form.description.errors:
            <span class="form-item-error">${form.description.errors[0]}</span>
        % endif
    </div>
    <div class="form-item${' error' if form.duration.errors else ''}">
        <label class="form-item-label" for="${form.duration.id}">Duration</label>
        ${form.duration(class_="input block font-large")}
        % if form.duration.errors:
            <span class="form-item-error">${form.duration.errors[0]}</span>
        % endif
    </div>
    <div class="form-item${' error' if form.scope.errors else ''}">
        <label class="form-item-label" for="${form.scope.id}">Scope</label>
        ${form.scope(class_="input block font-large")}
        % if form.scope.errors:
            <span class="form-item-error">${form.scope.errors[0]}</span>
        % endif
    </div>
    <div class="form-item">
        <button class="button brand" type="submit">Update Ban</button>
        <span class="form-item-inline">
            ${form.active()} <label for="${form.active.id}">${form.active.label.text}</label>
        </span>
    </div>
</form>