1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00

Make issue template field template access correct template data (#26698)

Regression of #23092, the `{{$field := .}}` was missing during that refactoring.
This commit is contained in:
wxiaoguang 2023-08-24 19:09:36 +08:00 committed by GitHub
parent a9ce570298
commit 4de2244697
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,10 +1,9 @@
<div class="field"> <div class="field">
{{template "repo/issue/fields/header" .}} {{template "repo/issue/fields/header" .}}
{{$field := .}}
{{range $i, $opt := .item.Attributes.options}} {{range $i, $opt := .item.Attributes.options}}
<div class="field"> <div class="field">
<div class="ui checkbox"> <div class="ui checkbox">
<input type="checkbox" name="form-field-{{$field.ID}}-{{$i}}" {{if $opt.required}}readonly checked{{end}}> <input type="checkbox" name="form-field-{{$.item.ID}}-{{$i}}" {{if $opt.required}}readonly checked{{end}}>
<label>{{$opt.label}}</label> <label>{{$opt.label}}</label>
</div> </div>
</div> </div>