diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index 6c9532e..5bec287 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -455,5 +455,35 @@ {% endif %} }); + +{% if authenticated %} +function try_async_comment(form) { + $.post( form.action + "?js=1", $(form).serialize() ) + .done(function(data) { + if(data == 'ok') { + // We have submitted the comment correctly + var comment_fld = $(form).find("#comment")[0]; + var comment = comment_fld.value; + var comment_view = "
| " + + "{{ g.fas_user.username }}" + + " | Now |
" + + comment + " | |