all repos — honk @ 5532561ec68842dca7943855c3fb93addd5c0d86

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