form: add pre-signup card

same as the post-signup card, but shown on the sidebar.
This commit is contained in:
Harvey Tindall
2025-12-02 14:56:15 +00:00
parent a4b94b4f45
commit 6e31a7e2dd
5 changed files with 50 additions and 1 deletions

View File

@@ -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{