incorporate phraseanet-production-client into phraseanet

This commit is contained in:
aina esokia
2020-09-25 18:28:43 +03:00
parent 7df5e99c54
commit abc137bbe6
282 changed files with 66346 additions and 3020 deletions

View File

@@ -0,0 +1,48 @@
/*
* This file is part of Phraseanet
*
* (c) 2005-2016 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import $ from 'jquery';
import RenewPasswordForm from './common/forms/views/formType/passwordSetter';
const renewPassword = (services) => {
const {configService, localeService, appEvents} = services;
const initialize = () => {
require.ensure([], () => {
services.zxcvbn = require('zxcvbn');
new RenewPasswordForm({
services,
el: $('form[name=passwordRenewForm]'),
rules: [
{
name: 'password[password]',
rules: 'required',
message: localeService.t('validation_blank')
},
{
name: 'password[password]',
rules: 'min_length[5]',
message: localeService.t('validation_length_min', {
postProcess: 'sprintf',
sprintf: ['5']
})
},
{
name: 'password[confirm]',
rules: 'matches[password[password]]',
message: localeService.t('password_match')
}
]
});
});
};
return {initialize};
};
export default renewPassword;