github.com/Azareal/Gosora@v0.0.0-20210729070923-553e66b59003/templates/panel_user_edit.html (about)

     1  <div class="colstack_item colstack_head">
     2  	<div class="rowitem"><h1>{{lang "panel_user_head"}}</h1></div>
     3  </div>
     4  <div id="panel_user" class="colstack_item the_form">
     5  	<form id="user_form"action="/panel/users/edit/submit/{{.User.ID}}?s={{.CurrentUser.Session}}"method="post"></form>
     6  	<form id="avatar_form"enctype="multipart/form-data"action="/panel/users/avatar/submit/{{.User.ID}}?s={{.CurrentUser.Session}}"method="post"></form>
     7  	<form id="remove_avatar_form"action="/panel/users/avatar/remove/submit/{{.User.ID}}?s={{.CurrentUser.Session}}"method="post"></form>
     8  	<div class="formrow">
     9  		<div class="formitem formlabel"><a>{{lang "panel_user_avatar"}}</a></div>
    10  		<div class="formitem avataritem">
    11  			{{if .User.RawAvatar}}<img src="{{.User.Avatar}}"height=56 width=56>{{end}}
    12  			<div class="avatarbuttons">
    13  				<input form="avatar_form"id="select_avatar"name="avatar_file"type="file"required class="auto_hide">
    14  				<label for="select_avatar"class="formbutton">{{lang "panel_user_avatar_select"}}</label>
    15  				<button form="avatar_form"name="avatar_action"value=0>{{lang "panel_user_avatar_upload"}}</button>
    16  				{{if .User.RawAvatar}}<button form="remove_avatar_form"name="avatar_action"value=1>{{lang "panel_user_avatar_remove"}}</button>{{end}}
    17  			</div>
    18  		</div>
    19  	</div>
    20  	<div class="formrow">
    21  		<div class="formitem formlabel"><a>{{lang "panel_user_name"}}</a></div>
    22  		<div class="formitem"><input form="user_form"name="name"type="text"value="{{.User.Name}}"placeholder="{{lang "panel_user_name_placeholder"}}"autocomplete="off"></div>
    23  	</div>
    24  	{{if .CurrentUser.Perms.EditUserPassword}}<div class="formrow">
    25  		<div class="formitem formlabel"><a>{{lang "panel_user_password"}}</a></div>
    26  		<div class="formitem"><input form="user_form"name="password"type="password"placeholder="*****"autocomplete="off"></div>
    27  	</div>{{end}}
    28  	{{if .CurrentUser.Perms.EditUserEmail}}<div class="formrow">
    29  		<div class="formitem formlabel"><a>{{lang "panel_user_email"}}</a></div>
    30  		<div class="formitem">
    31  			{{if .ShowEmail}}<input form="user_form"name="show-email"value=1 type="hidden">
    32  			<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}}
    33  		</div>
    34  	</div>{{end}}
    35  	{{if .CurrentUser.Perms.EditUserGroup}}
    36  	<div class="formrow">
    37  		<div class="formitem formlabel"><a>{{lang "panel_user_group"}}</a></div>
    38  		<div class="formitem">
    39  			<select form="user_form"name="group">
    40  			{{range .Groups}}<option{{if eq .ID $.User.Group}} selected{{end}} value={{.ID}}>{{.Name}}</option>{{end}}
    41  			</select>
    42  		</div>
    43  	</div>{{end}}
    44  	<div class="formrow">
    45  		<div class="formitem">
    46  			<button form="user_form"name="panel-button" class="formbutton">{{lang "panel_user_update_button"}}</button>
    47  		</div>
    48  	</div>
    49  </div>