diff --git a/cookbook/helper/AllAuthCustomAdapter.py b/cookbook/helper/AllAuthCustomAdapter.py index 47629283c..1823265f0 100644 --- a/cookbook/helper/AllAuthCustomAdapter.py +++ b/cookbook/helper/AllAuthCustomAdapter.py @@ -16,7 +16,7 @@ class AllAuthCustomAdapter(DefaultAccountAdapter): # disable password reset for now def send_mail(self, template_prefix, email, context): - if settings.EMAIL_HOST == '': + if settings.EMAIL_HOST != '': super(AllAuthCustomAdapter, self).send_mail(template_prefix, email, context) else: pass diff --git a/cookbook/templates/account/login.html b/cookbook/templates/account/login.html index 64ecfdd15..6034a76f4 100644 --- a/cookbook/templates/account/login.html +++ b/cookbook/templates/account/login.html @@ -27,7 +27,11 @@ {% trans "Sign Up" %} - {% trans "Reset Password" %} + + {% if settings.EMAIL_HOST != '' %} + {% trans "Reset Password" %} + {% endif %} diff --git a/cookbook/templates/account/password_reset.html b/cookbook/templates/account/password_reset.html index 514a5aeef..3db14cd31 100644 --- a/cookbook/templates/account/password_reset.html +++ b/cookbook/templates/account/password_reset.html @@ -4,23 +4,29 @@ {% load i18n %} {% load account %} -{% block head_title %}{% trans "Password Reset" %}{% endblock %} +{% block title %}{% trans 'Password Reset' %}{% endblock %} {% block content %}
{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}
+ + + {% else %} +{% trans 'Password reset is disabled on this instance.' %}
{% endif %} -{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}
- {% endblock %} \ No newline at end of file diff --git a/cookbook/templates/account/password_reset_done.html b/cookbook/templates/account/password_reset_done.html index 244d45044..b756e8abc 100644 --- a/cookbook/templates/account/password_reset_done.html +++ b/cookbook/templates/account/password_reset_done.html @@ -4,7 +4,7 @@ {% load i18n %} {% load account %} -{% block head_title %}{% trans "Password Reset" %}{% endblock %} +{% block title %}{% trans "Password Reset" %}{% endblock %} {% block content %}{% trans "We are sorry, but the sign up is currently closed." %}
+{% trans "We are sorry, but the sign up is currently closed." %}
{% trans "Sign In" %} - {% trans "Reset Password" %} {% endblock %} \ No newline at end of file