[Web] Generate longer passwords for app passwords
parent
eb350d48c0
commit
0c8d9ff154
|
@ -15,7 +15,12 @@ $(document).ready(function() {
|
|||
$(".generate_password").click(function( event ) {
|
||||
event.preventDefault();
|
||||
$('[data-hibp]').trigger('input');
|
||||
if (typeof($(this).closest("form").data('pwgen-length')) == "number") {
|
||||
var random_passwd = GPW.pronounceable($(this).closest("form").data('pwgen-length'))
|
||||
}
|
||||
else {
|
||||
var random_passwd = GPW.pronounceable(8)
|
||||
}
|
||||
$(this).closest("form").find('[data-pwgen-field]').attr('type', 'text');
|
||||
$(this).closest("form").find('[data-pwgen-field]').val(random_passwd);
|
||||
});
|
||||
|
|
|
@ -171,7 +171,7 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
|
|||
<h3 class="modal-title"><?=$lang['add']['app_password'];?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" data-cached-form="true" role="form" data-id="add_apppasswd">
|
||||
<form class="form-horizontal" data-cached-form="true" role="form" data-pwgen-length="32" data-id="add_apppasswd">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" for="app_name"><?=$lang['add']['app_name'];?></label>
|
||||
<div class="col-sm-10">
|
||||
|
|
Loading…
Reference in New Issue