diff --git a/pkg/server/mailactions/confirm.go b/pkg/server/mailactions/confirm.go index 9f13acd1f..d44c7458a 100644 --- a/pkg/server/mailactions/confirm.go +++ b/pkg/server/mailactions/confirm.go @@ -42,14 +42,17 @@ func confirmGetHandler() http.HandlerFunc { renderPage( w, http.StatusOK, + // The confirmation should happen too quickly for the user to notice. + // This content is only shown as a fallback. page{ Title: "Confirm subscription", Heading: "Confirm your subscription", - Body: "Click the button below to confirm that you want to receive updates.", + Body: "Your confirmation should be processed automatically. If it isn’t, click the button below to confirm that you want to receive updates.", Form: &form{ - ActionURL: template.URL("?token=" + url.QueryEscape(token)), - Button: "Confirm subscription", - Danger: false, + ActionURL: template.URL("?token=" + url.QueryEscape(token)), + Button: "Confirm subscription", + AutoSubmit: true, + Danger: false, }, }, ) diff --git a/pkg/server/mailactions/render.go b/pkg/server/mailactions/render.go index eba519d0e..e8d6506be 100644 --- a/pkg/server/mailactions/render.go +++ b/pkg/server/mailactions/render.go @@ -24,9 +24,10 @@ import ( var pageTmplHTML string type form struct { - ActionURL template.URL - Button string - Danger bool + ActionURL template.URL + Button string + Danger bool + AutoSubmit bool } type page struct { diff --git a/pkg/server/mailactions/templates/page.html.tmpl b/pkg/server/mailactions/templates/page.html.tmpl index 71b7c5dd2..b2c844d2d 100644 --- a/pkg/server/mailactions/templates/page.html.tmpl +++ b/pkg/server/mailactions/templates/page.html.tmpl @@ -88,11 +88,14 @@

{{.Heading}}

{{.Body}}

{{- if .Form}} -
+
+ {{- if .Form.AutoSubmit}} + + {{- end}} {{- end}}