| 1 | {{define "title"}}{{say (printf "stance.%s.label" .Stance)}}{{end}} |
| 2 | {{define "head"}}<script type="module" src="{{asset "static/pow.js"}}"></script>{{end}} |
| 3 | {{define "content"}} |
| 4 | <div class="sheet"> |
| 5 | |
| 6 | {{/* The tab you tore off the bill, carried over. Its lower edge is ragged |
| 7 | because that is where the perforation gave. It carries no label above |
| 8 | it: the word is the heading. */}} |
| 9 | <div class="torn"> |
| 10 | <p class="torn__word">{{say (printf "stance.%s.label" .Stance)}}</p> |
| 11 | </div> |
| 12 | |
| 13 | <div class="sheet__split"> |
| 14 | |
| 15 | <div class="sheet__reply"> |
| 16 | {{range .Message}}<p>{{.}}</p>{{end}} |
| 17 | {{/* Only the all-in reply carries it, and it sits under the text it |
| 18 | describes rather than in front of it. */}} |
| 19 | {{if .Disclosure}}<p class="sheet__disclosure">{{.Disclosure}}</p>{{end}} |
| 20 | </div> |
| 21 | |
| 22 | <form class="slip" method="post" action="/signup" |
| 23 | data-pow-form |
| 24 | data-pow-nonce="{{.Challenge.Nonce}}" |
| 25 | data-pow-difficulty="{{.Challenge.Difficulty}}" |
| 26 | data-pow-worker="{{asset "static/pow-worker.js"}}"> |
| 27 | |
| 28 | <p class="slip__title">{{say "form.submit"}}</p> |
| 29 | |
| 30 | {{if .Error}}<p class="notice" role="alert">{{.Error}}</p>{{end}} |
| 31 | |
| 32 | <input type="hidden" name="stance" value="{{.Stance}}"> |
| 33 | <input type="hidden" name="nonce" value="{{.Challenge.Nonce}}"> |
| 34 | <input type="hidden" name="issued_at" value="{{.Challenge.IssuedAt}}"> |
| 35 | <input type="hidden" name="difficulty" value="{{.Challenge.Difficulty}}"> |
| 36 | <input type="hidden" name="seal" value="{{.Challenge.Seal}}"> |
| 37 | <input type="hidden" name="counter" value="" data-pow-counter> |
| 38 | |
| 39 | {{/* Hidden from the screen but present in the page, and kept away from |
| 40 | anything a browser or password manager would autofill: filling it |
| 41 | discards a real person's signup behind a page they cannot see |
| 42 | through. */}} |
| 43 | <div class="hp" aria-hidden="true"> |
| 44 | <label for="{{.Honeypot}}">{{say "form.honeypot"}}</label> |
| 45 | <input type="text" id="{{.Honeypot}}" name="{{.Honeypot}}" |
| 46 | tabindex="-1" autocomplete="off"> |
| 47 | </div> |
| 48 | |
| 49 | <label class="field" for="name"> |
| 50 | <span>{{say "form.name"}}</span> |
| 51 | <input type="text" id="name" name="name" required maxlength="120" |
| 52 | autocomplete="name" placeholder="{{say (printf "form.name.placeholder.%s" .Stance)}}"> |
| 53 | </label> |
| 54 | |
| 55 | <label class="field" for="email"> |
| 56 | <span>{{say "form.email"}}</span> |
| 57 | <input type="email" id="email" name="email" required |
| 58 | autocomplete="email" data-pow-email |
| 59 | placeholder="{{say "form.email.placeholder"}}"> |
| 60 | </label> |
| 61 | |
| 62 | <label class="field" for="background"> |
| 63 | <span>{{say "form.background"}}</span> |
| 64 | <textarea id="background" name="background" rows="5" maxlength="2000" |
| 65 | placeholder="{{say "form.background.placeholder"}}"></textarea> |
| 66 | </label> |
| 67 | |
| 68 | {{/* Disabled until the module loads and enables it. The other way round |
| 69 | is unbuildable, and this ordering fails safe. There is deliberately |
| 70 | no explanation beside it. */}} |
| 71 | <button type="submit" class="stamp" disabled data-pow-submit |
| 72 | data-label="{{say "form.submit"}}" |
| 73 | data-working-label="{{say "form.working"}}">{{say "form.submit"}}</button> |
| 74 | |
| 75 | <p class="slip__status" hidden data-pow-status></p> |
| 76 | </form> |
| 77 | |
| 78 | </div> |
| 79 | </div> |
| 80 | {{end}} |
| 81 | |