{% extends "base.html" %}
{% load staticfiles %}

{% block extra_css %}
<link href="{% static "css/entry.css" %}" rel="stylesheet">
{% endblock extra_css %}

{% block content %}

<div class="row">
  <div class="signup-form">
    <h2>Sign up</h2>
    <form action="/signup" method="post">
      {% csrf_token %}
      {% if msg %}<div class="alert alert-error">{{ msg }}</div>{% endif %}
      <fieldset>
        <div class="clearfix control-group{% if signup_form.errors.email %} error{% endif %}">
          <input type="text" name="{{signup_form.email.name}}" placeholder="type your email here…" class="col-md-3" {% if signup_form.email.value %}value="{{signup_form.email.value}}"{% endif %}>
          <span class="help-inline">{{signup_form.errors.email}}</span>
        </div>

        <div class="clearfix control-group{% if signup_form.errors.password %} error{% endif %}">
          <input type="password" name="{{signup_form.password.name}}" placeholder="type your password..." class="col-md-3">
          <span class="help-inline">{{signup_form.errors.password}}</span>
        </div>

        <div class="clearfix control-group{% if signup_form.errors.same_password_again %} error{% endif %}">
          <input type="password" name="{{signup_form.same_password_again.name}}" placeholder="type that same password again..." class="col-md-3">
          <span class="help-inline">{{signup_form.errors.same_password_again}}</span>
        </div>

        <button class="btn btn-info" type="submit">Sign up</button>
      </fieldset>
    </form>
  </div>
</div>

{% endblock content %}

{% block extra_js %}
<script>
$(".nav li").removeClass("active");
$(".nav #signup").addClass("active");
</script>
{% endblock %}
