diff --git a/data/web/css/mailbox.css b/data/web/css/mailbox.css index 63e688dc..8f711669 100644 --- a/data/web/css/mailbox.css +++ b/data/web/css/mailbox.css @@ -29,4 +29,5 @@ table.footable>tbody>tr.footable-empty>td { } .inputMissingAttr { border-color: #FF4136; -} \ No newline at end of file +} + diff --git a/data/web/js/mailbox.js b/data/web/js/mailbox.js index fccd222b..a2c0c172 100644 --- a/data/web/js/mailbox.js +++ b/data/web/js/mailbox.js @@ -20,6 +20,15 @@ $(document).ready(function() { auto_fill_quota($('#addSelectDomain').val()); }); auto_fill_quota($('#addSelectDomain').val()); + + $(".generate_password").click(function( event ) { + event.preventDefault(); + var random_passwd = Math.random().toString(36).slice(-8) + $('#password').prop('type', 'text'); + $('#password').val(random_passwd); + $('#password2').prop('type', 'text'); + $('#password2').val(random_passwd); + }); }); jQuery(function($){ diff --git a/data/web/modals/mailbox.php b/data/web/modals/mailbox.php index 70afeaac..985eaa71 100644 --- a/data/web/modals/mailbox.php +++ b/data/web/modals/mailbox.php @@ -50,6 +50,7 @@ if (!isset($_SESSION['mailcow_cc_role'])) {