From 43fae34c20229702886fee645718029e0f1ff869 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Feb 18 2019 09:01:27 +0000 Subject: Fix cancelling a rebase When clicking on the rebase button you are prompted with a dialog to confirm if you want the rebase or not. Turns out we were not respecting the user's choice if they cancelled there. With this commit, we do. Fixes https://pagure.io/pagure/issue/4267 Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/templates/repo_pull_request.html b/pagure/templates/repo_pull_request.html index 5fc45e9..b2ff517 100644 --- a/pagure/templates/repo_pull_request.html +++ b/pagure/templates/repo_pull_request.html @@ -196,7 +196,6 @@ {% endif %} {% else %} @@ -886,6 +885,10 @@ function show_merge_status(){ $(document).ready(function() { $('#rebase_btn').click(function(){ + var _conf = confirm('Confirm rebasing this pull-request'); + if (_conf === false){ + return false; + } $('#merge_dropdown_btn span.fa').removeClass( "fa-circle-o-notch fa-times fa-check").addClass( "fa-circle-o-notch fa-fw");