Compare commits
No commits in common. "794b28f833634e00f8f573043cc3fea9791c057d" and "0147b56d6955d5f32e1dfce9f45f66ce3e3961c9" have entirely different histories.
794b28f833
...
0147b56d69
2 changed files with 3 additions and 10 deletions
|
|
@ -6,7 +6,7 @@ random.seed()
|
|||
import re
|
||||
import json
|
||||
|
||||
from django.contrib.auth import authenticate, login, logout, update_session_auth_hash
|
||||
from django.contrib.auth import authenticate, login, logout
|
||||
from django.template import loader
|
||||
from django.conf import settings
|
||||
from django.core.mail import send_mail, BadHeaderError, EmailMessage
|
||||
|
|
@ -719,9 +719,7 @@ def editPreferences(request, data):
|
|||
profile.save()
|
||||
if 'password' in data:
|
||||
change = True
|
||||
user = request.user
|
||||
user.set_password(data['password'])
|
||||
update_session_auth_hash(request, user)
|
||||
request.user.set_password(data['password'])
|
||||
if 'script' in data:
|
||||
profile = request.user.profile
|
||||
profile.preferences['script'] = data['script']
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ pandora.ui.preferencesDialog = function() {
|
|||
id: 'password',
|
||||
label: Ox._('New Password'),
|
||||
labelWidth: 120,
|
||||
type: 'text',
|
||||
type: 'password',
|
||||
validate: pandora.validateNewPassword,
|
||||
width: 320
|
||||
})
|
||||
|
|
@ -51,11 +51,6 @@ pandora.ui.preferencesDialog = function() {
|
|||
autocomplete: 'new-password'
|
||||
})
|
||||
.bindEvent({
|
||||
focus: function(data) {
|
||||
this.options({
|
||||
type: 'password'
|
||||
})
|
||||
},
|
||||
validate: function(data) {
|
||||
data.valid && pandora.api.editPreferences({password: data.value});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue