diff --git a/api-messages.go b/api-messages.go index 0b72330..766642c 100644 --- a/api-messages.go +++ b/api-messages.go @@ -169,6 +169,7 @@ func (app *appContext) GetCustomMessageTemplate(gc *gin.Context) { case "UserPage": case "UserLogin": case "PostSignupCard": + case "PreSignupCard": // These don't have any example content msg = nil } diff --git a/customcontent.go b/customcontent.go index 0b199e3..b0f4932 100644 --- a/customcontent.go +++ b/customcontent.go @@ -352,9 +352,31 @@ var customContent = map[string]CustomContentInfo{ "myAccountURL", ), Placeholders: defaultVals(map[string]any{ - "myAccountURL": "https://sub2.test.url/my/account", + "myAccountURL": "https://example.url/my/account", }), }, + "PreSignupCard": { + Name: "PreSignupCard", + ContentType: CustomCard, + DisplayName: func(dict *Lang, lang string) string { + if _, ok := dict.Admin[lang]; !ok { + lang = dict.chosenAdminLang + } + return dict.Admin[lang].Strings["preSignupCard"] + }, + Description: func(dict *Lang, lang string) string { + if _, ok := dict.Admin[lang]; !ok { + lang = dict.chosenAdminLang + } + return dict.Admin[lang].Strings["preSignupCardDescription"] + }, + Variables: []string{ + "myAccountURL", + }, + Placeholders: map[string]any{ + "myAccountURL": "https://example.url/my/account", + }, + }, } var EmptyCustomContent = CustomContentInfo{ diff --git a/html/form.html b/html/form.html index acfbf29..030a78d 100644 --- a/html/form.html +++ b/html/form.html @@ -125,6 +125,11 @@ {{ if .fromUser }} {{ end }} + {{ if .preSignupCard }} +