diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-06-19 20:12:24 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-06-19 20:12:24 +0000 |
commit | a890215b51dcf5ec9bf9b2c18c9c70ff1b7f508b (patch) | |
tree | d8e6c0e5c614c4aa58a553ac7c8c1336c4dcc4cb /app/views | |
parent | 0fccf648a79e4aa05034666610dfe49390eda83d (diff) | |
download | redmine-a890215b51dcf5ec9bf9b2c18c9c70ff1b7f508b.tar.gz redmine-a890215b51dcf5ec9bf9b2c18c9c70ff1b7f508b.zip |
Fixed wrong password rendering broken by r14339 (#19851).
git-svn-id: http://svn.redmine.org/redmine/trunk@14341 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/sudo_mode/new.js.erb | 4 |
1 files 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($("<div>", {id: "sudo-modal"}).hide()); -$('#sudo-modal').html('<%= escape_javascript render partial: 'sudo_mode/new_modal' %>'); +var sudo_modal = $('#sudo-modal').length ? $('#sudo-modal') : $("<div>", {id: "sudo-modal"}).appendTo($("body")); +sudo_modal.hide().html('<%= escape_javascript render partial: 'sudo_mode/new_modal' %>'); showModal('sudo-modal', '400px'); $('#sudo_password').focus(); |