all repos — honk @ 58e640b45051cebfbbdfae5582a638d707528d97

my fork of honk

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">
27<span><label class=button for="doreject">reject:
28<input tabindex=1 type="checkbox" id="doreject" name="doreject" value="yes"><span></span></label></span>
29<span><label class=button for="doskipmedia">skip media:
30<input tabindex=1 type="checkbox" id="doskipmedia" name="doskipmedia" value="yes"><span></span></label></span>
31<span><label class=button for="dohide">hide:
32<input tabindex=1 type="checkbox" id="dohide" name="dohide" value="yes"><span></span></label></span>
33<span><label class=button for="docollapse">collapse:
34<input tabindex=1 type="checkbox" id="docollapse" name="docollapse" value="yes"><span></span></label></span>
35<p><label for="rewrite">rewrite:</label><br>
36<input tabindex=1 type="text" name="filtrewrite" value="" autocomplete=off>
37<p><label for="replace">replace:</label><br>
38<input tabindex=1 type="text" name="filtreplace" value="" autocomplete=off>
39<hr>
40<h3>expiration</h3>
41<p><label for="filtduration">duration:</label><br>
42<input tabindex=1 type="text" name="filtduration" value="" autocomplete=off>
43<hr>
44<p><button>impose your will</button>
45</form>
46</div>
47{{ $csrf := .FilterCSRF }}
48{{ range .Filters }}
49<section class="honk">
50<p>Name: {{ .Name }}
51<p>Date: {{ .Date.Format "2006-01-02" }}
52{{ with .Actor }}<p>Who: {{ . }}{{ end }} {{ with .IncludeAudience }} (inclusive) {{ end }}
53{{ with .Text }}<p>Text: {{ . }}{{ end }}
54<p>Actions: {{ range .Actions }} {{ . }} {{ end }}
55{{ with .Rewrite }}<p>Rewrite: {{ . }}{{ end }}
56{{ with .Replace }}<p>Replace: {{ . }}{{ end }}
57{{ if not .Expiration.IsZero }}<p>Expiration: {{ .Expiration.Format "2006-01-02 03:04" }}{{ end }}
58<form action="/savehfcs" method="POST">
59<input type="hidden" name="CSRF" value="{{ $csrf }}">
60<input type="hidden" name="hfcsid" value="{{ .ID }}">
61<input type="hidden" name="itsok" value="iforgiveyou">
62<button name="pardon" value="pardon">pardon</button>
63</form>
64<p>
65</section>
66{{ end }}
67</main>