all repos — honk @ ba76f3d9088b84bbac3f26fdf6bb2489b06a9472

my fork of honk

views/hfcs.html (view raw)

 1{{ template "header.html" . }}
 2<main>
 3<div class="info">
 4<p>
 5Honk Filtering and Censoring System
 6<form action="/savehfcs" method="POST">
 7<input type="hidden" name="CSRF" value="{{ .FilterCSRF }}">
 8<hr>
 9<h3>new filter</h3>
10<p><label for="name">filter name:</label><br>
11<input tabindex=1 type="text" name="name" value="" autocomplete=off>
12<hr>
13<h3>match</h3>
14<p><label for="actor">who or where:</label><br>
15<input tabindex=1 type="text" name="actor" value="" autocomplete=off>
16<p><span><label class=button for="incaud">include audience:
17<input tabindex=1 type="checkbox" id="incaud" name="incaud" value="yes"><span></span></label></span>
18<p><label for="filttext">text matches:</label><br>
19<input tabindex=1 type="text" name="filttext" value="" autocomplete=off>
20<p><span><label class=button for="isannounce">is announce:
21<input tabindex=1 type="checkbox" id="isannounce" name="isannounce" value="yes"><span></span></label></span>
22<p><label for="announceof">announce of:</label><br>
23<input tabindex=1 type="text" name="announceof" value="" autocomplete=off>
24<hr>
25<h3>action</h3>
26<p class=buttonarray><span><label class=button for="doreject">reject:
27<input tabindex=1 type="checkbox" id="doreject" name="doreject" value="yes"><span></span></label></span>
28<span><label class=button for="doskipmedia">skip media:
29<input tabindex=1 type="checkbox" id="doskipmedia" name="doskipmedia" value="yes"><span></span></label></span>
30<span><label class=button for="dohide">hide:
31<input tabindex=1 type="checkbox" id="dohide" name="dohide" value="yes"><span></span></label></span>
32<span><label class=button for="docollapse">collapse:
33<input tabindex=1 type="checkbox" id="docollapse" name="docollapse" value="yes"><span></span></label></span>
34<p><label for="rewrite">rewrite:</label><br>
35<input tabindex=1 type="text" name="filtrewrite" value="" autocomplete=off>
36<p><label for="replace">replace:</label><br>
37<input tabindex=1 type="text" name="filtreplace" value="" autocomplete=off>
38<hr>
39<p><button>impose your will</button>
40</form>
41</div>
42{{ $csrf := .FilterCSRF }}
43{{ range .Filters }}
44<section class="honk">
45<p>Name: {{ .Name }}
46<p>Date: {{ .Date.Format "2006-01-02" }}
47{{ with .Actor }}<p>Who: {{ . }}{{ end }} {{ with .IncludeAudience }} (inclusive) {{ end }}
48{{ with .Text }}<p>Text: {{ . }}{{ end }}
49<p>Actions: {{ range .Actions }} {{ . }} {{ end }}
50{{ with .Rewrite }}<p>Rewrite: {{ . }}{{ end }}
51{{ with .Replace }}<p>Replace: {{ . }}{{ end }}
52<form action="/savehfcs" method="POST">
53<input type="hidden" name="CSRF" value="{{ $csrf }}">
54<input type="hidden" name="hfcsid" value="{{ .ID }}">
55<input type="hidden" name="itsok" value="iforgiveyou">
56<button name="pardon" value="pardon">pardon</button>
57</form>
58<p>
59</section>
60{{ end }}
61</main>