2022-06-06 05:29:39 +00:00
|
|
|
{{ $editableSlugs := ((.Context).Value "adapter").EditableSlugs }}
|
|
|
|
{{ $csrfToken := (.Context).Value "csrfToken" }}
|
|
|
|
{{ $noEmpty := .FormValue "no-empty" }}
|
|
|
|
|
|
|
|
{{ template "header" . }}
|
2022-06-07 06:59:41 +00:00
|
|
|
|
|
|
|
<h2>New Page</h2>
|
|
|
|
|
2022-06-06 05:29:39 +00:00
|
|
|
<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}}"/>
|
2022-06-09 05:13:09 +00:00
|
|
|
<label for="title">Title</label><br/>
|
|
|
|
<input class="title-input" id="title" type="text" name="title" required/><br/>
|
2022-06-06 05:29:39 +00:00
|
|
|
{{ if $editableSlugs }}
|
2022-06-07 06:59:41 +00:00
|
|
|
<label for="slug">Slug</label><br/>
|
|
|
|
<input class="slug-input" id="slug" type="text" name="slug" required/><br/>
|
2022-06-06 05:29:39 +00:00
|
|
|
{{ end }}
|
2022-06-07 06:59:41 +00:00
|
|
|
<label for="content">Content</label><br/>
|
|
|
|
<textarea class="content-input" id="content" name="content" required></textarea><br/>
|
2022-06-15 07:33:56 +00:00
|
|
|
<a target="_blank" class="fmt-help" href="/fmt-help">Formatting help</a>
|
2022-06-06 05:29:39 +00:00
|
|
|
<input type="submit" value="Save"/>
|
|
|
|
</form>
|
|
|
|
|
2022-06-07 06:59:41 +00:00
|
|
|
{{ template "footer" . }}
|