{extends file="layout/layout.tpl"}
{block name=main}
<div class="slim-mainpanel">
      <div class="container">
        <div class="slim-pageheader">
          <ol class="breadcrumb slim-breadcrumb">
            <li class="breadcrumb-item"><a href="#">Admin</a></li>
            <li class="breadcrumb-item"><a href="#">User</a></li>
            <li class="breadcrumb-item active" aria-current="page">Create</li>
          </ol>
          <h6 class="slim-pagetitle">Create user</h6>
        </div><!-- slim-pageheader -->

        <div class="section-wrapper">
          {if $error}
          <div class="alert alert-danger mg-b-0" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
              <span aria-hidden="true">×</span>
            </button>
            <strong>[ERROR]</strong> {$error->listErrors()}
          </div><br>
          {/if}
          {if $msg}
          <div class="alert alert-success mg-b-0" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
              <span aria-hidden="true">×</span>
            </button>
            <strong>[SUCCESS]</strong> {$msg}
          </div><br>
          {/if}

          <form method="POST" action="{base_url()}/admin/createuser">
          <div class="form-layout">
            <div class="row mg-b-25">

              <div class="col-lg-12">
                <div class="form-group">
                  <label class="form-control-label">Username: <span class="tx-danger">*</span></label>
                  <input class="form-control" type="text" value="{set_value('user')}" name="user" placeholder="Enter Username">
                </div>
              </div><!-- col-4 -->
              <div class="col-lg-12">
                <div class="form-group">
                  <label class="form-control-label">Password: <span class="tx-danger">*</span></label>
                  <input class="form-control" type="text" value="{set_value('password')}" name="password" placeholder="Enter Email">
                </div>
              </div><!-- col-4 -->
              <div class="col-lg-12">
                <div class="form-group">
                  <label class="form-control-label">Confirm Password: <span class="tx-danger">*</span></label>
                  <input class="form-control" value="{set_value('confirmpassword')}" type="password" name="confirmpassword"  placeholder="Enter Password">
                </div>
              </div><!-- col-4 -->
              <div class="col-lg-12">
                <div class="form-group mg-b-10-force">
                  <label class="form-control-label">Email: <span class="tx-danger">*</span></label>
                  <input class="form-control" type="text" value="{set_value('email')}" name="email"  placeholder="Email addres">
                </div>
              </div><!-- col-8 -->
              <div class="col-lg-12">
                <div class="form-group mg-b-10-force">
                  <label class="form-control-label">Status: <span class="tx-danger">*</span></label>
                  <select class="form-control select2" name="ustatus" data-placeholder="Choose status" tabindex="-1" aria-hidden="true">
                    <option label="Choose Status"></option>
                    <option value="0">Desativada</option>
                    <option value="1" selected>Ativada</option>
                    <option value="16">Banned</option>
                  </select>

              </div>
              </div><!-- col-4 -->

              <div class="col-lg-12">
                <div class="form-group mg-b-10-force">
                  <label class="form-control-label">Level: <span class="tx-danger">*</span></label>
                  <select class="form-control select2" name="ulevel" data-placeholder="Choose status" tabindex="-1" aria-hidden="true">
                    <option label="Choose Level"></option>
                    <option value="0" selected>Normal User</option>
                    <option value="2">Admin</option>
                  </select>

              </div>
              </div><!-- col-4 -->

            </div><!-- row -->

            <div class="form-layout-footer">
              <button type="submit" id="update" class="btn btn-primary bd-0">Create User</button>
              <button class="btn btn-secondary bd-0">Cancel</button>
            </div><!-- form-layout-footer -->
          </div><!-- form-layout -->
                    <input type="hidden" name="{csrf_token()}" value="{csrf_hash()}" />
        </form>
        </div><!-- section-wrapper -->

      </div><!-- container -->
    </div>
{/block}