Skip to content

Commit

Permalink
Make issue template field template access correct template data (#26698
Browse files Browse the repository at this point in the history
…) (#26709)

Backport #26698 by @wxiaoguang

Regression of #23092, the `{{$field := .}}` was missing during that
refactoring.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
  • Loading branch information
GiteaBot and wxiaoguang committed Aug 24, 2023
1 parent 508c624 commit 4af8721
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions templates/repo/issue/fields/checkboxes.tmpl
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<div class="field">
{{template "repo/issue/fields/header" .}}
{{$field := .}}
{{range $i, $opt := .item.Attributes.options}}
<div class="field">
<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>
</div>
</div>
Expand Down

0 comments on commit 4af8721

Please sign in to comment.