Show More
@@ -155,7 +155,11 b' class MyAccountController(BaseController' | |||||
155 | def my_account_password(self): |
|
155 | def my_account_password(self): | |
156 | c.active = 'password' |
|
156 | c.active = 'password' | |
157 | self.__load_data() |
|
157 | self.__load_data() | |
158 | if request.POST: |
|
158 | ||
|
159 | managed_fields = auth_modules.get_managed_fields(c.user) | |||
|
160 | c.can_change_password = 'password' not in managed_fields | |||
|
161 | ||||
|
162 | if request.POST and c.can_change_password: | |||
159 | _form = PasswordChangeForm(self.authuser.username)() |
|
163 | _form = PasswordChangeForm(self.authuser.username)() | |
160 | try: |
|
164 | try: | |
161 | form_result = _form.to_python(request.POST) |
|
165 | form_result = _form.to_python(request.POST) |
@@ -1,4 +1,7 b'' | |||||
1 | <div style="font-size: 20px; color: #666666; padding: 0px 0px 10px 0px">${_('Change Your Account Password')}</div> |
|
1 | <div style="font-size: 20px; color: #666666; padding: 0px 0px 10px 0px">${_('Change Your Account Password')}</div> | |
|
2 | ||||
|
3 | %if c.can_change_password: | |||
|
4 | ||||
2 | ${h.form(url('my_account_password'), method='post')} |
|
5 | ${h.form(url('my_account_password'), method='post')} | |
3 | <div class="form"> |
|
6 | <div class="form"> | |
4 | <div class="fields"> |
|
7 | <div class="fields"> | |
@@ -36,3 +39,9 b'' | |||||
36 | </div> |
|
39 | </div> | |
37 | </div> |
|
40 | </div> | |
38 | ${h.end_form()} |
|
41 | ${h.end_form()} | |
|
42 | ||||
|
43 | %else: | |||
|
44 | ||||
|
45 | ${_('This account is managed with %s and the password cannot be changed here') % c.user.extern_type} | |||
|
46 | ||||
|
47 | %endif |
General Comments 0
You need to be logged in to leave comments.
Login now