Files
plumber/templates/submit.html
codegirl007 2eb8bff1c4
CI / test (push) Successful in 6m28s
Add post image upload (#20)
Lands the image upload handlers and picker on master. Questions and replies can attach up to four JPEG, PNG, or WebP photos.

Reviewed-on: #20
Co-authored-by: codegirl-007 <s.raide@gmail.com>
2026-08-31 04:29:51 +00:00

22 lines
1.3 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{define "submit"}}
{{template "header" .}}
<main id="main" class="wrap panel-wrap">
<h1>Ask a question</h1>
<p class="lede">It lands on todays hunt (Pacific time). People vote; the ranking resets at midnight PT.</p>
{{if .Error}}<p class="banner error" role="alert">{{.Error}}</p>{{end}}
<form class="ask" method="post" action="/submit" enctype="multipart/form-data"
data-submit-once data-submitting-label="Posting…">
<input type="hidden" name="_csrf" value="{{.CSRF}}">
<label for="title">Title</label>
<input id="title" name="title" type="text" required maxlength="120" value="{{.TitleVal}}" placeholder="Water heater popping after showers">
<label for="body">What is going on?</label>
<textarea id="body" name="body" rows="8" required maxlength="8000" placeholder="Age of the house, what you already tried, where you are in the Bay if it helps.">{{.BodyVal}}</textarea>
<label for="city">City <span class="optional">(optional)</span></label>
<input id="city" name="city" type="text" maxlength="80" value="{{.CityVal}}" placeholder="Oakland">
{{template "imagePicker" (newImagePicker "submit-images")}}
<button type="submit" class="btn btn-primary" data-submit-button>Submit to todays hunt</button>
</form>
</main>
{{template "footer" .}}
{{end}}