Add ability to generate passwords for new mailboxes
parent
09a6d432f1
commit
03d4ea5a35
|
@ -29,4 +29,5 @@ table.footable>tbody>tr.footable-empty>td {
|
|||
}
|
||||
.inputMissingAttr {
|
||||
border-color: #FF4136;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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($){
|
||||
|
|
|
@ -50,6 +50,7 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
|
|||
<label class="control-label col-sm-2" for="password"><?=$lang['add']['password'];?></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" name="password" id="password" placeholder="" required>
|
||||
(<a href="#" class="generate_password">Generate</a>)
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
Loading…
Reference in New Issue