Revision 2da6f56b

b/snf-astakos-app/astakos/im/forms.py
941 941
    change_password = forms.BooleanField(initial=False, required=False)
942 942
    change_email = forms.BooleanField(initial=False, required=False)
943 943

  
944
    email_changed = False
945
    password_changed = False
944 946

  
945 947
    def __init__(self, *args, **kwargs):
948

  
946 949
        self.fields_list = [
947 950
                'email',
948 951
                'new_email_address',
......
1023 1026
    def save(self, request, *args, **kwargs):
1024 1027
        if 'email' in self.save_extra_forms:
1025 1028
            self.email_change_form.save(request, *args, **kwargs)
1029
            self.email_changed = True
1026 1030
        if 'password' in self.save_extra_forms:
1027 1031
            self.password_change_form.save(*args, **kwargs)
1032
            self.password_changed = True
1028 1033
        return super(ExtendedProfileForm, self).save(*args, **kwargs)
1029 1034

  
b/snf-astakos-app/astakos/im/messages.py
48 48
                                            ' automatically signed in.'
49 49
PASSWORD_RESET_DONE                     =   'An email with details on how to change your password has been sent. Please check your Inbox.'
50 50
PASSWORD_RESET_CONFIRM_DONE             =   'Your password has changed successfully. You can now login using your new password.'
51
PASSWORD_CHANGED                        =   'Your new password is set.'
51 52

  
52 53
ACCOUNT_RESEND_ACTIVATION_PROMPT        =   'Resend activation email'
53 54
ACCOUNT_USER_ACTIVATION_PENDING         =   'You have not followed the activation link'
b/snf-astakos-app/astakos/im/target/local.py
165 165
        form = password_change_form(**form_kwargs)
166 166
        if form.is_valid():
167 167
            form.save()
168
            messages.success(request,
169
                             astakos_messages.PASSWORD_RESET_CONFIRM_DONE)
168 170
            return HttpResponseRedirect(post_change_redirect)
169 171
    else:
170 172
        form = password_change_form(user=request.user)
b/snf-astakos-app/astakos/im/views.py
397 397
                )
398 398
                msg = _(astakos_messages.PROFILE_UPDATED)
399 399
                messages.success(request, msg)
400

  
401
                if form.email_changed:
402
                    msg = _(astakos_messages.EMAIL_CHANGE_REGISTERED)
403
                    messages.success(request, msg)
404
                if form.password_changed:
405
                    msg = _(astakos_messages.PASSWORD_CHANGED)
406
                    messages.success(request, msg)
407

  
400 408
                if next:
401 409
                    return redirect(next)
402 410
                else:

Also available in: Unified diff