Files
zulip/templates/zerver/login.html
Tim Abbott e111a2f9a5 [manual] Rename Django app from zephyr to zerver.
This needs to be deployed to both staging and prod at the same
off-peak time (and the schema migration run).

At the time it is deployed, we need to make a few changes directly in
the database:

(1) UPDATE django_content_type set app_label='zerver' where app_label='zephyr';
(2) UPDATE south_migrationhistory set app_name='zerver' where app_name='zephyr';

(imported from commit eb3fd719571740189514ef0b884738cb30df1320)
2013-08-06 07:39:36 -04:00

85 lines
2.5 KiB
HTML

{% extends "zerver/portico.html" %}
{# Login page. #}
{% load minified_js %}
{% block customhead %}
{{ block.super }}
{% minified_js 'signup' %}
{% endblock %}
{% block portico_content %}
<script type="text/javascript">
{% if email %}
autofocus('#id_password');
{% else %}
autofocus('#id_username');
{% endif %}
</script>
<h3>You look familiar.</h3>
{% if form.errors %}
<div class="alert alert-error">
{% for error in form.errors.values %}
<div>{{ error | striptags }}</div>
{% endfor %}
</div>
{% endif %}
{% if email %}
<div class="alert">
You've already registered with this email address. Please log in below.
</div>
{% endif %}
<div class="row">
<div class="span5 login-area">
<form name="login_form" id="login_form" method="post" class="form-horizontal"
action="{% url 'django.contrib.auth.views.login' %}?next={{ request.get_full_path }}">
{% csrf_token %}
<div class="control-group">
<label for="id_username" class="control-label">Email</label>
<div class="controls">
<input id="id_username" type="text" name="username" class="email required" value="{{ email }}" maxlength="72" />
</div>
</div>
<div class="control-group">
<label for="id_password" class="control-label">Password</label>
<div class="controls">
<input id="id_password" name="password" class="required" type="password">
</div>
</div>
<div class="control-group">
<div class="controls">
<input type="submit" class="btn btn-large btn-primary" value="Log in" />
<span style="padding: 1em">
<a href="{% url 'django.contrib.auth.views.password_reset' %}">Forgot password?</a>
</span>
</div>
</div>
</form>
</div>
<div class="span1">
<span>- or -</span>
</div>
<div class="span4">
<a href="/accounts/login/openid/" class="zocial google">Sign in with Google</a>
</div>
</div>
<script type="text/javascript">
if (window.location.hash.substring(0, 1) === "#") {
document.login_form.action += window.location.hash;
}
</script>
{% endblock %}
{% block mixpanel_badge %}
<li><a href="https://mixpanel.com/f/partner">
<img src="//cdn.mxpnl.com/site_media/images/partner/badge_light.png" alt="Mobile Analytics" />
</a></li>
{% endblock %}