{% extends 'templates/app.twig' %}

	{% block content %}

        <div class="col-md-12 col-lg-12 " >
   	<!-- Display Errors and Session Messages iF Any--> 
			 {% for error in errors %}
				{% for error_message in error %}
		       		 <div class="alert alert-danger alert-dismissible" role="alert">
					  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					   {{ error_message|e }}
					</div>
		    	{% endfor %}
		    {% endfor %}


          <div class="col-md-5 col-lg-6 pull-left text-center" >
            <img src="{{ base_url()}}/img/icons/png/Infinity-Loop.png" alt="Welcome to RawPHP">
            <h4>RawPHP</h4>
          </div>

		<div class="col-md-6 col-lg-6 pull-right">
		<h4><span class="fui-user"></span> Sign in</h4>

          <div class="login-form" >
          <form action="{{ path_for('auth.signin') }}" method="post" autocomplete="off"> 
            
            
            <div class="form-group {{ errors.email ? 'has-error' : '' }}">
              <input type="email" class="form-control login-field" value="{{ old.email }}" name="email" placeholder="Enter your email" id="login-email">
              <label class="login-field-icon fui-user" for="login-email"></label>
              
              {% if errors.email %}
              	<span class="help-block">{{ errors.email | first }}</span>
              {% endif %}	
            </div>

            <div class="form-group">
              <input type="password" class="form-control login-field" value=""  name="password" placeholder="Password" id="login-pass">
              <label class="login-field-icon fui-lock" for="login-pass"></label>
              {% if errors.password %}
              	<span class="help-block">{{ errors.password | first }}</span>
              {% endif %}	
            </div>

            <button class="btn btn-primary btn-lg btn-block" type="submit">Sign i</button>
            
             {{ csrf.field | raw }}
            </form>
          </div>
          </div>
        </div>
	{% endblock%}
