From 26a4f48e8b3b33fbfd79cc207052364fd9f5e08d Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 23 Sep 2019 10:04:45 -0400 Subject: [PATCH] Add expiration information to invite help This uses the Invite fetched from the database to explain a bit more about how the invite URL expires. It also reduces some space around the input box. Ref T690 --- invites.go | 4 ++-- templates/user/invite-instructions.tmpl | 13 +++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/invites.go b/invites.go index f9c5cce..2320906 100644 --- a/invites.go +++ b/invites.go @@ -134,11 +134,11 @@ func handleViewInvite(app *App, w http.ResponseWriter, r *http.Request) error { // show invite instructions p := struct { *UserPage - InviteID string + Invite *Invite Expired bool }{ UserPage: NewUserPage(app, r, u, "Invite to "+app.cfg.App.SiteName, nil), - InviteID: inviteCode, + Invite: i, Expired: expired, } showUserPage(w, "invite-instructions", p) diff --git a/templates/user/invite-instructions.tmpl b/templates/user/invite-instructions.tmpl index c99680a..a32eac0 100644 --- a/templates/user/invite-instructions.tmpl +++ b/templates/user/invite-instructions.tmpl @@ -3,7 +3,7 @@