0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-01-31 06:43:12 +00:00
nextcloud_server/apps/user_ldap/js/renewPassword.js
Andy Scherzinger 8d8891c5bc
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-30 15:49:33 +02:00

35 lines
932 B
JavaScript

/**
* SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
OCA = OCA || {};
OCA.LDAP = _.extend(OC.LDAP || {}, {
onRenewPassword: function () {
$('#submit')
.removeClass('icon-confirm-white')
.addClass('icon-loading-small')
.attr('value', t('core', 'Renewing …'));
return true;
},
});
window.addEventListener('DOMContentLoaded', function() {
$('form[name=renewpassword]').submit(OCA.LDAP.onRenewPassword);
if($('#newPassword').length) {
$('#newPassword').showPassword().keyup();
}
$('#newPassword').strengthify({
zxcvbn: OC.linkTo('core','vendor/zxcvbn/dist/zxcvbn.js'),
titles: [
t('core', 'Very weak password'),
t('core', 'Weak password'),
t('core', 'So-so password'),
t('core', 'Good password'),
t('core', 'Strong password')
],
drawTitles: true,
$addAfter: $('input[name="newPassword-clone"]'),
});
});