summaryrefslogtreecommitdiffstats
path: root/templates/admin/user/edit.tmpl
blob: e9ed7836bdbd163d8fb102dfa7e8ae3ecdbd28f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{{template "ng/base/head" .}}
{{template "ng/base/header" .}}
<div id="admin-wrapper">
    <div id="setting-wrapper" class="main-wrapper">
        <div id="admin-setting" class="container clear">
            {{template "admin/nav" .}}
            <div class="grid-4-5 left">
                <div class="setting-content">
                    {{template "ng/base/alert" .}}
                    <div id="setting-content">
                        <div class="panel panel-radius">
                            <div class="panel-header">
                                <strong>{{.i18n.Tr "admin.users.edit_account"}}</strong>
                            </div>
                            <form class="form form-align panel-body" id="user-profile-form" action="{{AppRootSubUrl}}/admin/users/{{.User.Id}}" method="post" data-delete-url="/admin/users/{{.User.Id}}/delete">
					            {{.CsrfTokenHtml}}
                                <div class="field">
                                    <label class="req">{{.i18n.Tr "admin.users.auth_source"}}</label>
                                    <select id="login-type" name="logintype">
                                        <option value="0-0">{{.i18n.Tr "admin.users.local"}}</option>
									    {{$tp := .User.LoginSource}}
									    {{range $key, $val := .LoginSources}}
					  					<option value="{{$val.Type}}-{{$val.Id}}"{{if eq $val.Id $tp}} selected{{end}}>{{$val.Name}}</option>
					  					{{end}}
                                    </select>
                                </div>
                                <div class="field">
                                    <label for="loginname">{{.i18n.Tr "admin.users.auth_login_name"}}</label>
                                    <input class="ipt ipt-large ipt-radius {{if .Err_LoginName}}ipt-error{{end}}" id="loginname" name="loginname" value="{{.User.LoginName}}" />
                                </div>
                                <div class="field">
                                    <label>{{.i18n.Tr "username"}}</label>
                                    <label>{{.User.Name}}</label>
                                </div>
                                <div class="field">
                                    <label class="req" for="email">{{.i18n.Tr "email"}}</label>
                                    <input class="ipt ipt-large ipt-radius {{if .Err_Email}}ipt-error{{end}}" id="email" name="email" type="email" value="{{.User.Email}}" required/>
                                </div>
                                <div class="field pwd">
                                    <label for="password">{{.i18n.Tr "password"}}</label>
                                    <input class="ipt ipt-large ipt-radius {{if .Err_Password}}ipt-error{{end}}" id="password" name="password" type="password" />
                                </div>
	                            <div class="field">
	                                <label for="website">{{.i18n.Tr "settings.website"}}</label>
	                                <input class="ipt ipt-large ipt-radius {{if .Err_Website}}ipt-error{{end}}" id="website" name="website" type="url" value="{{.User.Website}}" />
	                            </div>
	                            <div class="field">
	                                <label for="location">{{.i18n.Tr "settings.location"}}</label>
	                                <input class="ipt ipt-large ipt-radius {{if .Err_Location}}ipt-error{{end}}" id="location" name="location" type="text" value="{{.User.Location}}" />
	                            </div>
	                            <div class="field">
	                                <label for="gravatar-email">Gravatar {{.i18n.Tr "email"}}</label>
	                                <input class="ipt ipt-large ipt-radius {{if .Err_Avatar}}ipt-error{{end}}" id="gravatar-email" name="avatar" type="text" value="{{.User.AvatarEmail}}" />
	                            </div>
	                            <div class="field">
	                                <label></label>
			                        <input type="checkbox" name="active" {{if .User.IsActive}}checked{{end}}>
			                        <strong>{{.i18n.Tr "admin.users.is_activated"}}</strong>
			                        <br>
	                                <label></label>
			                        <input type="checkbox" name="admin" {{if .User.IsAdmin}}checked{{end}}>
			                        <strong>{{.i18n.Tr "admin.users.is_admin"}}</strong>
	                            </div>
					            <div class="field">
					                <label></label>
                                	<button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "admin.users.update_profile"}}</button>
					                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					                <button class="btn btn-large btn-red btn-radius" id="user-delete">{{.i18n.Tr "admin.users.delete_account"}}</button>
					            </div>
							</form>
            			</div>
        			</div>
				</div>
			</div>
		</div>
	</div>
</div>
{{template "ng/base/footer" .}}