{% extends "base/base_layout.html" %}
{% load static %}
{% block sidebar_option %}
sidebar-collapse
{% endblock %}
{% block content %}
<div class="content-wrapper">
   <div class="content-header">
   </div>
   <div class="container-fluid">
      <div class="row">
         <div class="col-lg-12">
            <div class="card">
               <div class="card-body">
                  <div class="h-100 d-flex align-items-center justify-content-center">
                     <div class="login-box">
                        <div class="login-logo">
                           <a href="">Sign in to access</a>
                        </div>
                        <div class="card">
                           <div class="card-body login-card-body">
                              <h1 class="display-2 h-100 d-flex align-items-center justify-content-center">
                                 Mob<strong>SF</strong>
                              </h1>
                              {% if allow_pwd %}
                              <form method="post" action="{% url 'login' %}?next={{next}}">
                                 {% csrf_token %}
                                 {{ form.non_field_errors }}
                                 <div class="input-group mb-3">
                                    <input type="username" name="username" class="form-control" placeholder="Username">
                                    <div class="input-group-append">
                                       <div class="input-group-text">
                                          <span class="fas fa-user"></span>
                                       </div>
                                    </div>
                                 </div>
                                 {% for err in form.username.errors %}
                                 <small> {{ err }} </small><br>
                                 {% endfor %}
                                 <div class="input-group mb-3">
                                    <input type="password" name="password" class="form-control" placeholder="Password">
                                    <div class="input-group-append">
                                       <div class="input-group-text">
                                          <span class="fas fa-lock"></span>
                                       </div>
                                    </div>
                                 </div>
                                 {% for err in form.password.errors %}
                                 <small> {{ err }} </small><br>
                                 {% endfor %}
                                 <div class="row">
                                    <!-- <div class="col-8">
                                       <div class="icheck-primary">
                                       <input type="checkbox" id="remember">
                                       <label for="remember">
                                       Remember Me
                                       </label>
                                       </div>
                                       </div> -->
                                 </div>
                                 <div class="col-12">
                                    <button type="submit" class="btn btn-primary btn-block">Sign In</button>
                                 </div>
                              </form>
                              {% endif %}
                              {% if sso %}
                              <hr>
                              <p>
                              <div class="col-12">
                                 <a href="{% url 'saml_login' %}?next={{next}}" class="btn btn-primary btn-block">Sign in with SSO</a>
                              </div>
                              </p>
                              {% endif %}
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
</div>
{% endblock %}