Skip to content

Commit aa4c7a1

Browse files
zeripathWazzaps
authored andcommitted
fix lint
Signed-off-by: Andrew Thornton <art27@cantab.net>
1 parent 88bf8b8 commit aa4c7a1

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

modules/context/repo.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import (
1515
"path"
1616
"strings"
1717

18-
"gopkg.in/yaml.v2"
19-
2018
"code.gitea.io/gitea/models"
2119
"code.gitea.io/gitea/models/db"
2220
git_model "code.gitea.io/gitea/models/git"
@@ -37,6 +35,7 @@ import (
3735
asymkey_service "code.gitea.io/gitea/services/asymkey"
3836

3937
"github.com/editorconfig/editorconfig-core-go/v2"
38+
"gopkg.in/yaml.v2"
4039
)
4140

4241
// IssueTemplateDirCandidates issue templates directory

templates/repo/issue/comment_tab.tmpl

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@
22
<input type="hidden" name="form-type" value="{{.IssueFormTemplate.FileName}}">
33
{{range $field_idx, $field := .IssueFormTemplate.Fields}}
44
{{- if $field.Attributes.label}}<h3 id="form-label-{{$field_idx}}">{{$field.Attributes.label}}</h3>{{end}}
5-
{{- if $field.Attributes.description}}<div>{{RenderMarkdownToHtml $field.Attributes.description}}</div>{{end}}
5+
{{- if $field.Attributes.description}}<div>{{RenderMarkdownToHtml $field.Attributes.description}}</div>{{end}}
66

7-
{{- if eq .Type "markdown"}}
7+
{{- if eq .Type "markdown"}}
88
<div>{{RenderMarkdownToHtml $field.Attributes.value}}</div>
99
{{else if eq .Type "input"}}
1010
<input type="text"
11-
aria-labelledby="form-label-{{$field_idx}}"
12-
name="form-field-{{$field.ID}}"
13-
id="form-field-{{$field.ID}}"
14-
placeholder="{{$field.Attributes.placeholder}}"
15-
value="{{$field.Attributes.value}}"
16-
{{- if .Validations.required}}required{{end}} />
11+
aria-labelledby="form-label-{{$field_idx}}"
12+
name="form-field-{{$field.ID}}"
13+
id="form-field-{{$field.ID}}"
14+
placeholder="{{$field.Attributes.placeholder}}"
15+
value="{{$field.Attributes.value}}"
16+
{{- if .Validations.required}}required{{end}} />
1717
{{else if eq .Type "textarea"}}
1818
{{- if .Attributes.render}}
1919
<input type="hidden" name="attrs-form-field-{{$field.ID}}" value="{&quot;render&quot;: &quot;{{.Attributes.render}}&quot;}">
2020
{{end}}
2121
<textarea aria-labelledby="form-label-{{$field_idx}}"
2222
name="form-field-{{$field.ID}}"
23-
id="form-field-{{$field.ID}}"
24-
placeholder="{{$field.Attributes.placeholder}}"
25-
{{- if .Attributes.render}}class="no-easymde"{{end}}
26-
{{- if .Validations.required}}required{{end}}>{{$field.Attributes.value}}</textarea>
23+
id="form-field-{{$field.ID}}"
24+
placeholder="{{$field.Attributes.placeholder}}"
25+
{{- if .Attributes.render}}class="no-easymde"{{end}}
26+
{{- if .Validations.required}}required{{end}}>{{$field.Attributes.value}}</textarea>
2727
{{else if eq .Type "dropdown"}}
2828
{{/* TODO: work with .Attribtes.multiple */}}
2929
<select aria-labelledby="form-label-{{$field_idx}}"
@@ -38,10 +38,10 @@
3838
{{range $chk_id, $chk := $field.Attributes.options}}
3939
<label>
4040
<input type="checkbox"
41-
name="form-field-{{$field.ID}}-{{$chk_id}}"
42-
id="form-field-{{$field.ID}}-{{$chk_id}}"
43-
{{if .checked}}checked{{end}}
44-
{{if .required}}required{{end}} />
41+
name="form-field-{{$field.ID}}-{{$chk_id}}"
42+
id="form-field-{{$field.ID}}-{{$chk_id}}"
43+
{{if .checked}}checked{{end}}
44+
{{if .required}}required{{end}} />
4545
{{.label}}{{if .required}} <span style="color: orangered;">*</span>{{end}}
4646
</label><br>
4747
{{end}}

0 commit comments

Comments
 (0)