<?php
global $Conf;
global $Route;
$metacss = "";
$barre = "";
ob_start();
?>
  <br/>
  <div class="row">
    <div class="col-md-6">
      <p align="center"><img src="/pub/res/img/logo/cleo_login.png" alt="logo <?= $Conf->_brandname; ?>" class="img-responsive"/></p>
    </div>
    <div class="col-md-6">
      <div class="panel panel-primary">
        <div class="panel-heading"><i class="fa fa-lock"></i> Connexion <?= $Conf->_brandname; ?></div>
        <div class="panel-body">
          <?php if ($msg != "") {
            echo '<div class="alert alert-danger">' . $msg . '</div>';
          } ?>
          <div class="container-fluid">
            <form role="form" method="post" accept-charset="utf8" action="login">
              <div class="mb-3" id="divUserName">
                <label for="bcusername" class="form-label">Mon identifiant</label>
                <input type="text" class="form-control" name="bcusername" id="bcusername" placeholder="Mon identifiant">
              </div>
              <div class="mb-3" id="divPassWord">
                <label for="bcpassword" class="form-label">Mon mot de passe</label>
                <div class="input-group">
                  <input type="password" class="form-control pwd" name="bcpassword" id="bcpassword" placeholder="Mon mot de passe">
                  <div class="input-group-addon" id="togglePassword">

                    <svg width="18px" height="18px" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                      <path d="M4 10C4 10 5.6 15 12 15M12 15C18.4 15 20 10 20 10M12 15V18M18 17L16 14.5M6 17L8 14.5" stroke="#464455" stroke-linecap="round" stroke-linejoin="round"/>
                    </svg>

                  </div>
                </div>
                <a href="#" id="lnPerdu">Mot de passe perdu ?</a>
              </div>
              <div class="mb-3" id="divEmail" style='display: none;'>
                <label for="bcemail" class="form-label">Mot de passe perdu ? Entrez votre email</label>
                <input type="email" class="form-control" name="bcemail" id="bcemail" placeholder="Mon email">
              </div>
              <button type="submit" class="btn btn-primary pull-right" id="btnSubmit">Se connecter</button>
            </form>
          </div>
        </div>
      </div>
    </div>
  </div>
<?php
$content = ob_get_contents();
ob_clean();
$modal = "";
ob_start();
?>
  <script src="/pub/res/js/jlogin.js"></script>
<?php
$jscript = ob_get_contents();
ob_end_clean();
require_once $Route->_layout;
