nirvash/templates/cms_new.html

20 lines
No EOL
737 B
HTML

{{ $editableSlugs := ((.Context).Value "adapter").EditableSlugs }}
{{ $csrfToken := (.Context).Value "csrfToken" }}
{{ $noEmpty := .FormValue "no-empty" }}
{{ template "header" . }}
<a href="/">&laquo;</a>
<form class="editor" method="POST" action="/create">
{{ if $noEmpty }}
<span class="edit-error">Empty fields are not allowed - please try again</span><br/>
{{ end }}
<input hidden name="csrfToken" value="{{$csrfToken}}"/>
{{ if $editableSlugs }}
<input class="slug-input" type="text" name="slug"/><br/>
{{ end }}
<input class="title-input" type="text" name="title"/><br/>
<textarea class="content-input" name="content"></textarea><br/>
<input type="submit" value="Save"/>
</form>
{{ template "footer" . }}