let admins and users change usernames
This commit is contained in:
11
server/assets/pages/change_own_username.tmpl
Normal file
11
server/assets/pages/change_own_username.tmpl
Normal file
@@ -0,0 +1,11 @@
|
||||
{{ define "user" }}
|
||||
<div class="padded box">
|
||||
<div class="box-title">
|
||||
<i class="mdi mdi-account-key"></i> changing account username
|
||||
</div>
|
||||
<form class="block" action="{{ path "/admin/change_own_username_do" }}" method="post">
|
||||
<input type="text" id="username" name="username" placeholder="new username">
|
||||
<input type="submit" value="change">
|
||||
</form>
|
||||
</div>
|
||||
{{ end }}
|
||||
11
server/assets/pages/change_username.tmpl
Normal file
11
server/assets/pages/change_username.tmpl
Normal file
@@ -0,0 +1,11 @@
|
||||
{{ define "user" }}
|
||||
<div class="padded box">
|
||||
<div class="box-title">
|
||||
<i class="mdi mdi-account-key"></i> changing {{ .SelectedUser.Name }}'s username
|
||||
</div>
|
||||
<form class="block" action="{{ printf "/admin/change_username_do?user=%s" .SelectedUser.Name | path }}" method="post">
|
||||
<input type="text" id="username" name="username" placeholder="new username">
|
||||
<input type="submit" value="change">
|
||||
</form>
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -61,7 +61,9 @@
|
||||
<i>{{ $user.Name }}</i>
|
||||
<span class="text-light no-small">{{ $user.CreatedAt | date }}</span>
|
||||
<span class="text-light">|</span>
|
||||
<a href="{{ printf "/admin/change_password?user=%s" $user.Name | path }}">change password…</a>
|
||||
<a href="{{ printf "/admin/change_username?user=%s" $user.Name | path }}">username…</a>
|
||||
<span class="text-light">|</span>
|
||||
<a href="{{ printf "/admin/change_password?user=%s" $user.Name | path }}">password…</a>
|
||||
<span class="text-light">|</span>
|
||||
{{ if $user.IsAdmin }}
|
||||
<span class="text-light">delete…</span>
|
||||
@@ -78,6 +80,8 @@
|
||||
<i class="mdi mdi-account"></i> your account
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<a href="{{ path "/admin/change_own_username" }}" class="button">change username…</a>
|
||||
<span class="text-light">|</span>
|
||||
<a href="{{ path "/admin/change_own_password" }}" class="button">change password…</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user