Download this file
| 1 | {{define "title"}}{{.Title}}{{end}} |
| 2 | {{define "content"}} |
| 3 | <header rst-page-header> |
| 4 | <div rst-page-header-titles> |
| 5 | <h1>Delete “{{.Data.Event.Title}}”?</h1> |
| 6 | </div> |
| 7 | </header> |
| 8 | |
| 9 | {{if .Data.Series}} |
| 10 | {{/* One question, and the expensive answer is LAST with its count |
| 11 | said out loud. "All of them" as a default, or as the first radio, |
| 12 | is how somebody deletes a year of standups meaning to delete |
| 13 | tomorrow's. */}} |
| 14 | <form rst-form method="post" action="/events/{{.Data.Event.ID}}/delete"> |
| 15 | <input type="hidden" name="occurrence" value="{{.Data.Occurrence}}"> |
| 16 | {{template "choice-field" dict |
| 17 | "Legend" "This repeats. What should go?" |
| 18 | "Name" "scope" |
| 19 | "Type" "radio" |
| 20 | "Options" (list |
| 21 | (dict "Value" "this" "Title" "Just this one" |
| 22 | "Desc" "The rest of the series stays exactly as it is." |
| 23 | "Checked" true) |
| 24 | (dict "Value" "all" |
| 25 | "Title" (deleteAllLabel .Data.Count .Data.Forever) |
| 26 | "Desc" "Every occurrence, past and future. This cannot be undone."))}} |
| 27 | {{template "form-foot" dict |
| 28 | "Submit" "Delete" |
| 29 | "Danger" true |
| 30 | "CancelHref" (printf "/events/%d" .Data.Event.ID) |
| 31 | "CancelLabel" "Keep it"}} |
| 32 | </form> |
| 33 | {{else}} |
| 34 | {{template "confirm-form" dict |
| 35 | "Action" (printf "/events/%d/delete" .Data.Event.ID) |
| 36 | "Label" "Delete this event" |
| 37 | "Danger" true |
| 38 | "CancelHref" (printf "/events/%d" .Data.Event.ID) |
| 39 | "CancelLabel" "Keep it"}} |
| 40 | {{end}} |
| 41 | {{end}} |
| 42 | |