Localise the avatar bits too in the User Manager.
This commit is contained in:
parent
ee3c29b136
commit
f7780098db
|
@ -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",
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
{{if .Something.RawAvatar}}<img src="{{.Something.Avatar}}" height=56 width=56 />{{end}}
|
||||
<div class="avatarbuttons">
|
||||
<input form="avatar_form" id="select_avatar" name="avatar_file" type="file" required class="auto_hide" />
|
||||
<label for="select_avatar" class="formbutton">Select</label>
|
||||
<button form="avatar_form" name="avatar_action" value=0>Upload</button>
|
||||
{{if .Something.RawAvatar}}<button form="remove_avatar_form" name="avatar_action" value=1>Remove</button>{{end}}
|
||||
<label for="select_avatar" class="formbutton">{{lang "panel_user_avatar_select"}}</label>
|
||||
<button form="avatar_form" name="avatar_action" value=0>{{lang "panel_user_avatar_upload"}}</button>
|
||||
{{if .Something.RawAvatar}}<button form="remove_avatar_form" name="avatar_action" value=1>{{lang "panel_user_avatar_remove"}}</button>{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue