all repos — honk @ v1.2.2

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