{% include 'registration/login_layout.html' %}
{% load static %}



  <body class="login-page">
    <div class="login-box">
      <div class="login-logo">
        <h2>{{function_name}}</h2>
<!--        <a href=""><b>{{ function_name }}</b></a>-->
      </div>
      <div class="login-box-body">
        <p class="login-box-msg">Sign in </p>
         {% if messages %}
            {% for message in messages %}
              <div class="alert alert-danger" role="alert">
                {{ message }}
              </div>
            {% endfor %}
        {% endif %}
        <form method="POST" enctype="multipart/form-data" action="">
          {% csrf_token %}
          <input type="hidden" name="user_type" value="{{ function_name }}">
          <div class="form-group has-feedback">
            <input type="text" class="form-control" name ="email" placeholder="Email"/>
            <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
          </div>
          <div class="form-group has-feedback">
            <input type="password" class="form-control" name ="password" placeholder="Password"/>
            <span class="glyphicon glyphicon-lock form-control-feedback"></span>
          </div>
          {% comment %} <div class="form-group">
            <label for="user_type">User Type</label>
            <select class="form-control" name="user_type" id="user_type">
                <option value="admin">Admin</option>
                <option value="gate_keeper">Gate Keeper</option>
                <option value="employee">Employee</option>
                <option value="visitor">Visitor</option>
            </select>
        </div> {% endcomment %}
          <div class="row">
            <div class="col-xs-8">
<!--              <div class="checkbox icheck">-->
<!--                <label>-->
<!--                  <input type="checkbox"> Remember Me-->
<!--                </label>-->
<!--              </div>-->
            </div>
            <div class="col-xs-4">
              <button type="submit" class="btn btn-primary btn-block btn-flat">Sign In</button>
            </div>
          </div>
        </form>



<!--        <a href="#">I forgot my password</a><br>-->
<!--        <a href="register.html" class="text-center">Register a new membership</a>-->

      </div><!-- /.login-box-body -->
        {% if function_name == "Visitors" %}
            <div class="row">
                <div class="col-md-6">
                      <a href="{% url 'gate_keeper' %}" class="btn btn-primary btn-block btn-flat">Gate Keeper</a>
                </div>
                <div class="col-md-6">
                      <button type="button" class="btn btn-primary btn-block btn-flat">Admin</button>
                </div>
            </div>
        {% endif %}
        

    </div><!-- /.login-box -->

    <!-- jQuery 2.1.3 -->
    <script src="{% static 'plugins/jQuery/jQuery-2.1.3.min.js' %}"></script>
    <!-- Bootstrap 3.3.2 JS -->
    <script src="{% static 'bootstrap/js/bootstrap.min.js' %}" type="text/javascript"></script>
    <!-- iCheck -->
    <script src="{% static 'plugins/iCheck/icheck.min.js' %}" type="text/javascript"></script>
    <script>
      $(function () {
        $('input').iCheck({
          checkboxClass: 'icheckbox_square-blue',
          radioClass: 'iradio_square-blue',
          increaseArea: '20%' // optional
        });
      });
    </script>
  </body>
</html>