File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,8 @@ func NewFuncMap() []template.FuncMap {
236
236
"CommentMustAsDiff" : gitdiff .CommentMustAsDiff ,
237
237
"MirrorAddress" : mirror_service .Address ,
238
238
"MirrorFullAddress" : mirror_service .AddressNoCredentials ,
239
+ "MirrorUserName" : mirror_service .Username ,
240
+ "MirrorPassword" : mirror_service .Password ,
239
241
}}
240
242
}
241
243
Original file line number Diff line number Diff line change 88
88
<i class="icon dropdown"></i>
89
89
<label for="">{{.i18n.Tr "repo.need_auth"}}</label>
90
90
</label>
91
- <div class="content {{if .Err_Auth}}active{{else if .Mirror.Username }}active{{end}}">
91
+ <div class="content {{if .Err_Auth}}active{{else if (MirrorUserName .Mirror) }}active{{end}}">
92
92
<div class="inline field {{if .Err_Auth}}error{{end}}">
93
93
<label for="mirror_username">{{.i18n.Tr "username"}}</label>
94
- <input id="mirror_username" name="mirror_username" value="{{.Mirror.Username }}" {{if not .mirror_username}}data-need-clear="true"{{end}}>
94
+ <input id="mirror_username" name="mirror_username" value="{{MirrorUserName .Mirror}}" {{if not .mirror_username}}data-need-clear="true"{{end}}>
95
95
</div>
96
96
<input class="fake" type="password">
97
97
<div class="inline field {{if .Err_Auth}}error{{end}}">
98
98
<label for="mirror_password">{{.i18n.Tr "password"}}</label>
99
- <input id="mirror_password" name="mirror_password" type="password" value="{{.Mirror.Password }}" {{if not .mirror_password}}data-need-clear="true"{{end}}>
99
+ <input id="mirror_password" name="mirror_password" type="password" value="{{MirrorPassword .Mirror}}" {{if not .mirror_password}}data-need-clear="true"{{end}}>
100
100
</div>
101
101
</div>
102
102
</div>
You can’t perform that action at this time.
0 commit comments