diff --git a/html/template/rmo/error.html b/html/template/rmo/error.html new file mode 100644 index 00000000..96650255 --- /dev/null +++ b/html/template/rmo/error.html @@ -0,0 +1,28 @@ +{{ template "rmo/layout/base.html" . }} + +{{ define "title" }}Error{{ end }} +{{ define "extraheader" }} +{{ end }} +{{ define "content" }} + {{ if (eq .District nil) }} + {{ template "rmo/component/header-rmo.html" . }} + {{ else }} + {{ template "rmo/component/header-district.html" .District }} + {{ end }} +
+

Sorry, something went wrong.

+

Error code: {{ .Code }}

+

+ Sorry, you shouldn't ever see this page, it's generally meant to indicate + that something in the site is very broken. We'll automatically get a + report for this, so you don't need to send anything, but if you'd like to + tell us about it, please reach out to + support@report.mosquitoes.online +

+ +
+{{ end }} diff --git a/rmo/quick.go b/rmo/quick.go index c14f01aa..0715ab86 100644 --- a/rmo/quick.go +++ b/rmo/quick.go @@ -86,7 +86,7 @@ func getRegisterNotificationsComplete(w http.ResponseWriter, r *http.Request) { report := r.URL.Query().Get("report") html.RenderOrError( w, - "rmo/register-notificition-complete.html", + "rmo/register-notifications-complete.html", ContentRegisterNotificationsComplete{ ReportID: report, }, diff --git a/rmo/routes.go b/rmo/routes.go index 316889e2..b698ad6f 100644 --- a/rmo/routes.go +++ b/rmo/routes.go @@ -21,6 +21,7 @@ func Router() chi.Router { //r.Get("/district/{slug}/status", renderMock(mockStatusT)) r.Get("/district/{slug}/water", getWaterDistrict) //r.Post("/district/{slug}/water", postWaterDistrict) + r.Get("/error", getError) r.Get("/privacy", getPrivacy) r.Get("/robots.txt", getRobots)