mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 12:49:01 +02:00
Fix a couple of Edit Profile form message bugs
* Tweak message when one or more (but not all) security question answers have been changed so that it's clear that all are required * Ensure success message gets shown upon saving Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
436596159f
commit
9cc87919ef
|
@ -249,7 +249,7 @@ class EditProfileForm(StyledModelForm):
|
|||
if 'answer_1' not in self.changed_data \
|
||||
or 'answer_2' not in self.changed_data \
|
||||
or 'answer_3' not in self.changed_data:
|
||||
raise forms.ValidationError("Please answer three security questions.")
|
||||
raise forms.ValidationError("Please provide answers for all three security questions.")
|
||||
security_question_1 = self.cleaned_data["security_question_1"]
|
||||
security_question_2 = self.cleaned_data["security_question_2"]
|
||||
security_question_3 = self.cleaned_data["security_question_3"]
|
||||
|
|
|
@ -933,7 +933,7 @@ class EditProfileFormView(SuccessMessageMixin, UpdateView):
|
|||
view.send_activation_email(user)
|
||||
return HttpResponseRedirect(reverse('reregister'))
|
||||
|
||||
return HttpResponseRedirect(self.get_success_url())
|
||||
return super(EditProfileFormView, self).form_valid(form)
|
||||
|
||||
def get_success_message(self, cleaned_data):
|
||||
return "Profile saved successfully"
|
||||
|
|
Loading…
Reference in New Issue
Block a user