Move the password check before we hide the modal

This commit is contained in:
Joseph Schorr 2014-09-04 20:05:21 -04:00
parent f746eb3381
commit 4e04ad5ca7

View file

@ -817,8 +817,6 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
// If the error is a fresh login required, show the dialog.
if (resp.status == 401 && resp.data['error_type'] == 'fresh_login_required') {
var verifyNow = function() {
if (!$('#freshPassword').val()) { return; }
var info = {
'password': $('#freshPassword').val()
};
@ -866,6 +864,8 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
box.bind('shown.bs.modal', function(){
box.find("input").focus();
box.find("form").submit(function() {
if (!$('#freshPassword').val()) { return; }
box.modal('hide');
verifyNow();
});