diff options
author | Giteabot <teabot@gitea.io> | 2023-08-24 19:40:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-24 11:40:55 +0000 |
commit | 4af872178ebd53ac391939908afa7d95ac311b65 (patch) | |
tree | 1f7b7f6214338898fbddef5ee008a10b04b5efe2 | |
parent | 508c624e996d33ad735327bc4583b990adf94d16 (diff) | |
download | gitea-4af872178ebd53ac391939908afa7d95ac311b65.tar.gz gitea-4af872178ebd53ac391939908afa7d95ac311b65.zip |
Make issue template field template access correct template data (#26698) (#26709)
Backport #26698 by @wxiaoguang
Regression of #23092, the `{{$field := .}}` was missing during that
refactoring.
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
-rw-r--r-- | templates/repo/issue/fields/checkboxes.tmpl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/templates/repo/issue/fields/checkboxes.tmpl b/templates/repo/issue/fields/checkboxes.tmpl index 80835b649a..035ad8e539 100644 --- a/templates/repo/issue/fields/checkboxes.tmpl +++ b/templates/repo/issue/fields/checkboxes.tmpl @@ -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> |