update_server/web/templates/pages/project_form.gohtml
2026-06-10 20:51:17 +03:00

38 lines
1.1 KiB
Text

{{define "content"}}
<section class="hero">
<p class="eyebrow">{{.Eyebrow}}</p>
<h1>{{.Heading}}</h1>
<p class="lede">{{.Description}}</p>
</section>
{{if .Form.Error}}
<section class="alert-card alert-error">
<p>{{.Form.Error}}</p>
</section>
{{end}}
<section class="form-shell form-shell-wide">
<form class="stack-form" method="post" action="{{.Form.Action}}">
{{template "csrf_field" .}}
<label class="field">
<span>Name</span>
<input type="text" name="name" value="{{.Form.Name}}" maxlength="120" required>
</label>
<label class="field">
<span>Slug</span>
<input type="text" name="slug" value="{{.Form.Slug}}" maxlength="120" placeholder="auto-generated from the name">
</label>
<label class="field">
<span>Description</span>
<textarea name="description" rows="5">{{.Form.Description}}</textarea>
</label>
<div class="button-row">
<button class="button" type="submit">{{.Form.SubmitLabel}}</button>
<a class="button button-secondary" href="/admin/projects">Back to projects</a>
</div>
</form>
</section>
{{end}}