mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 12:03:14 +00:00
Fix AccountForm validation & Add repeated form
This commit is contained in:
42
www/scripts/apps/login/home/recoverPassword.js
Normal file
42
www/scripts/apps/login/home/recoverPassword.js
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2013 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
require([
|
||||
"jquery",
|
||||
"i18n",
|
||||
"apps/login/home/common",
|
||||
"apps/login/home/views/form"
|
||||
], function($, i18n, Common, RenewPassword) {
|
||||
i18n.init({
|
||||
resGetPath: Common.languagePath,
|
||||
useLocalStorage: true
|
||||
}, function() {
|
||||
Common.initialize();
|
||||
|
||||
new RenewPassword({
|
||||
el : $("form[name=passwordRenewForm]"),
|
||||
rules: [{
|
||||
name: "password[password]",
|
||||
rules: "required",
|
||||
message: i18n.t("validation_blank")
|
||||
},{
|
||||
name: "password[password]",
|
||||
rules: "min_length[5]",
|
||||
message: i18n.t("validation_length_min", {
|
||||
postProcess: "sprintf",
|
||||
sprintf: ["5"]
|
||||
})
|
||||
},{
|
||||
name: "password[confirm]",
|
||||
rules: "matches[password[password]]",
|
||||
message: i18n.t("password_match")
|
||||
}]
|
||||
});
|
||||
});
|
||||
});
|
@@ -20,7 +20,7 @@ require([
|
||||
Common.initialize();
|
||||
|
||||
new RenewPassword({
|
||||
el : $("form[name=passwordRenewForm]"),
|
||||
el : $("form[name=passwordChangeForm]"),
|
||||
rules: [{
|
||||
name: "oldPassword",
|
||||
rules: "required",
|
||||
|
Reference in New Issue
Block a user