27 lines
1.1 KiB
Cheetah
27 lines
1.1 KiB
Cheetah
{{ define "user" }}
|
|
<div class="padded box">
|
|
<div class="box-title">
|
|
<i class="mdi mdi-account-key"></i> changing {{ .SelectedUser.Name }}'s avatar
|
|
</div>
|
|
{{ if ne (len .SelectedUser.Avatar) 0 }}
|
|
<form class="block" action="{{ printf "/admin/delete_avatar_do?user=%s" .SelectedUser.Name | path }}" method="post">
|
|
<input type="submit" value="delete avatar">
|
|
</form>
|
|
{{ end }}
|
|
<form
|
|
class="block file-upload"
|
|
enctype="multipart/form-data"
|
|
action="{{ printf "/admin/change_avatar_do?user=%s" .SelectedUser.Name | path }}"
|
|
method="post"
|
|
>
|
|
<div style="position: relative;">
|
|
<input style="position: absolute; opacity: 0;" name="avatar" type="file" accept="image/jpeg image/png image/gif" />
|
|
<input type="button" value="upload avatar">
|
|
</div>
|
|
{{ if ne (len .SelectedUser.Avatar) 0 }}
|
|
<p><img class="avatar-preview" src="data:image/jpg;base64,{{ .SelectedUser.Avatar | base64 }}"/></p>
|
|
{{ end }}
|
|
</form>
|
|
</div>
|
|
{{ end }}
|