Skip to content

Commit

Permalink
Copyedit password reset user journey #3711
Browse files Browse the repository at this point in the history
  • Loading branch information
joemull committed Sep 13, 2023
1 parent b78805b commit 32c13d2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/core/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ class Meta:

class PasswordResetForm(forms.Form):

password_1 = forms.CharField(widget=forms.PasswordInput, label=_('Password 1'))
password_2 = forms.CharField(widget=forms.PasswordInput, label=_('Password 2'))
password_1 = forms.CharField(widget=forms.PasswordInput, label=_('Password'))
password_2 = forms.CharField(widget=forms.PasswordInput, label=_('Password (again)'))

def clean_password_2(self):
password_1 = self.cleaned_data.get("password_1")
Expand Down Expand Up @@ -187,6 +187,10 @@ class Meta:
'date_confirmed', 'confirmation_code', 'is_active',
'is_staff', 'is_admin', 'date_joined', 'password',
'is_superuser', 'enable_digest')
widgets = {
'biography': forms.Textarea(),
'signature': forms.Textarea(),
}

def save(self, commit=True):
user = super(EditAccountForm, self).save(commit=False)
Expand Down
9 changes: 7 additions & 2 deletions src/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,13 @@ def register(request):
new_user.add_account_role('author', request.journal)
logic.send_confirmation_link(request, new_user)

messages.add_message(request, messages.SUCCESS, 'Your account has been created, please follow the'
'instructions in the email that has been sent to you.')
messages.add_message(
request,
messages.SUCCESS,
'Your account has been created. '
'Please follow the instructions '
'in the email that has been sent to you.'
)
return redirect(reverse('core_login'))

template = 'core/accounts/register.html'
Expand Down

0 comments on commit 32c13d2

Please sign in to comment.