summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorhazycora <hazysu@riseup.net>2023-09-26 07:34:09 +0200
committerhazycora <hazysu@riseup.net>2024-04-03 22:12:15 +0200
commita6f068a93bda0ad501d793ad36448301941a1fa3 (patch)
treecced467e1e7fa5f0c9dddcb0aa7240eaee00a1ca /routers
parentadd pronoun field to user profiles (diff)
downloadforgejo-a6f068a93bda0ad501d793ad36448301941a1fa3.tar.xz
forgejo-a6f068a93bda0ad501d793ad36448301941a1fa3.zip
use dropdown for pronoun input
Diffstat (limited to 'routers')
-rw-r--r--routers/web/user/setting/profile.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/web/user/setting/profile.go b/routers/web/user/setting/profile.go
index b5d916b78f..6843340fec 100644
--- a/routers/web/user/setting/profile.go
+++ b/routers/web/user/setting/profile.go
@@ -46,6 +46,7 @@ func Profile(ctx *context.Context) {
ctx.Data["PageIsSettingsProfile"] = true
ctx.Data["AllowedUserVisibilityModes"] = setting.Service.AllowedUserVisibilityModesSlice.ToVisibleTypeSlice()
ctx.Data["DisableGravatar"] = setting.Config().Picture.DisableGravatar.Value(ctx)
+ ctx.Data["PronounsAreCustom"] = ctx.Doer.Pronouns != "he/him" && ctx.Doer.Pronouns != "she/her" && ctx.Doer.Pronouns != "they/them" && ctx.Doer.Pronouns != "it/its"
ctx.HTML(http.StatusOK, tplSettingsProfile)
}
@@ -56,6 +57,7 @@ func ProfilePost(ctx *context.Context) {
ctx.Data["PageIsSettingsProfile"] = true
ctx.Data["AllowedUserVisibilityModes"] = setting.Service.AllowedUserVisibilityModesSlice.ToVisibleTypeSlice()
ctx.Data["DisableGravatar"] = setting.Config().Picture.DisableGravatar.Value(ctx)
+ ctx.Data["PronounsAreCustom"] = ctx.Doer.Pronouns != "he/him" && ctx.Doer.Pronouns != "she/her" && ctx.Doer.Pronouns != "they/them" && ctx.Doer.Pronouns != "it/its"
if ctx.HasError() {
ctx.HTML(http.StatusOK, tplSettingsProfile)