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">
|
2020-04-03 02:09:43 +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-23 05:31:17 +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-04-03 02:09:43 +00:00
|
|
|
<input form="avatar_form"id="select_avatar"name="avatar_file"type="file" required class="auto_hide">
|
|
|
|
<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 .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-04-03 02:09:43 +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-04-03 02:09:43 +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">
|
2020-04-03 02:09:43 +00:00
|
|
|
{{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}}
|
2019-11-04 23:32:25 +00:00
|
|
|
</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">
|
2020-04-03 02:09:43 +00:00
|
|
|
<select form="user_form"name="group">
|
2019-11-04 23:32:25 +00:00
|
|
|
{{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">
|
2020-04-03 02:09:43 +00:00
|
|
|
<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>
|