Skip to content

Commit

Permalink
Fix the quick-submit for pending review comment (#20992)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
wxiaoguang authored Sep 2, 2022
1 parent c8ded77 commit 2dbed4b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/repo/diff/comment_form.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down

0 comments on commit 2dbed4b

Please sign in to comment.