diff --git a/opentech/apply/users/templates/users/account.html b/opentech/apply/users/templates/users/account.html index 5873285edc434ff180aefffdfdc9a06d7745d72b..38dc57c67f42fb10a9823b672a61418348709802 100644 --- a/opentech/apply/users/templates/users/account.html +++ b/opentech/apply/users/templates/users/account.html @@ -6,7 +6,7 @@ {% block content %} <h2>Welcome {{ user }}</h2> -{% if show_change_password and not backends.associated %} +{% if show_change_password and user.has_usable_password and not backends.associated %} <a href="{% url 'users:password_change' %}">{% trans "Change password" %}</a> {% endif %} diff --git a/opentech/apply/users/templates/users/oauth.html b/opentech/apply/users/templates/users/oauth.html index 312003dddfdb5167e71383632961c8a39fb873dd..c51d40a154c75fec0b114c33488eba4b9b142349 100644 --- a/opentech/apply/users/templates/users/oauth.html +++ b/opentech/apply/users/templates/users/oauth.html @@ -10,7 +10,7 @@ <ul> {% for association in backends.associated %} <li> - {% if user.password %} + {% if user.has_usable_password %} <form id="{{ association.provider|backend_name }}-disconnect" class="disconnect-form col-md-2" action="{% url 'social:disconnect_individual' backend=association.provider association_id=association.id %}?next={% url "users:account" %}" method="post"> <input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}"> @@ -26,12 +26,12 @@ </ul> {% endif %} {% if backends.not_associated %} - <h3>Available OAuth providers</h3> + <h3>Available providers</h3> <ul> {% for backend in backends.not_associated %} <li> <a id="{{ name }}-button" class="col-md-2 btn btn-default" name="{{ backend }}" href="{% url 'social:begin' backend=backend %}"> - Associate with {{ backend|backend_name }} + {{ backend|backend_name }} </a> </li> {% endfor %}