Set domain to filter by default when creating new mailbox (#3887)

This commit is contained in:
Balázs Dura-Kovács 2020-12-04 09:37:39 +01:00 committed by GitHub
parent 96616e6973
commit 36f296d9d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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');