Skip to content

Commit 0ed62db

Browse files
authored
Prefill input values in oauth settings as intended (#23829)
1 parent fbd4eac commit 0ed62db

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

templates/admin/auth/source/oauth.tmpl

+7-7
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,16 @@
7474

7575
<div class="field">
7676
<label for="oauth2_scopes">{{.locale.Tr "admin.auths.oauth2_scopes"}}</label>
77-
<input id="oauth2_scopes" name="oauth2_scopes" values="{{.oauth2_scopes}}">
77+
<input id="oauth2_scopes" name="oauth2_scopes" value="{{.oauth2_scopes}}">
7878
</div>
7979
<div class="field">
8080
<label for="oauth2_required_claim_name">{{.locale.Tr "admin.auths.oauth2_required_claim_name"}}</label>
81-
<input id="oauth2_required_claim_name" name="oauth2_required_claim_name" values="{{.oauth2_required_claim_name}}">
81+
<input id="oauth2_required_claim_name" name="oauth2_required_claim_name" value="{{.oauth2_required_claim_name}}">
8282
<p class="help">{{.locale.Tr "admin.auths.oauth2_required_claim_name_helper"}}</p>
8383
</div>
8484
<div class="field">
8585
<label for="oauth2_required_claim_value">{{.locale.Tr "admin.auths.oauth2_required_claim_value"}}</label>
86-
<input id="oauth2_required_claim_value" name="oauth2_required_claim_value" values="{{.oauth2_required_claim_value}}">
86+
<input id="oauth2_required_claim_value" name="oauth2_required_claim_value" value="{{.oauth2_required_claim_value}}">
8787
<p class="help">{{.locale.Tr "admin.auths.oauth2_required_claim_value_helper"}}</p>
8888
</div>
8989
<div class="field">
@@ -92,18 +92,18 @@
9292
</div>
9393
<div class="field">
9494
<label for="oauth2_admin_group">{{.locale.Tr "admin.auths.oauth2_admin_group"}}</label>
95-
<input id="oauth2_admin_group" name="oauth2_admin_group" value="{{.oauth2_group_claim_name}}">
95+
<input id="oauth2_admin_group" name="oauth2_admin_group" value="{{.oauth2_admin_group}}">
9696
</div>
9797
<div class="field">
9898
<label for="oauth2_restricted_group">{{.locale.Tr "admin.auths.oauth2_restricted_group"}}</label>
99-
<input id="oauth2_restricted_group" name="oauth2_restricted_group" value="{{.oauth2_group_claim_name}}">
99+
<input id="oauth2_restricted_group" name="oauth2_restricted_group" value="{{.oauth2_restricted_group}}">
100100
</div>
101101
<div class="field">
102102
<label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team"}}</label>
103-
<input name="oauth2_group_team_map" value="{{.group_team_map}}" placeholder='e.g. {"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>
103+
<input name="oauth2_group_team_map" value="{{.oauth2_group_team_map}}" placeholder='e.g. {"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>
104104
</div>
105105
<div class="ui checkbox">
106106
<label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team_removal"}}</label>
107-
<input name="oauth2_group_team_map_removal" type="checkbox" {{if .group_team_map_removal}}checked{{end}}>
107+
<input name="oauth2_group_team_map_removal" type="checkbox" {{if .oauth2_group_team_map_removal}}checked{{end}}>
108108
</div>
109109
</div>

0 commit comments

Comments
 (0)