aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2023-08-24 19:40:55 +0800
committerGitHub <noreply@github.com>2023-08-24 11:40:55 +0000
commit4af872178ebd53ac391939908afa7d95ac311b65 (patch)
tree1f7b7f6214338898fbddef5ee008a10b04b5efe2
parent508c624e996d33ad735327bc4583b990adf94d16 (diff)
downloadgitea-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.tmpl3
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>