diff --git a/app/sso/forms.py b/app/sso/forms.py index 4b23901..16fdd09 100644 --- a/app/sso/forms.py +++ b/app/sso/forms.py @@ -111,6 +111,15 @@ class APIPasswordForm(forms.Form): """ API Password reset form """ password = forms.CharField(widget=forms.PasswordInput, label="Password") + password2 = forms.CharField(widget=forms.PasswordInput, label="Confirm Password") + + def clean_password2(self): + password1 = self.cleaned_data.get('password') + password2 = self.cleaned_data.get('password2') + if password1 and password2: + if password1 != password2: + raise forms.ValidationError("The two passwords do not match.") + return password2 class EmailChangeForm(forms.Form): diff --git a/app/sso/templates/sso/apipassword.html b/app/sso/templates/sso/apipassword.html index 8325f20..d582689 100644 --- a/app/sso/templates/sso/apipassword.html +++ b/app/sso/templates/sso/apipassword.html @@ -11,12 +11,13 @@
This service will reset your password for all External Auth API Services. If you wish to continue please enter a new password below.
- diff --git a/app/sso/templates/sso/emailchange.html b/app/sso/templates/sso/emailchange.html index cb21267..1a1ba25 100644 --- a/app/sso/templates/sso/emailchange.html +++ b/app/sso/templates/sso/emailchange.html @@ -7,7 +7,7 @@