Skip to content

Commit 6befca1

Browse files
GiteaBotJakobDev
andauthored
Fix required checkboxes in issue forms (#27592) (#27692)
Backport #27592 by @JakobDev If you set a checkbox as required in a issue form at the moment, the checkbox is checked and read only, what does not make much sense. With this PR, the Checkbox actually needs to be checked. The label supports now also Markdown. This matches GitHub's behaviour. And yes, I know the CSS is a ugly workaround. It looks like the given CSS code is part Fomantic and I don't know how to change that. The Maintainers are free to change that. ![grafik](https://github.com/go-gitea/gitea/assets/15185051/3f35be75-b0b4-42a7-9048-a4970384a035) Co-authored-by: JakobDev <[email protected]>
1 parent 89d3766 commit 6befca1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
<div class="field">
22
{{template "repo/issue/fields/header" .}}
33
{{range $i, $opt := .item.Attributes.options}}
4-
<div class="field">
5-
<div class="ui checkbox">
6-
<input type="checkbox" name="form-field-{{$.item.ID}}-{{$i}}" {{if $opt.required}}readonly checked{{end}}>
7-
<label>{{$opt.label}}</label>
4+
<div class="field inline">
5+
<div class="ui checkbox gt-mr-0">
6+
<input type="checkbox" name="form-field-{{$.item.ID}}-{{$i}}" {{if $opt.required}}required{{end}}>
7+
<label>{{RenderMarkdownToHtml $.context $opt.label}}</label>
88
</div>
9+
{{if $opt.required}}
10+
<label class="required"></label>
11+
{{end}}
912
</div>
1013
{{end}}
1114
</div>

0 commit comments

Comments
 (0)