diff --git a/data/web/js/site/mailbox.js b/data/web/js/site/mailbox.js index 68a5ad45..cbf01935 100644 --- a/data/web/js/site/mailbox.js +++ b/data/web/js/site/mailbox.js @@ -125,6 +125,18 @@ $(document).ready(function() { } }); }); + // Add Mailbox Modal + var addMailboxModalShown = false; + $('#addMailboxModal').on('show.bs.modal', function(e) { + if (addMailboxModalShown) { + return; + } + addMailboxModalShown = true; + var $domainSelect = $("#mailbox_table select"); + if ($domainSelect[0].selectedIndex > 0) { // not "All Domains" + $("#addSelectDomain").val($domainSelect.val()).change().selectpicker("render"); + } + }); // Log modal $('#dnsInfoModal').on('show.bs.modal', function(e) { var domain = $(e.relatedTarget).data('domain');