Download this file
| 1 | {{/* deck_new — GET /decks/new, the create form and nothing else. |
| 2 | |
| 3 | One form, one primary button, a cancel that is a real link. Both |
| 4 | controls come from ui: a hand-rolled <label><input> validates fine |
| 5 | and renders as ragged inline labels over an unstyled button, which |
| 6 | is exactly the failure nothing tells you about. */}} |
| 7 | {{define "content"}} |
| 8 | {{template "page-header" dict "Title" .Title "Sub" .Body}} |
| 9 | <div rst-box> |
| 10 | <form rst-form method="post" action="/decks"> |
| 11 | {{template "field-text" dict |
| 12 | "Name" "title" "Label" .TitleLabel "Value" .TitleValue |
| 13 | "Required" true "Primary" true "Autofocus" true |
| 14 | "Error" (index .Errors "Title")}} |
| 15 | {{template "field-select" dict |
| 16 | "ID" "theme" "Name" "theme" "Label" .ThemeLabel |
| 17 | "Options" .Themes "Required" true |
| 18 | "Error" (index .Errors "Theme")}} |
| 19 | {{template "form-foot" dict |
| 20 | "Submit" .Submit "CancelHref" .CancelHref "CancelLabel" .CancelLabel}} |
| 21 | </form> |
| 22 | </div> |
| 23 | {{end}} |
| 24 | |