You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
3.1 KiB

{{ template "header.html" . }}
<main>
<div class="info">
<p>
Honk Filtering and Censorship System
<form action="/savehfcs" method="POST">
<input type="hidden" name="CSRF" value="{{ .FilterCSRF }}">
<hr>
<h3>new filter</h3>
<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>
<hr>
<h3>match</h3>
<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>
<h3>action</h3>
<p class="buttonarray">
<span><label class=button for="doreject">reject:
<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>
<h3>expiration</h3>
<p><label for="filtduration">duration:</label><br>
<input tabindex=1 type="text" name="filtduration" value="" autocomplete=off>
<hr>
<p><button>impose your will</button>
</form>
</div>
{{ $csrf := .FilterCSRF }}
{{ range .Filters }}
<section class="honk">
<p>Name: {{ .Name }}
{{ with .Notes }}<p>Notes: {{ . }}{{ end }}
<p>Date: {{ .Date.Format "2006-01-02" }}
{{ with .Actor }}<p>Who: {{ . }}{{ end }} {{ with .IncludeAudience }} (inclusive) {{ end }}
{{ if .IsAnnounce }}<p>Announce: {{ .AnnounceOf }}{{ end }}
{{ with .Text }}<p>Text: {{ . }}{{ end }}
<p>Actions: {{ range .Actions }} {{ . }} {{ end }}
{{ with .Rewrite }}<p>Rewrite: {{ . }}{{ end }}
{{ with .Replace }}<p>Replace: {{ . }}{{ end }}
{{ if not .Expiration.IsZero }}<p>Expiration: {{ .Expiration.Format "2006-01-02 03:04" }}{{ end }}
<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>