nextcloud/apps/user_ldap/js/renewPassword.js
Ferdinand Thiessen 91f3b6b4ee
chore: adjust code to new codestyle
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-10-02 13:19:42 +02:00

35 lines
927 B
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 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"]'),
})
})