honk/views/hfcs.html

72 lines
3.1 KiB
HTML
Raw Normal View History

2019-10-07 02:26:21 +02:00
{{ template "header.html" . }}
<main>
<div class="info">
<p>
2019-10-20 04:59:28 +02:00
Honk Filtering and Censorship System
2019-10-07 02:26:21 +02:00
<form action="/savehfcs" method="POST">
<input type="hidden" name="CSRF" value="{{ .FilterCSRF }}">
2019-10-08 08:06:09 +02:00
<hr>
2019-10-07 02:26:21 +02:00
<h3>new filter</h3>
2019-10-08 08:06:09 +02:00
<p><label for="name">filter name:</label><br>
<input tabindex=1 type="text" name="name" value="" autocomplete=off>
<p><label for="filtnotes">notes:</label><br>
<textarea tabindex=1 name="filtnotes" height=4>
</textarea>
2019-10-08 08:06:09 +02:00
<hr>
2019-10-07 02:26:21 +02:00
<h3>match</h3>
2019-10-08 08:06:09 +02:00
<p><label for="actor">who or where:</label><br>
<input tabindex=1 type="text" name="actor" value="" autocomplete=off>
<p><span><label class=button for="incaud">include audience:
<input tabindex=1 type="checkbox" id="incaud" name="incaud" value="yes"><span></span></label></span>
<p><label for="filttext">text matches:</label><br>
<input tabindex=1 type="text" name="filttext" value="" autocomplete=off>
<p><span><label class=button for="isannounce">is announce:
<input tabindex=1 type="checkbox" id="isannounce" name="isannounce" value="yes"><span></span></label></span>
<p><label for="announceof">announce of:</label><br>
<input tabindex=1 type="text" name="announceof" value="" autocomplete=off>
<hr>
2019-10-07 02:26:21 +02:00
<h3>action</h3>
2019-10-23 06:22:19 +02:00
<p class="buttonarray">
<span><label class=button for="doreject">reject:
2019-10-08 08:06:09 +02:00
<input tabindex=1 type="checkbox" id="doreject" name="doreject" value="yes"><span></span></label></span>
<span><label class=button for="doskipmedia">skip media:
<input tabindex=1 type="checkbox" id="doskipmedia" name="doskipmedia" value="yes"><span></span></label></span>
<span><label class=button for="dohide">hide:
<input tabindex=1 type="checkbox" id="dohide" name="dohide" value="yes"><span></span></label></span>
<span><label class=button for="docollapse">collapse:
<input tabindex=1 type="checkbox" id="docollapse" name="docollapse" value="yes"><span></span></label></span>
<p><label for="rewrite">rewrite:</label><br>
<input tabindex=1 type="text" name="filtrewrite" value="" autocomplete=off>
<p><label for="replace">replace:</label><br>
<input tabindex=1 type="text" name="filtreplace" value="" autocomplete=off>
<hr>
2019-10-21 08:28:35 +02:00
<h3>expiration</h3>
<p><label for="filtduration">duration:</label><br>
<input tabindex=1 type="text" name="filtduration" value="" autocomplete=off>
<hr>
2019-10-07 02:26:21 +02:00
<p><button>impose your will</button>
</form>
</div>
{{ $csrf := .FilterCSRF }}
{{ range .Filters }}
<section class="honk">
<p>Name: {{ .Name }}
{{ with .Notes }}<p>Notes: {{ . }}{{ end }}
2019-10-07 02:26:21 +02:00
<p>Date: {{ .Date.Format "2006-01-02" }}
{{ with .Actor }}<p>Who: {{ . }}{{ end }} {{ with .IncludeAudience }} (inclusive) {{ end }}
{{ with .Text }}<p>Text: {{ . }}{{ end }}
<p>Actions: {{ range .Actions }} {{ . }} {{ end }}
{{ with .Rewrite }}<p>Rewrite: {{ . }}{{ end }}
{{ with .Replace }}<p>Replace: {{ . }}{{ end }}
2019-10-21 08:28:35 +02:00
{{ if not .Expiration.IsZero }}<p>Expiration: {{ .Expiration.Format "2006-01-02 03:04" }}{{ end }}
2019-10-07 02:26:21 +02:00
<form action="/savehfcs" method="POST">
<input type="hidden" name="CSRF" value="{{ $csrf }}">
<input type="hidden" name="hfcsid" value="{{ .ID }}">
<input type="hidden" name="itsok" value="iforgiveyou">
<button name="pardon" value="pardon">pardon</button>
</form>
<p>
</section>
{{ end }}
</main>