[BUG] Fix manual merge button

- Backport of #2696
- Add `form-fetch-action` to indicate that this form POST to an link
that returns JSON and thus should be handled by Javascript code.
- Found by @fnetx
- Regression of https://codeberg.org/forgejo/forgejo/pulls/1793

(cherry picked from commit 9551c1a6f8)
This commit is contained in:
Gusted 2024-03-19 18:47:09 +01:00
parent 0774e04d6b
commit c70719c59c
No known key found for this signature in database
GPG key ID: FD821B732837125F

View file

@ -360,7 +360,7 @@
{{if and $.StillCanManualMerge (not $showGeneralMergeForm)}}
<div class="divider"></div>
<div class="ui form">
<form action="{{.Link}}/merge" method="post">
<form action="{{.Link}}/merge" method="post" class="form-fetch-action">
{{.CsrfTokenHtml}}
<div class="field">
<input type="text" name="merge_commit_id" placeholder="{{ctx.Locale.Tr "repo.pulls.merge_commit_id"}}">