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
tokarchuk/v1.18
wxiaoguang 2 years ago committed by GitHub
parent c8ded77680
commit 2dbed4bd97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      templates/repo/diff/comment_form.tmpl

@ -29,6 +29,8 @@
<input type="hidden" name="reply" value="{{$.reply}}"> <input type="hidden" name="reply" value="{{$.reply}}">
{{else}} {{else}}
{{if $.root.CurrentReview}} {{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" <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> class="ui submit green tiny button btn-add-comment">{{$.root.locale.Tr "repo.diff.comment.add_review_comment"}}</button>
{{else}} {{else}}

Loading…
Cancel
Save