未验证 提交 b3ebef20 编写于 作者: O Oleg Nenashev 提交者: GitHub

Merge pull request #3164 from fcojfernandez/JENKINS-48080

[JENKINS-48080] Setup Wizard hangs if confirm password is incorrect while creating admin user
......@@ -889,16 +889,17 @@ var createPluginSetupWizard = function(appendTarget) {
// ignore JSON parsing issues, this may be HTML
}
// we get 200 OK
var $page = $(data);
var responseText = data.responseText;
var $page = $(responseText);
var $errors = $page.find('.error');
if($errors.length > 0) {
var $main = $page.find('#main-panel').detach();
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];
doc.open();
doc.write(data);
doc.write(responseText);
doc.close();
}
else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册