all repos — honk @ 4988c402d65c7716a4ba78a378d89d70f712b93a

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