diff --git a/pagure/templates/comment_update.html b/pagure/templates/comment_update.html index d293138..ec90141 100644 --- a/pagure/templates/comment_update.html +++ b/pagure/templates/comment_update.html @@ -5,8 +5,7 @@ {% block repo %} - + diff --git a/pagure/templates/issue.html b/pagure/templates/issue.html index b47ee8f..754540a 100644 --- a/pagure/templates/issue.html +++ b/pagure/templates/issue.html @@ -149,7 +149,7 @@ +}}" method="post" class="mainform"> {{ form.csrf_token }} @@ -673,6 +673,10 @@ $(document).ready(function() { return confirm('Do you really want to remove this comment?'); }); + $('.mainform').submit(function() { + return try_async_comment(this); + }); + $('.mainform #assignee').selectize({ valueField: 'user', labelField: 'user', diff --git a/pagure/templates/pull_request_comment.html b/pagure/templates/pull_request_comment.html index 099cf92..c33dd6b 100644 --- a/pagure/templates/pull_request_comment.html +++ b/pagure/templates/pull_request_comment.html @@ -9,7 +9,7 @@ namespace=repo.namespace, requestid=requestid, commit=commit, tree_id=tree_id, filename=filename, row=row) }}" - method="post" onsubmit="return try_async_comment(this, true)"> + method="post" class="add_comment_form"> {% endblock %} diff --git a/pagure/templates/repo_pull_request.html b/pagure/templates/repo_pull_request.html index 2ea8a44..7f6eda7 100644 --- a/pagure/templates/repo_pull_request.html +++ b/pagure/templates/repo_pull_request.html @@ -362,8 +362,7 @@ username=repo.user.user if repo.is_fork else None, namespace=repo.namespace, requestid=requestid) - }}" method="post" class="icon" - onsubmit="return try_async_comment(this, null)" > + }}" method="post" class="icon form_pr_drop_comment"> {% endif %} {{repo_renderdiff(diff=diff, @@ -388,8 +387,7 @@ username=repo.user.user if repo.is_fork else None, namespace=repo.namespace, requestid=requestid) - }}" method="post" id="request_comment" - onsubmit="return try_async_comment(this, null)"> + }}" method="post" id="request_comment" class="form_pr_drop_comment"> {% if pull_request.comments %} {% for comment in pull_request.comments %} @@ -447,7 +445,7 @@ username=repo.user.user if repo.is_fork else None, namespace=repo.namespace, requestid=requestid) }}" - method="post" onsubmit="return try_async_comment(this, false)"> + method="post" class="form_pr_add_comment"> {{ mergeform.csrf_token }} diff --git a/pagure/themes/srcfpo/templates/repo_branches.html b/pagure/themes/srcfpo/templates/repo_branches.html index 99c349c..4ca6224 100644 --- a/pagure/themes/srcfpo/templates/repo_branches.html +++ b/pagure/themes/srcfpo/templates/repo_branches.html @@ -95,8 +95,7 @@ username=username, namespace=repo.namespace, branchname=branch) - }}" method="post" class="icon d-inline" - onsubmit="return confirm('Are you sure you want to remove the branch: {{ branch }}?\nThis cannot be un-done!');"> + }}" method="post" class="icon d-inline delete-branch-form" data-branch-name="{{ branch | unicode }}"> {{ g.confirmationform.csrf_token }}