BigW Consortium Gitlab

Commit 2400181a by Douwe Maan

Merge branch 'fix-cannot-move-project-error' into 'master'

Fix "Cannot move project" error message from popping up after a successful transfer The JavaScript click handlers were never being removed, leading to duplicate requests when attempting to transfer a project to another namespace. The first transfer would succeed but the subsequent ones would fail, leading to the error message saying, "Cannot move project". ![image](https://gitlab.com/stanhu/gitlab-ce/uploads/0c9f61294291514e0c2a48c204b6a1aa/image.png) I attempted to write a unit test for this, but it was taking me too long to get it right. Closes #1448 and #1128 See merge request !548
parents 76aade28 6fb1e80a
......@@ -3,7 +3,7 @@ Please view this file on the master branch, on stable branches it's out of date.
v 7.11.0 (unreleased)
- Fix clone URL field and X11 Primary selection (Dmitry Medvinsky)
- Ignore invalid lines in .gitmodules
-
- Fix "Cannot move project" error message from popping up after a successful transfer (Stan Hu)
-
-
-
......
......@@ -173,6 +173,7 @@ $ ->
$(@).closest(".diff-file").find(".notes_holder").toggle()
e.preventDefault()
$(document).off "click", '.js-confirm-danger'
$(document).on "click", '.js-confirm-danger', (e) ->
e.preventDefault()
btn = $(e.target)
......
......@@ -8,11 +8,13 @@ class @ConfirmDangerModal
submit = $('.js-confirm-danger-submit')
submit.disable()
$('.js-confirm-danger-input').off 'input'
$('.js-confirm-danger-input').on 'input', ->
if rstrip($(@).val()) is project_path
submit.enable()
else
submit.disable()
$('.js-confirm-danger-submit').off 'click'
$('.js-confirm-danger-submit').on 'click', =>
@form.submit()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment