<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Sistem Informasi Peminjaman Lab | <?php echo $title; ?></title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <!-- Font Awesome -->
  <link rel="stylesheet" href="<?php echo base_url('assets/') ?>plugins/fontawesome-free/css/all.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  <!-- icheck bootstrap -->
  <link rel="stylesheet" href="<?php echo base_url('assets/') ?>plugins/icheck-bootstrap/icheck-bootstrap.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="<?php echo base_url('assets/') ?>plugins/sweetalert2-theme-bootstrap-4/bootstrap-4.min.css">
  <link rel="stylesheet" href="<?php echo base_url('assets/') ?>plugins/toastr/toastr.min.css">
  <link rel="stylesheet" href="<?php echo base_url('assets/') ?>dist/css/adminlte.min.css">
  <link rel="stylesheet" href="<?php echo base_url('assets/') ?>css/style.css">
  <!-- Google Font: Source Sans Pro -->
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
  <script src="http://code.jquery.com/js-2.1.1.min.js"></script>
 
</head>
<body class="hold-transition login-page" style="background: url('<?php echo base_url('assets/') ?>dist/img/bg.jpg');">
  <?php $this->load->view('ekstra/modal') ?>

  <div class="login-box">
    <!-- /.login-logo -->
    <div class="card mg-8 pd-8 ">
      <div class="card-body mx-8">
                        <div class="text-center">
                            <h1 class="h4 text-gray-900 mb-4">Daftar Akun</h1>
                        </div>
                        <form action="<?php echo base_url('auth/mendaftar') ?>" method="post">
                        <div class="alert alert-danger" style="display: none" role="alert" id="alertdaftar"></div>
                        <span id="alertusername"></span>
                                    <div class="input-group mb-1">
                                        <input type="text" name="nama_lengkap" class="form-control" placeholder="Nama Lengkap">
                                        <div class="input-group-append">
                                            <div class="input-group-text">
                                                <span class="fas fa-id-card"></span>
                                            </div>
                                        </div>
                                     </div>
                                     <?= form_error('nama_lengkap','<small class="text-danger pl-4">', '</small>')?>
                                <div class="input-group mb-1">
                                    <input type="text" id="usernamedaftar" name="username" class="form-control usernamedaftar" placeholder="Username">
                                    
                                    <div class="input-group-append">
                                        <div class="input-group-text">
                                            <span class="fas fa-user"></span>
                                        </div>
                                    </div>  
                                </div>
                                <?= form_error('username','<small class="text-danger pl-4">', '</small>')?>
                                <div class="input-group mb-1">
                                    <input type="password" name="password" id="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>
                                <?= form_error('password', '<small class="text-danger pl-4">', '</small>')?>
                                <div class="input-group mb-1">
                                    <input type="password" name="password2" id="password2" class="form-control" placeholder="Konfirmasi Password">
                                    <div class="input-group-append">
                                        <div class="input-group-text">
                                            <span class="fas fa-lock"></span>
                                        </div>
                                    </div>
                                </div>
                                <?= form_error('password2', '<small class="text-danger pl-4">', '</small>')?>
                                <div class="input-group mb-1">
                                    <input type="text" id="nip" name="nip" class="form-control" onkeypress="return isNumberKey(event)" onkeyup="return ceknip()" placeholder="NIP/NIS">
                                        <div class="input-group-append">
                                        <div class="input-group-text">
                                            <span class="fas fa-sort-numeric-up-alt"></span>
                                        </div>
                                    </div>
                                   
                                </div>
                                <?= form_error('nip', '<small class="text-danger pl-4">', '</small>')?>
                                <button type="submit" id="daftar" name="daftar" class="btn btn-primary btn-block btn-flat" onsubmit="event.preventDefault()">Daftar</button>
                            </div>
                        </form>

                        <div class="text-center">
                            <a class="btn btn-outline-primary btn-user btn-block" href="<?= base_url('auth'); ?>">Sudah Punya Akun? Masuk!</a>
                        </div>
                    </div>    
                </div>   
            </div>
        </div>
    </div>

</div>


<!-- jQuery -->
<script src="<?= base_url('assets/') ?>plugins/jquery/jquery.min.js"></script>
  <!-- Bootstrap 4 -->
  <script src="<?= base_url('assets/') ?>plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
  <!-- SweetAlert2 -->
  <script src="<?= base_url('assets/') ?>plugins/sweetalert2/sweetalert2.min.js"></script>
  <!-- Toastr -->
  <script src="<?= base_url('assets/') ?>plugins/toastr/toastr.min.js"></script>
  <!-- AdminLTE App -->
  <script src="<?= base_url('assets/') ?>dist/js/adminlte.min.js"></script>
  <!-- AdminLTE for demo purposes -->
  <script src="<?= base_url('assets/') ?>dist/js/demo.js"></script>
  <script src="<?= base_url('assets/') ?> plugins/jquery-validation/jquery.validate.js"></script>
  <script src="<?= base_url('assets/') ?>js/validation.js" type="text/javascript" ></script>
  <script src="<?= base_url('assets/') ?>js/main.js" type="text/javascript"></script>

</body>

</html>
