Show More
@@ -155,7 +155,11 b' class MyAccountController(BaseController' | |||
|
155 | 155 | def my_account_password(self): |
|
156 | 156 | c.active = 'password' |
|
157 | 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 | 163 | _form = PasswordChangeForm(self.authuser.username)() |
|
160 | 164 | try: |
|
161 | 165 | form_result = _form.to_python(request.POST) |
@@ -1,4 +1,7 b'' | |||
|
1 | 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 | 5 | ${h.form(url('my_account_password'), method='post')} |
|
3 | 6 | <div class="form"> |
|
4 | 7 | <div class="fields"> |
@@ -36,3 +39,9 b'' | |||
|
36 | 39 | </div> |
|
37 | 40 | </div> |
|
38 | 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