From 358d416bb82bab136327704d4c6bda06dc7131bf Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 16 2016 13:19:52 +0000 Subject: Fix async inline comments on PR by fixing the url to which we submit the form --- diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index 1e40138..212bd46 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -864,7 +864,13 @@ function try_async_comment(form, inline) { form.submit(); return false; } - $.post( form.action + "?js=1", $(form).serialize() ) + var _url = form.action; + if (_url.indexOf('?') != -1){ + _url += "&js=1"; + } else { + _url += "?js=1"; + } + $.post( _url, $(form).serialize() ) .done(function(data) { if(data == 'ok') { $('#comment').val('');