<?php $this->include('rs/utils.php')?>
<?= $this->extend('rs/template-visitor'); ?>
 <?= $this->section('content'); ?>
    <div class="row justify-content-center">
     <div class="col-lg-8 col-md-12">
      <div class="card o-hidden border-0 shadow-lg my-5">
       <div class="card-body p-0">
        <div class="row">
         <div class="col-lg-6 d-none d-lg-block bg-login-image"></div>
		  <div class="col-lg-6">
          <div class="p-5">
           <h3>Login</h3>
           <hr>
           <?php if (session()->get('success')): ?>
           <div class="alert alert-success" role="alert">
            <?= session()->get('success') ?>
           </div>
           <?php endif; ?>
           <form class="" action="/login" method="post">
             <div class="form-group">
              <label for="username">Email</label>
              <input type="email" class="form-control" name="email" id="email" value="<?= set_value('email') ?>">
             </div>
             <div class="form-group">
              <label for="password">Password</label>
              <input type="password" class="form-control" name="password" id="password" value="">
             </div>
             <?php if (isset($validation)): ?>
               <div class="col-12">
                 <div class="alert alert-danger" role="alert">
                   <?= $validation->listErrors() ?>
                 </div>
               </div>
             <?php endif; ?>
             <div class="row">
               <div class="col-12 col-sm-5">
                 <button type="submit" class="btn btn-primary">Login</button>
               </div>
              </div>
           </form>
          </div>
         </div>
        </div>
       </div>
      </div>
     </div>
    </div>
 <?= $this->endsection(); ?>