|
14 | 14 | <div class="inline required field {{if .Err_LoginType}}error{{end}}">
|
15 | 15 | <label>{{.locale.Tr "admin.users.auth_source"}}</label>
|
16 | 16 | <div class="ui selection type dropdown">
|
17 |
| - <input type="hidden" id="login_type" name="login_type" value="{{.login_type}}" data-password="required" required> |
| 17 | + <input type="hidden" id="login_type" name="login_type" value="{{.Form.LoginType}}" data-password="required" required> |
18 | 18 | <div class="text">{{.locale.Tr "admin.users.local"}}</div>
|
19 | 19 | {{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
20 | 20 | <div class="menu">
|
|
29 | 29 | <div class="inline field {{if .Err_Visibility}}error{{end}}">
|
30 | 30 | <span class="inline required field"><label for="visibility">{{.locale.Tr "settings.visibility"}}</label></span>
|
31 | 31 | <div class="ui selection type dropdown">
|
32 |
| - <input type="hidden" id="visibility" name="visibility" value="{{if .visibility}}{{.visibility}}{{else}}{{printf "%d" .DefaultUserVisibilityMode}}{{end}}"> |
| 32 | + <input type="hidden" id="visibility" name="visibility" value="{{.Form.Visibility}}"> |
33 | 33 | <div class="text">
|
34 |
| - {{if .DefaultUserVisibilityMode.IsPublic}}{{.locale.Tr "settings.visibility.public"}}{{end}} |
35 |
| - {{if .DefaultUserVisibilityMode.IsLimited}}{{.locale.Tr "settings.visibility.limited"}}{{end}} |
36 |
| - {{if .DefaultUserVisibilityMode.IsPrivate}}{{.locale.Tr "settings.visibility.private"}}{{end}} |
| 34 | + {{if .Form.Visibility.IsPublic}}{{.locale.Tr "settings.visibility.public"}}{{end}} |
| 35 | + {{if .Form.Visibility.IsLimited}}{{.locale.Tr "settings.visibility.limited"}}{{end}} |
| 36 | + {{if .Form.Visibility.IsPrivate}}{{.locale.Tr "settings.visibility.private"}}{{end}} |
37 | 37 | </div>
|
38 | 38 | {{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
39 | 39 | <div class="menu">
|
|
50 | 50 | </div>
|
51 | 51 | </div>
|
52 | 52 |
|
53 |
| - <div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .login_type "0-0"}}gt-hidden{{end}}"> |
| 53 | + <div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .Form.LoginType "0-0"}}gt-hidden{{end}}"> |
54 | 54 | <label for="login_name">{{.locale.Tr "admin.users.auth_login_name"}}</label>
|
55 |
| - <input id="login_name" name="login_name" value="{{.login_name}}"> |
| 55 | + <input id="login_name" name="login_name" value="{{.Form.LoginName}}"> |
56 | 56 | </div>
|
57 | 57 | <div class="required field {{if .Err_UserName}}error{{end}}">
|
58 | 58 | <label for="user_name">{{.locale.Tr "username"}}</label>
|
59 |
| - <input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required> |
| 59 | + <input id="user_name" type="text" name="user_name" value="{{.Form.UserName}}" autofocus required> |
60 | 60 | </div>
|
61 | 61 | <div class="required field {{if .Err_Email}}error{{end}}">
|
62 | 62 | <label for="email">{{.locale.Tr "email"}}</label>
|
63 |
| - <input id="email" name="email" type="email" value="{{.email}}" required> |
| 63 | + <input id="email" name="email" type="email" value="{{.Form.Email}}" required> |
64 | 64 | </div>
|
65 |
| - <div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}gt-hidden{{end}}"> |
| 65 | + <div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .Form.LoginType "0-0")}}gt-hidden{{end}}"> |
66 | 66 | <label for="password">{{.locale.Tr "password"}}</label>
|
67 |
| - <input id="password" name="password" type="password" autocomplete="new-password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}> |
| 67 | + <input id="password" name="password" type="password" autocomplete="new-password" value="{{.Form.Password}}" {{if eq .Form.LoginType "0-0"}}required{{end}}> |
68 | 68 | </div>
|
69 | 69 |
|
70 |
| - <div class="inline field local {{if ne .login_type "0-0"}}gt-hidden{{end}}"> |
| 70 | + <div class="inline field local {{if ne .Form.LoginType "0-0"}}gt-hidden{{end}}"> |
71 | 71 | <div class="ui checkbox">
|
72 | 72 | <label><strong>{{.locale.Tr "auth.allow_password_change"}}</strong></label>
|
73 |
| - <input name="must_change_password" type="checkbox" checked> |
| 73 | + <input name="must_change_password" type="checkbox" {{if .Form.MustChangePassword}}checked{{end}}> |
74 | 74 | </div>
|
75 | 75 | </div>
|
76 | 76 |
|
|
79 | 79 | <div class="inline field">
|
80 | 80 | <div class="ui checkbox">
|
81 | 81 | <label><strong>{{.locale.Tr "admin.users.send_register_notify"}}</strong></label>
|
82 |
| - <input name="send_notify" type="checkbox" {{if .send_notify}}checked{{end}}> |
| 82 | + <input name="send_notify" type="checkbox" {{if .Form.SendNotify}}checked{{end}}> |
83 | 83 | </div>
|
84 | 84 | </div>
|
85 | 85 | {{end}}
|
|
0 commit comments