{% extends "skins/base.html" %}
 {% load i18n admin_urls admin_static static %}

{% block body %}
<body class="hold-transition login-page">
<div class="login-box">
  <div class="login-logo">
    <a href="{% url 'home' %}"><b>Mission</b> Control</a>
  </div>
  <!-- /.login-logo -->
  <div class="login-box-body">
    <p class="login-box-msg">Welcome to Mission Control</p>

    <div class="social-auth-links text-center">
      <a href="{% url 'social:begin' 'google-oauth2' %}?next=/login/?service={{ service }}" class="btn btn-block btn-social btn-google btn-flat"><i class="fa fa-google-plus"></i> Sign in using
        Google</a>
    </div>
    <table width="100%">
  <tr>
    <td><hr /></td>
    <td style="width:1px; padding: 0 10px; white-space: nowrap;">OR</td>
    <td><hr /></td>
  </tr>
</table>​
    {% block content %}
        <div class="row">
            <div class="col-sm-12">
              {% if messages %}
                  <div class="alert alert-info"><ul>
                  {% for message in messages %}
                      <li>{{ message|urlize }}</li>
                  {% endfor %}
                  </ul></div>
              {% endif %}

              {% if form.errors %}
                  <div class="alert alert-danger"><ul>
                  {% for error in form.non_field_errors %}
                      <li>{{ error }}</li>
                  {% endfor %}
                  {% for field in form %}
                      {% for error in field.errors %}
                          <li>{{ error }}</li>
                      {% endfor %}
                  {% endfor %}
                  </ul></div>
              {% endif %}
              <form class="form-login" method="post">
                    {% csrf_token %}
                    <label class="sr-only" for="id_username">{{ form.username.label }}</label>
                    <input type="text" class="form-control" id="id_username" name="username" placeholder="Username or Email Address" required autofocus>
                    <label class="sr-only" for="id_password">{{ form.password.label }}</label>
                    <input type="password" class="form-control" id="id_password" name="password" placeholder="{{ form.password.label }}" required>
                    {% if form.warn %}
                        <label class="checkbox">
                            <input type="checkbox" id="id_warn" name="warn"> {{ form.warn.label }}
                        </label>
                    {% endif %}
                    <button class="btn btn-lg btn-primary btn-block" type="submit">{% trans "Login" %}</button>
                </form>
            </div>
        </div>
    {% endblock content %}  </div>
    <a href="{% url 'password_reset' %}">{% trans 'Forgotten your password?' %}</a>

</div>



<!-- jQuery 2.1.4 -->
  <script src="{% static 'plugins/jQuery/jQuery-2.1.4.min.js' %}"></script>
  <!-- Bootstrap 3.3.5 -->
  <script src="{% static 'js/bootstrap.min.js' %}"></script>
</body>
{% endblock %}
