| 1 | {{define "title"}}{{.Title}}{{end}} |
| 2 | {{define "content"}} |
| 3 | <header rst-page-header> |
| 4 | <div rst-page-header-titles> |
| 5 | <h1>Settings</h1> |
| 6 | </div> |
| 7 | </header> |
| 8 | |
| 9 | {{if .Data.Saved}} |
| 10 | {{template "callout" dict "Tone" "positive" "Body" "Saved."}} |
| 11 | {{end}} |
| 12 | {{with .Data.Error}} |
| 13 | {{template "callout" dict "Tone" "negative" "Body" . "Alert" true}} |
| 14 | {{end}} |
| 15 | |
| 16 | {{if .Data.Undeliverable}} |
| 17 | {{/* Stated rather than hidden. A reminder that gave up is a reminder |
| 18 | somebody is still expecting. */}} |
| 19 | {{template "callout" dict "Tone" "warning" |
| 20 | "Title" "Some reminders could not be delivered" |
| 21 | "Body" "They were retried and then given up on, so they will not arrive. Check that this address accepts mail from this instance."}} |
| 22 | {{end}} |
| 23 | |
| 24 | <form rst-form method="post" action="/settings"> |
| 25 | {{template "field-select" dict |
| 26 | "ID" "zone" "Name" "zone" "Label" "Your time zone" |
| 27 | "Options" (zoneOptions .Data.Person.Zone) |
| 28 | "Hint" "Every time on the calendar is shown in this zone. It is never guessed from your browser: a calendar that silently re-times itself because you opened it on holiday is a calendar that lies."}} |
| 29 | |
| 30 | {{template "field" dict |
| 31 | "ID" "handle" "Name" "handle" "Label" "Your handle" |
| 32 | "Value" .Data.Person.Handle |
| 33 | "Placeholder" "paul" "Autocomplete" "off" |
| 34 | "Help" "Lowercase letters, digits and dashes. It is the first part of every booking link you share, so changing it changes the links." |
| 35 | "Error" (if_eq .Data.ErrorField "handle" .Data.Error)}} |
| 36 | <p><a href="/settings/booking">Booking pages →</a></p> |
| 37 | |
| 38 | {{template "field-select" dict |
| 39 | "ID" "week_start" "Name" "week_start" "Label" "Weeks start on" |
| 40 | "Options" (weekStartOptions .Data.Person.WeekStart)}} |
| 41 | |
| 42 | {{template "field-select" dict |
| 43 | "ID" "default_reminder_min" "Name" "default_reminder_min" "Label" "Remind me about timed events" |
| 44 | "Options" (list |
| 45 | (dict "Value" "0" "Label" "Not by default" "Selected" (eq .Data.Person.DefaultReminderMin 0)) |
| 46 | (dict "Value" "5" "Label" "5 minutes before" "Selected" (eq .Data.Person.DefaultReminderMin 5)) |
| 47 | (dict "Value" "10" "Label" "10 minutes before" "Selected" (eq .Data.Person.DefaultReminderMin 10)) |
| 48 | (dict "Value" "30" "Label" "30 minutes before" "Selected" (eq .Data.Person.DefaultReminderMin 30)) |
| 49 | (dict "Value" "60" "Label" "1 hour before" "Selected" (eq .Data.Person.DefaultReminderMin 60)))}} |
| 50 | |
| 51 | {{template "field-select" dict |
| 52 | "ID" "default_all_day_min" "Name" "default_all_day_min" "Label" "Remind me about all-day events" |
| 53 | "Hint" "A birthday you hear about at midnight is a birthday you have half missed." |
| 54 | "Options" (list |
| 55 | (dict "Value" "0" "Label" "Not by default" "Selected" (eq .Data.Person.DefaultAllDayMin 0)) |
| 56 | (dict "Value" "360" "Label" "The evening before" "Selected" (eq .Data.Person.DefaultAllDayMin 360)) |
| 57 | (dict "Value" "1440" "Label" "A day before" "Selected" (eq .Data.Person.DefaultAllDayMin 1440)))}} |
| 58 | |
| 59 | {{template "form-foot" dict "Submit" "Save" "CancelHref" "/today" "CancelLabel" "Cancel"}} |
| 60 | </form> |
| 61 | {{end}} |
| 62 | |