Skip to content

Commit

Permalink
Merge pull request #3164 from fcojfernandez/JENKINS-48080
Browse files Browse the repository at this point in the history
[JENKINS-48080] Setup Wizard hangs if confirm password is incorrect while creating admin user
  • Loading branch information
oleg-nenashev committed Dec 2, 2017
2 parents 616a62a + 9b4e831 commit b3ebef2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions war/src/main/js/pluginSetupWizardGui.js
Expand Up @@ -889,16 +889,17 @@ var createPluginSetupWizard = function(appendTarget) {
// ignore JSON parsing issues, this may be HTML // ignore JSON parsing issues, this may be HTML
} }
// we get 200 OK // we get 200 OK
var $page = $(data); var responseText = data.responseText;
var $page = $(responseText);
var $errors = $page.find('.error'); var $errors = $page.find('.error');
if($errors.length > 0) { if($errors.length > 0) {
var $main = $page.find('#main-panel').detach(); var $main = $page.find('#main-panel').detach();
if($main.length > 0) { if($main.length > 0) {
data = data.replace(/body([^>]*)[>](.|[\r\n])+[<][/]body/,'body$1>'+$main.html()+'</body'); responseText = responseText.replace(/body([^>]*)[>](.|[\r\n])+[<][/]body/,'body$1>'+$main.html()+'</body');
} }
var doc = $('iframe[src]').contents()[0]; var doc = $('iframe[src]').contents()[0];
doc.open(); doc.open();
doc.write(data); doc.write(responseText);
doc.close(); doc.close();
} }
else { else {
Expand Down

0 comments on commit b3ebef2

Please sign in to comment.