Commit 5e6ae0be authored by jplang's avatar jplang

Fixed the sudo dialog when called from a dialog, eg. email addresses (#19851).

git-svn-id: e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 3e2ebea2
$('#ajax-modal').html('<%= escape_javascript render partial: 'sudo_mode/new_modal' %>');
showModal('ajax-modal', '400px');
$("body").append($("<div>", {id: "sudo-modal"}).hide());
$('#sudo-modal').html('<%= escape_javascript render partial: 'sudo_mode/new_modal' %>');
showModal('sudo-modal', '400px');
......@@ -383,6 +383,8 @@ function showModal(id, width, title) {
var el = $('#'+id).first();
if (el.length === 0 ||':visible')) {return;}
if (!title) title = el.find('h3.title').text();
// moves existing modals behind the transparent background
width: width,
modal: true,
......@@ -401,6 +403,8 @@ function hideModal(el) {
modal = $('#ajax-modal');
// restores existing modals in front of the transparent background
function submitPreview(url, form, target) {
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment