From: Jean-Philippe Lang Date: Fri, 19 Jun 2015 20:12:24 +0000 (+0000) Subject: Fixed wrong password rendering broken by r14339 (#19851). X-Git-Tag: 3.1.0~54 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a890215b51dcf5ec9bf9b2c18c9c70ff1b7f508b;p=redmine.git Fixed wrong password rendering broken by r14339 (#19851). git-svn-id: http://svn.redmine.org/redmine/trunk@14341 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/sudo_mode/new.js.erb b/app/views/sudo_mode/new.js.erb index ed77b32b1..2eda9b857 100644 --- a/app/views/sudo_mode/new.js.erb +++ b/app/views/sudo_mode/new.js.erb @@ -1,4 +1,4 @@ -$("body").append($("
", {id: "sudo-modal"}).hide()); -$('#sudo-modal').html('<%= escape_javascript render partial: 'sudo_mode/new_modal' %>'); +var sudo_modal = $('#sudo-modal').length ? $('#sudo-modal') : $("
", {id: "sudo-modal"}).appendTo($("body")); +sudo_modal.hide().html('<%= escape_javascript render partial: 'sudo_mode/new_modal' %>'); showModal('sudo-modal', '400px'); $('#sudo_password').focus();