From a890215b51dcf5ec9bf9b2c18c9c70ff1b7f508b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 19 Jun 2015 20:12:24 +0000 Subject: [PATCH] Fixed wrong password rendering broken by r14339 (#19851). git-svn-id: http://svn.redmine.org/redmine/trunk@14341 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/sudo_mode/new.js.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); -- 2.39.5