{{define "content" -}}
<h1>Suspension reasons</h1>
{{with .Data}}
<p class="note">Reasons offered when blocking a user; each is shown to the blocked player in their own language. Editing or deleting a reason does not change a reason already shown to a currently-blocked player (blocks snapshot the text).</p>
<section class="panel"><h2>Add reason</h2>
<form class="form col" method="post" action="/_gm/reasons">
<label>English <input type="text" name="text_en" required></label>
<label>Russian <input type="text" name="text_ru" required></label>
<div><button type="submit">Add</button></div>
</form>
</section>
<section class="panel"><h2>Existing reasons</h2>
{{range .Items}}
<div class="row">
<form class="form" method="post" action="/_gm/reasons/{{.ID}}/update">
<input type="text" name="text_en" value="{{.TextEn}}" aria-label="English" required>
<input type="text" name="text_ru" value="{{.TextRu}}" aria-label="Russian" required>
<button type="submit">Save</button>
</form>
<form class="form" method="post" action="/_gm/reasons/{{.ID}}/delete">
<button type="submit">Delete</button>
</form>
</div>
{{else}}<p class="note">no reasons yet</p>{{end}}
</section>
{{end}}
{{- end}}
