2022-06-06 05:29:39 +00:00
|
|
|
{{ $slug := ((.Context).Value "params").Slug }}
|
|
|
|
{{ $newSlug := .FormValue "slug" }}
|
|
|
|
{{ $title := .FormValue "title" }}
|
|
|
|
{{ $content := .FormValue "content" }}
|
|
|
|
{{ $saveErr := ((.Context).Value "adapter").SavePage $slug $newSlug $title $content }}
|
|
|
|
|
|
|
|
{{ template "header" . }}
|
|
|
|
|
|
|
|
{{ if $saveErr }}
|
2022-06-18 06:17:08 +00:00
|
|
|
|
2022-06-07 06:59:41 +00:00
|
|
|
<h2>Page Save Error</h2>
|
2022-06-18 06:17:08 +00:00
|
|
|
<span class="adapter-error">{{ ($saveErr).Error }}</span>
|
|
|
|
|
2022-06-06 05:29:39 +00:00
|
|
|
{{ else }}
|
2022-06-18 06:17:08 +00:00
|
|
|
|
2022-06-07 06:59:41 +00:00
|
|
|
<h2>Page Saved</h2>
|
2022-06-06 05:29:39 +00:00
|
|
|
<span class="adapter-success">Page '{{ $title }}' saved successfully</span>
|
2022-06-18 06:17:08 +00:00
|
|
|
|
2022-06-06 05:29:39 +00:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ template "footer" . }}
|