2019-06-10 22:00:57 +00:00
|
|
|
<div class="colstack_item colstack_head">
|
|
|
|
<div class="rowitem"><h1>{{lang "panel_user_head"}}</h1></div>
|
|
|
|
</div>
|
|
|
|
<div id="panel_user" class="colstack_item the_form">
|
2019-11-04 23:32:25 +00:00
|
|
|
<form id="user_form" action="/panel/users/edit/submit/{{.User.ID}}?s={{.CurrentUser.Session}}" method="post"></form>
|
|
|
|
<form id="avatar_form" enctype="multipart/form-data" action="/panel/users/avatar/submit/{{.User.ID}}?s={{.CurrentUser.Session}}" method="post"></form>
|
|
|
|
<form id="remove_avatar_form" action="/panel/users/avatar/remove/submit/{{.User.ID}}?s={{.CurrentUser.Session}}" method="post"></form>
|
2019-06-10 22:00:57 +00:00
|
|
|
<div class="formrow">
|
|
|
|
<div class="formitem formlabel"><a>{{lang "panel_user_avatar"}}</a></div>
|
|
|
|
<div class="formitem avataritem">
|
2020-03-22 02:37:32 +00:00
|
|
|
{{if .User.RawAvatar}}<img src="{{.User.Avatar}}" height=56 width=56>{{end}}
|
2019-06-10 22:00:57 +00:00
|
|
|
<div class="avatarbuttons">
|
2020-03-22 02:37:32 +00:00
|
|
|
<input form="avatar_form" id="select_avatar" name="avatar_file" type="file" required class="auto_hide"/>
|
2019-06-11 04:36:03 +00:00
|
|
|
<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>
|
2019-11-04 23:32:25 +00:00
|
|
|
{{if .User.RawAvatar}}<button form="remove_avatar_form" name="avatar_action" value=1>{{lang "panel_user_avatar_remove"}}</button>{{end}}
|
2019-06-10 22:00:57 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="formrow">
|
|
|
|
<div class="formitem formlabel"><a>{{lang "panel_user_name"}}</a></div>
|
2020-03-22 02:37:32 +00:00
|
|
|
<div class="formitem"><input form="user_form" name="name" type="text" value="{{.User.Name}}" placeholder="{{lang "panel_user_name_placeholder"}}" autocomplete="off"/></div>
|
2016-12-23 12:35:22 +00:00
|
|
|
</div>
|
2019-06-10 22:00:57 +00:00
|
|
|
{{if .CurrentUser.Perms.EditUserPassword}}<div class="formrow">
|
|
|
|
<div class="formitem formlabel"><a>{{lang "panel_user_password"}}</a></div>
|
2020-03-22 02:37:32 +00:00
|
|
|
<div class="formitem"><input form="user_form" name="password" type="password" placeholder="*****" autocomplete="off"/></div>
|
2019-06-10 22:00:57 +00:00
|
|
|
</div>{{end}}
|
|
|
|
{{if .CurrentUser.Perms.EditUserEmail}}<div class="formrow">
|
|
|
|
<div class="formitem formlabel"><a>{{lang "panel_user_email"}}</a></div>
|
2019-11-04 23:32:25 +00:00
|
|
|
<div class="formitem">
|
|
|
|
{{if .ShowEmail}}<input form="user_form" name="show-email" value=1 type="hidden" />
|
|
|
|
<input form="user_form" name="email" type="email" value="{{.User.Email}}" placeholder="example@localhost"/>{{else}}<input form="user_form" name="email" value="-1" type="hidden"/><a href="/panel/users/edit/{{.User.ID}}?show-email=1"><button>{{lang "panel_user_show_email"}}</button></a>{{end}}
|
|
|
|
</div>
|
2019-06-10 22:00:57 +00:00
|
|
|
</div>{{end}}
|
|
|
|
{{if .CurrentUser.Perms.EditUserGroup}}
|
|
|
|
<div class="formrow">
|
|
|
|
<div class="formitem formlabel"><a>{{lang "panel_user_group"}}</a></div>
|
|
|
|
<div class="formitem">
|
2019-11-04 23:32:25 +00:00
|
|
|
<select form="user_form" name="group">
|
|
|
|
{{range .Groups}}<option{{if eq .ID $.User.Group}} selected{{end}} value={{.ID}}>{{.Name}}</option>{{end}}
|
2019-06-10 22:00:57 +00:00
|
|
|
</select>
|
2017-03-18 07:23:02 +00:00
|
|
|
</div>
|
2019-06-10 22:00:57 +00:00
|
|
|
</div>{{end}}
|
|
|
|
<div class="formrow">
|
|
|
|
<div class="formitem">
|
|
|
|
<button form="user_form" name="panel-button" class="formbutton">{{lang "panel_user_update_button"}}</button>
|
2016-12-23 12:35:22 +00:00
|
|
|
</div>
|
2019-06-10 22:00:57 +00:00
|
|
|
</div>
|
|
|
|
</div>
|