This repository has no description
1{{ define "repo/pulls/fragments/pullEdit" }}
2<form
3 hx-post="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/edit"
4 hx-trigger="submit, keydown[(ctrlKey || metaKey) && key=='Enter'] from:(find input[type=text],find textarea)"
5 hx-swap="none"
6 hx-indicator="find button[type=submit]"
7>
8 <div class="flex flex-col gap-2">
9 <div>
10 <label for="title">Title</label>
11 <input type="text" name="title" id="title" class="w-full" value="{{ .Pull.Title }}" />
12 </div>
13 <div>
14 <label for="body">Body</label>
15 {{ template "fragments/markdownEditor"
16 (dict "Name" "body"
17 "Value" .Pull.Body
18 "BlobName" "blob"
19 "Rows" 15
20 "Placeholder" "Describe your pull request. Markdown is supported.") }}
21 </div>
22 <div class="flex justify-between">
23 <div id="pulls" class="error"></div>
24 <div class="flex gap-2 items-stretch">
25 <a
26 class="btn flex items-center gap-2 no-underline hover:no-underline"
27 type="button"
28 href="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}"
29 >
30 {{ i "x" "size-4" }}
31 Cancel
32 </a>
33 <button type="submit" class="btn-create group flex items-center gap-2">
34 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }}
35 {{ i "pencil" "size-4 inline group-[.htmx-request]:hidden" }}
36 edit
37 </button>
38 </div>
39 </div>
40 </div>
41</form>
42{{ end }}