diff --git a/RIGS/forms.py b/RIGS/forms.py index 7a9dc854..8a019409 100644 --- a/RIGS/forms.py +++ b/RIGS/forms.py @@ -3,7 +3,7 @@ from django import forms from django.utils import formats from django.conf import settings from django.core import serializers -from django.contrib.auth.forms import AuthenticationForm +from django.contrib.auth.forms import AuthenticationForm, PasswordResetForm from registration.forms import RegistrationFormUniqueEmail from captcha.fields import ReCaptchaField import simplejson @@ -30,6 +30,9 @@ class ProfileRegistrationFormUniqueEmail(RegistrationFormUniqueEmail): class LoginForm(AuthenticationForm): captcha = ReCaptchaField(label='Captcha') +class PasswordReset(PasswordResetForm): + captcha = ReCaptchaField(label='Captcha') + # Events Shit class EventForm(forms.ModelForm): datetime_input_formats = formats.get_format_lazy("DATETIME_INPUT_FORMATS") + settings.DATETIME_INPUT_FORMATS diff --git a/RIGS/urls.py b/RIGS/urls.py index dfe725c2..cab2532c 100644 --- a/RIGS/urls.py +++ b/RIGS/urls.py @@ -1,6 +1,6 @@ from django.conf.urls import patterns, include, url from django.contrib.auth.decorators import login_required -from RIGS import views, rigboard, finance, ical +from RIGS import views, rigboard, finance, ical, forms from django.views.generic import RedirectView from PyRIGS.decorators import permission_required_with_403 @@ -14,6 +14,7 @@ urlpatterns = patterns('', url(r'^closemodal/$', views.CloseModal.as_view(), name='closemodal'), url('^user/login/$', 'RIGS.views.login', name='login'), + url(r'^user/password_reset/$', 'django.contrib.auth.views.password_reset', {'password_reset_form':forms.PasswordReset}), # People url(r'^people/$', permission_required_with_403('RIGS.view_person')(views.PersonList.as_view()), diff --git a/templates/registration/password_reset_form.html b/templates/registration/password_reset_form.html index bbe77669..b9358488 100644 --- a/templates/registration/password_reset_form.html +++ b/templates/registration/password_reset_form.html @@ -21,11 +21,12 @@ {% render_field form.email type="email" class+="form-control" %} -