0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-27 17:43:41 +01:00
gitea/templates/repo/issue/new_form.tmpl

74 lines
3.1 KiB
Handlebars
Raw Normal View History

{{if .Flash}}
{{template "base/alert" .}}
{{end}}
<form class="issue-content ui comment form form-fetch-action" id="new-issue" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="issue-content-left">
<div class="ui comments">
<div class="comment">
{{ctx.AvatarUtils.Avatar .SignedUser 40}}
<div class="ui segment content tw-my-0">
<div class="field">
<input name="title" class="js-autofocus-end" id="issue_title" placeholder="{{ctx.Locale.Tr "repo.milestones.title"}}" value="{{if .TitleQuery}}{{.TitleQuery}}{{else if .IssueTemplateTitle}}{{.IssueTemplateTitle}}{{else}}{{.title}}{{end}}" required maxlength="255" autocomplete="off">
{{if .PageIsComparePull}}
<div class="title_wip_desc" data-wip-prefixes="{{JsonUtils.EncodeToString .PullRequestWorkInProgressPrefixes}}">{{ctx.Locale.Tr "repo.pulls.title_wip_desc" (index .PullRequestWorkInProgressPrefixes 0)}}</div>
{{end}}
</div>
{{if .Fields}}
<input type="hidden" name="template-file" value="{{.TemplateFile}}">
{{range .Fields}}
{{if eq .Type "input"}}
{{template "repo/issue/fields/input" dict "item" .}}
{{else if eq .Type "markdown"}}
{{template "repo/issue/fields/markdown" dict "item" .}}
{{else if eq .Type "textarea"}}
{{template "repo/issue/fields/textarea" dict "item" . "root" $}}
{{else if eq .Type "dropdown"}}
{{template "repo/issue/fields/dropdown" dict "item" .}}
{{else if eq .Type "checkboxes"}}
{{template "repo/issue/fields/checkboxes" dict "item" .}}
{{end}}
{{end}}
{{else}}
{{template "repo/issue/comment_tab" .}}
{{end}}
<div class="text right">
<button class="ui primary button">
2015-08-31 09:24:28 +02:00
{{if .PageIsComparePull}}
{{ctx.Locale.Tr "repo.pulls.create"}}
2015-08-31 09:24:28 +02:00
{{else}}
{{ctx.Locale.Tr "repo.issues.create"}}
2015-08-31 09:24:28 +02:00
{{end}}
2015-08-09 19:04:23 +02:00
</button>
</div>
</div>
</div>
</div>
</div>
2015-08-09 19:04:23 +02:00
<div class="issue-content-right ui segment">
{{template "repo/issue/branch_selector_field" $}}{{/* TODO: RemoveIssueRef: template "repo/issue/branch_selector_field" $*/}}
{{if .PageIsComparePull}}
{{template "repo/issue/sidebar/reviewer_list" $.IssuePageMetaData}}
<div class="divider"></div>
{{end}}
{{template "repo/issue/sidebar/label_list" $.IssuePageMetaData}}
{{template "repo/issue/sidebar/milestone_list" $.IssuePageMetaData}}
{{if .IsProjectsEnabled}}
{{template "repo/issue/sidebar/project_list" $.IssuePageMetaData}}
{{end}}
{{template "repo/issue/sidebar/assignee_list" $.IssuePageMetaData}}
{{if and .PageIsComparePull (not (eq .HeadRepo.FullName .BaseCompareRepo.FullName)) .CanWriteToHeadRepo}}
<div class="divider"></div>
<div class="ui checkbox">
<label data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}"><strong>{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label>
<input name="allow_maintainer_edit" type="checkbox" {{if .AllowMaintainerEdit}}checked{{end}}>
</div>
{{end}}
</div>
<input type="hidden" name="redirect_after_creation" value="{{.redirect_after_creation}}">
</form>