Rename template vars in zilencer's use of login.html for clarify

(imported from commit ffd5aa569054fb3949775a7f3e2e02634b814c06)
This commit is contained in:
Leo Franchi 2013-11-14 10:26:36 -05:00
parent 5fd97e48c3
commit ea648d19a1
2 changed files with 9 additions and 9 deletions

View File

@ -35,9 +35,9 @@ autofocus('#id_username');
{% else %}
{% comment %}Non-SSO users.{% endcomment %}
{% if form.errors or sso_unknown_email %}
{% if form.errors or desktop_sso_unknown_email %}
<div class="alert alert-error">
{% if sso_unknown_email %}
{% if desktop_sso_unknown_email %}
Zulip is not currently available for your domain. <br />
<a href="https://zulip.com/signup">Sign up</a> to find out when Zulip is ready for you.
{% else %}
@ -55,8 +55,8 @@ autofocus('#id_username');
{% endif %}
<form name="login_form" id="login_form" method="post" class="login-form"
{% if sso_only %}
{# sso_only is only set when this template is invoked by zilencer.views #}
{% if desktop_sso_dispatch %}
{# desktop_sso_dispatch is only set when this template is invoked by zilencer.views #}
action="{% url 'zilencer.views.account_deployment_dispatch' %}"
{% else %}
action="{% url 'django.contrib.auth.views.login' %}?next={{ next }}"
@ -70,7 +70,7 @@ autofocus('#id_username');
</div>
</div>
{% if not sso_only %}
{% if not desktop_sso_dispatch %}
<div class="control-group">
<label for="id_password" class="control-label">Password</label>
<div class="controls">
@ -81,7 +81,7 @@ autofocus('#id_username');
<div class="control-group">
<div class="controls">
<input type="submit" class="btn btn-large btn-primary" value="Log in" />
{% if not sso_only %}
{% if not desktop_sso_dispatch %}
<span class="login-forgot-password">
<a href="{% url 'django.contrib.auth.views.password_reset' %}">Forgot password?</a>
</span>
@ -90,7 +90,7 @@ autofocus('#id_username');
</div>
</form>
{% if not sso_only %}
{% if not desktop_sso_dispatch %}
<div class="login-google">
or <a href="/accounts/login/openid/" class="login-google-button zocial google">Sign in with Google</a>
</div>

View File

@ -92,6 +92,6 @@ def account_deployment_dispatch(request, **kwargs):
sso_unknown_email = True
template_response = django_login_page(request, **kwargs)
template_response.context_data['sso_only'] = True
template_response.context_data['sso_unknown_email'] = sso_unknown_email
template_response.context_data['desktop_sso_dispatch'] = True
template_response.context_data['desktop_sso_unknown_email'] = sso_unknown_email
return template_response