|
1 | 1 | <div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}gt-hidden{{end}}">
|
2 | 2 | <div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
|
3 |
| - <label>{{.locale.Tr "admin.auths.security_protocol"}}</label> |
| 3 | + <label>{{ctx.Locale.Tr "admin.auths.security_protocol"}}</label> |
4 | 4 | <div class="ui selection security-protocol dropdown">
|
5 | 5 | <input type="hidden" id="security_protocol" name="security_protocol" value="{{.security_protocol}}">
|
6 | 6 | <div class="text">{{.CurrentSecurityProtocol}}</div>
|
|
13 | 13 | </div>
|
14 | 14 | </div>
|
15 | 15 | <div class="required field">
|
16 |
| - <label for="host">{{.locale.Tr "admin.auths.host"}}</label> |
| 16 | + <label for="host">{{ctx.Locale.Tr "admin.auths.host"}}</label> |
17 | 17 | <input id="host" name="host" value="{{.host}}" placeholder="mydomain.com">
|
18 | 18 | </div>
|
19 | 19 | <div class="required field">
|
20 |
| - <label for="port">{{.locale.Tr "admin.auths.port"}}</label> |
| 20 | + <label for="port">{{ctx.Locale.Tr "admin.auths.port"}}</label> |
21 | 21 | <input id="port" name="port" value="{{.port}}" placeholder="636">
|
22 | 22 | </div>
|
23 | 23 | <div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}">
|
24 | 24 | <div class="ui checkbox">
|
25 |
| - <label><strong>{{.locale.Tr "admin.auths.skip_tls_verify"}}</strong></label> |
| 25 | + <label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label> |
26 | 26 | <input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}>
|
27 | 27 | </div>
|
28 | 28 | </div>
|
29 | 29 | <div class="ldap field {{if not (eq .type 2)}}gt-hidden{{end}}">
|
30 |
| - <label for="bind_dn">{{.locale.Tr "admin.auths.bind_dn"}}</label> |
| 30 | + <label for="bind_dn">{{ctx.Locale.Tr "admin.auths.bind_dn"}}</label> |
31 | 31 | <input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="cn=Search,dc=mydomain,dc=com">
|
32 | 32 | </div>
|
33 | 33 | <div class="ldap field {{if not (eq .type 2)}}gt-hidden{{end}}">
|
34 |
| - <label for="bind_password">{{.locale.Tr "admin.auths.bind_password"}}</label> |
| 34 | + <label for="bind_password">{{ctx.Locale.Tr "admin.auths.bind_password"}}</label> |
35 | 35 | <input id="bind_password" name="bind_password" type="password" autocomplete="off" value="{{.bind_password}}">
|
36 | 36 | </div>
|
37 | 37 | <div class="binddnrequired {{if (eq .type 2)}}required{{end}} field">
|
38 |
| - <label for="user_base">{{.locale.Tr "admin.auths.user_base"}}</label> |
| 38 | + <label for="user_base">{{ctx.Locale.Tr "admin.auths.user_base"}}</label> |
39 | 39 | <input id="user_base" name="user_base" value="{{.user_base}}" placeholder="ou=Users,dc=mydomain,dc=com">
|
40 | 40 | </div>
|
41 | 41 | <div class="dldap required field {{if not (eq .type 5)}}gt-hidden{{end}}">
|
42 |
| - <label for="user_dn">{{.locale.Tr "admin.auths.user_dn"}}</label> |
| 42 | + <label for="user_dn">{{ctx.Locale.Tr "admin.auths.user_dn"}}</label> |
43 | 43 | <input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com">
|
44 | 44 | </div>
|
45 | 45 | <div class="required field">
|
46 |
| - <label for="filter">{{.locale.Tr "admin.auths.filter"}}</label> |
| 46 | + <label for="filter">{{ctx.Locale.Tr "admin.auths.filter"}}</label> |
47 | 47 | <input id="filter" name="filter" value="{{.filter}}" placeholder="(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))">
|
48 | 48 | </div>
|
49 | 49 | <div class="field">
|
50 |
| - <label for="admin_filter">{{.locale.Tr "admin.auths.admin_filter"}}</label> |
| 50 | + <label for="admin_filter">{{ctx.Locale.Tr "admin.auths.admin_filter"}}</label> |
51 | 51 | <input id="admin_filter" name="admin_filter" value="{{.admin_filter}}">
|
52 | 52 | </div>
|
53 | 53 | <div class="field">
|
54 |
| - <label for="restricted_filter">{{.locale.Tr "admin.auths.restricted_filter"}}</label> |
| 54 | + <label for="restricted_filter">{{ctx.Locale.Tr "admin.auths.restricted_filter"}}</label> |
55 | 55 | <input id="restricted_filter" name="restricted_filter" value="{{.restricted_filter}}">
|
56 |
| - <p class="help">{{.locale.Tr "admin.auths.restricted_filter_helper"}}</p> |
| 56 | + <p class="help">{{ctx.Locale.Tr "admin.auths.restricted_filter_helper"}}</p> |
57 | 57 | </div>
|
58 | 58 | <div class="field">
|
59 |
| - <label for="attribute_username">{{.locale.Tr "admin.auths.attribute_username"}}</label> |
60 |
| - <input id="attribute_username" name="attribute_username" value="{{.attribute_username}}" placeholder="{{.locale.Tr "admin.auths.attribute_username_placeholder"}}"> |
| 59 | + <label for="attribute_username">{{ctx.Locale.Tr "admin.auths.attribute_username"}}</label> |
| 60 | + <input id="attribute_username" name="attribute_username" value="{{.attribute_username}}" placeholder="{{ctx.Locale.Tr "admin.auths.attribute_username_placeholder"}}"> |
61 | 61 | </div>
|
62 | 62 | <div class="field">
|
63 |
| - <label for="attribute_name">{{.locale.Tr "admin.auths.attribute_name"}}</label> |
| 63 | + <label for="attribute_name">{{ctx.Locale.Tr "admin.auths.attribute_name"}}</label> |
64 | 64 | <input id="attribute_name" name="attribute_name" value="{{.attribute_name}}">
|
65 | 65 | </div>
|
66 | 66 | <div class="field">
|
67 |
| - <label for="attribute_surname">{{.locale.Tr "admin.auths.attribute_surname"}}</label> |
| 67 | + <label for="attribute_surname">{{ctx.Locale.Tr "admin.auths.attribute_surname"}}</label> |
68 | 68 | <input id="attribute_surname" name="attribute_surname" value="{{.attribute_surname}}">
|
69 | 69 | </div>
|
70 | 70 | <div class="required field">
|
71 |
| - <label for="attribute_mail">{{.locale.Tr "admin.auths.attribute_mail"}}</label> |
| 71 | + <label for="attribute_mail">{{ctx.Locale.Tr "admin.auths.attribute_mail"}}</label> |
72 | 72 | <input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="mail">
|
73 | 73 | </div>
|
74 | 74 | <div class="field">
|
75 |
| - <label for="attribute_ssh_public_key">{{.locale.Tr "admin.auths.attribute_ssh_public_key"}}</label> |
| 75 | + <label for="attribute_ssh_public_key">{{ctx.Locale.Tr "admin.auths.attribute_ssh_public_key"}}</label> |
76 | 76 | <input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{.attribute_ssh_public_key}}" placeholder="SshPublicKey">
|
77 | 77 | </div>
|
78 | 78 | <div class="field">
|
79 |
| - <label for="attribute_avatar">{{.locale.Tr "admin.auths.attribute_avatar"}}</label> |
| 79 | + <label for="attribute_avatar">{{ctx.Locale.Tr "admin.auths.attribute_avatar"}}</label> |
80 | 80 | <input id="attribute_avatar" name="attribute_avatar" value="{{.attribute_avatar}}" placeholder="jpegPhoto">
|
81 | 81 | </div>
|
82 | 82 |
|
83 | 83 | <!-- ldap group begin -->
|
84 | 84 | <div class="inline field">
|
85 | 85 | <div class="ui checkbox">
|
86 |
| - <label><strong>{{.locale.Tr "admin.auths.enable_ldap_groups"}}</strong></label> |
| 86 | + <label><strong>{{ctx.Locale.Tr "admin.auths.enable_ldap_groups"}}</strong></label> |
87 | 87 | <input type="checkbox" name="groups_enabled" class="js-ldap-group-toggle" {{if .groups_enabled}}checked{{end}}>
|
88 | 88 | </div>
|
89 | 89 | </div>
|
90 | 90 | <div id="ldap-group-options" class="ui segment secondary">
|
91 | 91 | <div class="field">
|
92 |
| - <label>{{.locale.Tr "admin.auths.group_search_base"}}</label> |
| 92 | + <label>{{ctx.Locale.Tr "admin.auths.group_search_base"}}</label> |
93 | 93 | <input name="group_dn" value="{{.group_dn}}" placeholder="ou=group,dc=mydomain,dc=com">
|
94 | 94 | </div>
|
95 | 95 | <div class="field">
|
96 |
| - <label>{{.locale.Tr "admin.auths.group_attribute_list_users"}}</label> |
| 96 | + <label>{{ctx.Locale.Tr "admin.auths.group_attribute_list_users"}}</label> |
97 | 97 | <input name="group_member_uid" value="{{.group_member_uid}}" placeholder="memberUid">
|
98 | 98 | </div>
|
99 | 99 | <div class="field">
|
100 |
| - <label>{{.locale.Tr "admin.auths.user_attribute_in_group"}}</label> |
| 100 | + <label>{{ctx.Locale.Tr "admin.auths.user_attribute_in_group"}}</label> |
101 | 101 | <input name="user_uid" value="{{.user_uid}}" placeholder="uid">
|
102 | 102 | </div>
|
103 | 103 | <div class="field">
|
104 |
| - <label>{{.locale.Tr "admin.auths.verify_group_membership"}}</label> |
| 104 | + <label>{{ctx.Locale.Tr "admin.auths.verify_group_membership"}}</label> |
105 | 105 | <input name="group_filter" value="{{.group_filter}}" placeholder="(|(cn=gitea_users)(cn=admins))">
|
106 | 106 | </div>
|
107 | 107 | <div class="field">
|
108 |
| - <label>{{.locale.Tr "admin.auths.map_group_to_team"}}</label> |
| 108 | + <label>{{ctx.Locale.Tr "admin.auths.map_group_to_team"}}</label> |
109 | 109 | <textarea name="group_team_map" rows="5" placeholder='{"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{.group_team_map}}</textarea>
|
110 | 110 | </div>
|
111 | 111 | <div class="ui checkbox">
|
112 |
| - <label>{{.locale.Tr "admin.auths.map_group_to_team_removal"}}</label> |
| 112 | + <label>{{ctx.Locale.Tr "admin.auths.map_group_to_team_removal"}}</label> |
113 | 113 | <input name="group_team_map_removal" type="checkbox" {{if .group_team_map_removal}}checked{{end}}>
|
114 | 114 | </div>
|
115 | 115 | </div>
|
116 | 116 | <!-- ldap group end -->
|
117 | 117 |
|
118 | 118 | <div class="ldap inline field {{if not (eq .type 2)}}gt-hidden{{end}}">
|
119 | 119 | <div class="ui checkbox">
|
120 |
| - <label for="use_paged_search"><strong>{{.locale.Tr "admin.auths.use_paged_search"}}</strong></label> |
| 120 | + <label for="use_paged_search"><strong>{{ctx.Locale.Tr "admin.auths.use_paged_search"}}</strong></label> |
121 | 121 | <input id="use_paged_search" name="use_paged_search" class="use-paged-search" type="checkbox" {{if .use_paged_search}}checked{{end}}>
|
122 | 122 | </div>
|
123 | 123 | </div>
|
124 | 124 | <div class="ldap field search-page-size required {{if or (not (eq .type 2)) (not .use_paged_search)}}gt-hidden{{end}}">
|
125 |
| - <label for="search_page_size">{{.locale.Tr "admin.auths.search_page_size"}}</label> |
| 125 | + <label for="search_page_size">{{ctx.Locale.Tr "admin.auths.search_page_size"}}</label> |
126 | 126 | <input id="search_page_size" name="search_page_size" value="{{.search_page_size}}">
|
127 | 127 | </div>
|
128 | 128 | <div class="optional field">
|
129 | 129 | <div class="ui checkbox">
|
130 |
| - <label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> |
| 130 | + <label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> |
131 | 131 | <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
|
132 |
| - <p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> |
| 132 | + <p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> |
133 | 133 | </div>
|
134 | 134 | </div>
|
135 | 135 | <div class="inline field">
|
136 | 136 | <div class="ui checkbox">
|
137 |
| - <label for="allow_deactivate_all"><strong>{{.locale.Tr "admin.auths.allow_deactivate_all"}}</strong></label> |
| 137 | + <label for="allow_deactivate_all"><strong>{{ctx.Locale.Tr "admin.auths.allow_deactivate_all"}}</strong></label> |
138 | 138 | <input id="allow_deactivate_all" name="allow_deactivate_all" type="checkbox" {{if .allow_deactivate_all}}checked{{end}}>
|
139 | 139 | </div>
|
140 | 140 | </div>
|
|
0 commit comments