fix a bug with resetting passwords

This commit is contained in:
rolux 2011-10-22 15:31:12 +00:00
parent b682055a33
commit 4266c4578b
3 changed files with 10 additions and 7 deletions

View file

@ -192,7 +192,7 @@ def resetPassword(request):
status: {'code': int, 'text': string}
data: {
errors: {
code: 'Invalid Code'
code: 'Incorrect Code'
}
user {
}
@ -226,7 +226,7 @@ def resetPassword(request):
else:
response = json_response({
'errors': {
'code': 'Invalid code'
'code': 'Incorrect code'
}
})

View file

@ -1,7 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
pandora.autovalidateCode = function(value, blur, callback) {
value = value.split('').map(function(v) {
value = value.toUpperCase().split('').map(function(v) {
return /[A-Z]/.test(v) ? v : null;
}).join('').substr(0, 16);
callback({valid: value.length == 16, value: value});

View file

@ -31,7 +31,7 @@ pandora.ui.accountDialogOptions = function(action, value) {
signin: 'Sign In',
signup: 'Sign Up',
reset: 'Reset Password',
resetAndSignin: 'Reset Password and Sign In'
resetAndSignin: 'Sign In'
},
dialogText = {
signin: 'To sign in to your account, please enter your username and password.',
@ -67,16 +67,19 @@ pandora.ui.accountDialogOptions = function(action, value) {
id: type,
title: buttonTitle[type] + '...'
}).bindEvent('click', function() {
//Ox.print('CLICK EVENT', type)
pandora.$ui.accountDialog.options(pandora.ui.accountDialogOptions(type));
});
}
}
return {
buttons: Ox.merge(buttons[action].map(function(type) {
buttons: Ox.merge(
buttons[action].map(function(type) {
return button(type);
}), [{}, button('cancel'), button('submit')]),
}),
buttons[action].length ? [{}] : [],
[button('cancel'), button('submit')]
),
content: Ox.Element()
.append(
$('<img>')