aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-09-03 05:59:10 +0800
committerGitHub <noreply@github.com>2022-09-02 22:59:10 +0100
commit2dbed4bd9759cbcc4acbe0864e81c7bf3f48b3de (patch)
tree3d21726faf1f6ff2526849b7c525ecb148fc1728
parentc8ded77680db7344c8dc1ccee76bce0b4e02e103 (diff)
downloadgitea-2dbed4bd9759cbcc4acbe0864e81c7bf3f48b3de.tar.gz
gitea-2dbed4bd9759cbcc4acbe0864e81c7bf3f48b3de.zip
Fix the quick-submit for pending review comment (#20992)
If there is only one "Add comment" button (when there are pending review comments), the quick-submit should submit the form with is_review=true even if the "Add comment" button is not really clicked. Close #20990
-rw-r--r--templates/repo/diff/comment_form.tmpl2
1 files changed, 2 insertions, 0 deletions
diff --git a/templates/repo/diff/comment_form.tmpl b/templates/repo/diff/comment_form.tmpl
index b3b211bdb3..9325c754ce 100644
--- a/templates/repo/diff/comment_form.tmpl
+++ b/templates/repo/diff/comment_form.tmpl
@@ -29,6 +29,8 @@
<input type="hidden" name="reply" value="{{$.reply}}">
{{else}}
{{if $.root.CurrentReview}}
+ {{/* if there is only one "Add comment" button, the quick-submit should submit the form with is_review=true even if the "Add comment" button is not really clicked */}}
+ <input type="hidden" name="is_review" value="true">
<button name="is_review" value="true" type="submit"
class="ui submit green tiny button btn-add-comment">{{$.root.locale.Tr "repo.diff.comment.add_review_comment"}}</button>
{{else}}