From f7780098dbb5491acc0652c2a1b23b06d23b4c66 Mon Sep 17 00:00:00 2001 From: Azareal Date: Tue, 11 Jun 2019 14:36:03 +1000 Subject: [PATCH] Localise the avatar bits too in the User Manager. --- langs/english.json | 3 +++ routes/panel/users.go | 1 + templates/panel_user_edit.html | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/langs/english.json b/langs/english.json index f2a93f6a..4b402049 100644 --- a/langs/english.json +++ b/langs/english.json @@ -797,6 +797,9 @@ "panel_user_head":"User Editor", "panel_user_avatar":"Avatar", + "panel_user_avatar_select":"Select", + "panel_user_avatar_upload":"Upload", + "panel_user_avatar_remove":"Remove", "panel_user_name":"Name", "panel_user_name_placeholder":"Jane Doe", "panel_user_password":"Password", diff --git a/routes/panel/users.go b/routes/panel/users.go index 2453205c..84f47374 100644 --- a/routes/panel/users.go +++ b/routes/panel/users.go @@ -167,6 +167,7 @@ func UsersAvatarSubmit(w http.ResponseWriter, r *http.Request, user c.User, suid if ferr != nil { return ferr } + // TODO: Check the UploadAvatars permission too? if !user.Perms.EditUser { return c.NoPermissions(w, r, user) } diff --git a/templates/panel_user_edit.html b/templates/panel_user_edit.html index d0cd2817..bf4344d0 100644 --- a/templates/panel_user_edit.html +++ b/templates/panel_user_edit.html @@ -11,9 +11,9 @@ {{if .Something.RawAvatar}}{{end}}
- - - {{if .Something.RawAvatar}}{{end}} + + + {{if .Something.RawAvatar}}{{end}}