views/hfcs.html (view raw)
1{{ template "header.html" . }}
2<main>
3<div class="info">
4<p>
5Honk Filtering and Censorship 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<h3>expiration</h3>
40<p><label for="filtduration">duration:</label><br>
41<input tabindex=1 type="text" name="filtduration" value="" autocomplete=off>
42<hr>
43<p><button>impose your will</button>
44</form>
45</div>
46{{ $csrf := .FilterCSRF }}
47{{ range .Filters }}
48<section class="honk">
49<p>Name: {{ .Name }}
50<p>Date: {{ .Date.Format "2006-01-02" }}
51{{ with .Actor }}<p>Who: {{ . }}{{ end }} {{ with .IncludeAudience }} (inclusive) {{ end }}
52{{ with .Text }}<p>Text: {{ . }}{{ end }}
53<p>Actions: {{ range .Actions }} {{ . }} {{ end }}
54{{ with .Rewrite }}<p>Rewrite: {{ . }}{{ end }}
55{{ with .Replace }}<p>Replace: {{ . }}{{ end }}
56{{ if not .Expiration.IsZero }}<p>Expiration: {{ .Expiration.Format "2006-01-02 03:04" }}{{ end }}
57<form action="/savehfcs" method="POST">
58<input type="hidden" name="CSRF" value="{{ $csrf }}">
59<input type="hidden" name="hfcsid" value="{{ .ID }}">
60<input type="hidden" name="itsok" value="iforgiveyou">
61<button name="pardon" value="pardon">pardon</button>
62</form>
63<p>
64</section>
65{{ end }}
66</main>