diff --git a/layerindex/forms.py b/layerindex/forms.py index 7aacc58..3eba446 100644 --- a/layerindex/forms.py +++ b/layerindex/forms.py @@ -202,6 +202,10 @@ class EditProfileForm(StyledModelForm): def __init__(self, *args, **kwargs): super(EditProfileForm, self ).__init__(*args, **kwargs) + for field in ['captcha', 'security_question_1', 'security_question_2', 'security_question_3', 'answer_1', 'answer_2', 'answer_3']: + self.fields[field].widget.attrs.update({ + 'autocomplete': 'off' + }) user = kwargs.get("instance") try: self.fields['security_question_1'].initial=user.userprofile.securityquestionanswer_set.all()[0].security_question diff --git a/templates/django_registration/registration_form.html b/templates/django_registration/registration_form.html index 38833af..87e3324 100644 --- a/templates/django_registration/registration_form.html +++ b/templates/django_registration/registration_form.html @@ -2,7 +2,7 @@ {% load i18n %} {% block content %} -
+ {% for hidden in form.hidden_fields %} {{ hidden }} {% endfor %} diff --git a/templates/registration/login.html b/templates/registration/login.html index d89644f..d8e314b 100644 --- a/templates/registration/login.html +++ b/templates/registration/login.html @@ -5,7 +5,7 @@ {% endblock %} {% block content %} - + {{ form.as_p }} diff --git a/templates/registration/password_change_form.html b/templates/registration/password_change_form.html index da54266..2fb15e1 100644 --- a/templates/registration/password_change_form.html +++ b/templates/registration/password_change_form.html @@ -2,7 +2,7 @@ {% load i18n %} {% block content %} - + {% for hidden in form.hidden_fields %} {{ hidden }} {% endfor %} diff --git a/templates/registration/password_reset_confirm.html b/templates/registration/password_reset_confirm.html index e6eb9cb..3fb2bcb 100644 --- a/templates/registration/password_reset_confirm.html +++ b/templates/registration/password_reset_confirm.html @@ -5,7 +5,7 @@ {% if validlink %} - + {% for hidden in form.hidden_fields %} {{ hidden }} {% endfor %} diff --git a/templates/registration/password_reset_form.html b/templates/registration/password_reset_form.html index b8ef4c3..fc9758a 100644 --- a/templates/registration/password_reset_form.html +++ b/templates/registration/password_reset_form.html @@ -2,7 +2,7 @@ {% load i18n %} {% block content %} - + {% for hidden in form.hidden_fields %} {{ hidden }} {% endfor %}