Files
alar.ink/site/submit-new.html

75 lines
2.8 KiB
HTML

{{ define "submit-entry" }}
{{ template "header" . }}
<h2>{{ .L.T "public.submitEntryTitle" }}</h2>
<hr />
<form method="post" action="" class="form-submit">
<div>
<div class="row">
<fieldset class="columns three">
<label for="entry-lang">{{ .L.T "public.suggestEntryLang" }}</label>
<select name="entry_lang" for="entry-lang">
{{ range $id, $l := .Langs }}
<option value="{{ $id }}">{{ $l.Name }}</option>
{{ end }}
</select>
</fieldset>
<fieldset class="columns one"></fieldset>
<fieldset class="columns eight">
<label for="entry-content">{{ .L.T "public.suggestContent" }}</label>
<textarea name="entry_content" id="entry-content" required minlength="3"></textarea>
</fieldset>
</div>
<fieldset>
<label>{{ .L.T "public.suggestPhones" }}</label>
<input type="text" name="phones" placeholder="{{ .L.T "public.suggestPhonesPlaceholder" }}" />
</fieldset>
<br />
<h3>{{ .L.T "public.suggestDefsTitle" }}</h3>
<ol class="add-relations box">
<li class="row">
<fieldset class="columns three">
<label>{{ .L.T "public.suggestDefLang" }}</label>
<select name="relation_lang">
{{ range $id, $l := .Langs }}
<option value="{{ $id }}">{{ $l.Name }}</option>
{{ end }}
</select>
<select name="relation_type">
{{ range $lid, $l := .Langs }}
{{ range $tid, $t := $l.Types }}
<option data-lang="{{ $lid }}" value="{{ $tid }}">{{ $t }}</option>
{{ end }}
{{ end }}
</select>
<br />
<a href="#" class="btn-remove-relation">{{ .L.T "global.btnDelete" }}</a>
</fieldset>
<fieldset class="columns one"></fieldset>
<fieldset class="columns eight">
<label for="definition-content">{{ .L.T "public.suggestContent" }}</label>
<textarea name="relation_content" required minlength="3"></textarea>
</fieldset>
</li>
</ol>
<p class="text-right">
<a href="#" class="btn-add-relation">+ {{ .L.T "public.suggestAddDefBtn" }}</a>
</p>
<br />
<p>
<button type="submit">{{ .L.T "public.suggestSubmitBtn" }}</button>
</p>
</div>
</form>
<script>
(() => { window.setTimeout(() => { document.querySelector('#entry-content').focus() }, 10); })();
</script>
{{ template "footer" . }}
{{ end }}