all repos — honk @ v0.9.3

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<p><label for="filtnotes">notes:</label><br>
13<textarea tabindex=1 name="filtnotes" height=4>
14</textarea>
15<hr>
16<h3>match</h3>
17<p><label for="actor">who or where:</label><br>
18<input tabindex=1 type="text" name="actor" value="" autocomplete=off>
19<p><span><label class=button for="incaud">include audience:
20<input tabindex=1 type="checkbox" id="incaud" name="incaud" value="yes"><span></span></label></span>
21<p><label for="filttext">text matches:</label><br>
22<input tabindex=1 type="text" name="filttext" value="" autocomplete=off>
23<p><span><label class=button for="isannounce">is announce:
24<input tabindex=1 type="checkbox" id="isannounce" name="isannounce" value="yes"><span></span></label></span>
25<p><label for="announceof">announce of:</label><br>
26<input tabindex=1 type="text" name="announceof" value="" autocomplete=off>
27<hr>
28<h3>action</h3>
29<p class="buttonarray">
30<span><label class=button for="doreject">reject:
31<input tabindex=1 type="checkbox" id="doreject" name="doreject" value="yes"><span></span></label></span>
32<span><label class=button for="doskipmedia">skip media:
33<input tabindex=1 type="checkbox" id="doskipmedia" name="doskipmedia" value="yes"><span></span></label></span>
34<span><label class=button for="dohide">hide:
35<input tabindex=1 type="checkbox" id="dohide" name="dohide" value="yes"><span></span></label></span>
36<span><label class=button for="docollapse">collapse:
37<input tabindex=1 type="checkbox" id="docollapse" name="docollapse" value="yes"><span></span></label></span>
38<p><label for="rewrite">rewrite:</label><br>
39<input tabindex=1 type="text" name="filtrewrite" value="" autocomplete=off>
40<p><label for="replace">replace:</label><br>
41<input tabindex=1 type="text" name="filtreplace" value="" autocomplete=off>
42<hr>
43<h3>expiration</h3>
44<p><label for="filtduration">duration:</label><br>
45<input tabindex=1 type="text" name="filtduration" value="" autocomplete=off>
46<hr>
47<p><button>impose your will</button>
48</form>
49</div>
50{{ $csrf := .FilterCSRF }}
51{{ range .Filters }}
52<section class="honk">
53<p>Name: {{ .Name }}
54{{ with .Notes }}<p>Notes: {{ . }}{{ end }}
55<p>Date: {{ .Date.Format "2006-01-02" }}
56{{ with .Actor }}<p>Who: {{ . }}{{ end }} {{ with .IncludeAudience }} (inclusive) {{ end }}
57{{ if .IsAnnounce }}<p>Announce: {{ .AnnounceOf }}{{ end }}
58{{ with .Text }}<p>Text: {{ . }}{{ end }}
59<p>Actions: {{ range .Actions }} {{ . }} {{ end }}
60{{ with .Rewrite }}<p>Rewrite: {{ . }}{{ end }}
61{{ with .Replace }}<p>Replace: {{ . }}{{ end }}
62{{ if not .Expiration.IsZero }}<p>Expiration: {{ .Expiration.Format "2006-01-02 03:04" }}{{ end }}
63<form action="/savehfcs" method="POST">
64<input type="hidden" name="CSRF" value="{{ $csrf }}">
65<input type="hidden" name="hfcsid" value="{{ .ID }}">
66<input type="hidden" name="itsok" value="iforgiveyou">
67<button name="pardon" value="pardon">pardon</button>
68</form>
69<p>
70</section>
71{{ end }}
72</main>