#4270 Fix cancelling a rebase
Merged 2 years ago by pingou. Opened 2 years ago by pingou.

@@ -196,7 +196,6 @@ 

                    {% endif %}


                  <button id="rebase_btn" type="submit"

-                   onclick="return confirm('Confirm rebasing this pull-request');"

                    class="btn btn-block my-2">Rebase</button>

                {% else %}

                <small id="merge-alert-message"></small>
@@ -886,6 +885,10 @@ 

  $(document).ready(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");

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
With this commit, we do.

Fixes https://pagure.io/pagure/issue/4267

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

Thanks for the review! :)

Pull-Request has been merged by pingou

2 years ago