This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / appview / pages / templates / repo / issues / fragments / putIssue.html
1.9 kB 55 lines
1{{ define "repo/issues/fragments/putIssue" }} 2<!-- this form is used for new and edit, .Issue is passed when editing --> 3<form 4 {{ if eq .Action "edit" }} 5 hx-post="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/edit" 6 {{ else }} 7 hx-post="/{{ .RepoInfo.FullName }}/issues/new" 8 {{ end }} 9 hx-trigger="submit, keydown[(ctrlKey || metaKey) && key=='Enter'] from:(#title,#body)" 10 hx-swap="none" 11 class="group"> 12 <div class="flex flex-col gap-2"> 13 <div> 14 <label for="title">Title</label> 15 <input type="text" name="title" id="title" class="w-full" value="{{ if .Issue }}{{ .Issue.Title }}{{ end }}" /> 16 </div> 17 <div> 18 <label for="body">Body</label> 19 <textarea 20 name="body" 21 id="body" 22 rows="15" 23 class="w-full resize-y" 24 placeholder="Describe your issue. Markdown is supported." 25 >{{ if .Issue }}{{ .Issue.Body }}{{ end }}</textarea> 26 </div> 27 <div class="flex justify-between"> 28 <div id="issues" class="error"></div> 29 <div class="flex gap-2 items-stretch"> 30 <a 31 class="btn flex items-center gap-2 no-underline hover:no-underline" 32 type="button" 33 {{ if .Issue }} 34 href="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}" 35 {{ else }} 36 href="/{{ .RepoInfo.FullName }}/issues" 37 {{ end }} 38 > 39 {{ i "x" "w-4 h-4" }} 40 Cancel 41 </a> 42 <button type="submit" class="btn-create flex items-center gap-2"> 43 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} 44 {{ if eq .Action "edit" }} 45 {{ i "pencil" "w-4 h-4 inline group-[.htmx-request]:hidden" }} 46 {{ else }} 47 {{ i "circle-plus" "w-4 h-4 inline group-[.htmx-request]:hidden" }} 48 {{ end }} 49 {{ .Action | capitalize }} 50 </button> 51 </div> 52 </div> 53 </div> 54</form> 55{{ end }}