<!-- Extend area where template is defined -->
<?= $this->extend('templates/adminlte/nomenu') ?>
<!-- .Extend -->

<!-- Title of the page -->
<?= $this->section('title') ?><?= lang('Auth.register') ?> <?= $this->endSection() ?>
<!-- .Title -->

<!-- CSS of the page -->
<?= $this->section('css') ?>

<?= $this->endSection() ?>
<!-- .CSS -->

<!-- body attribute - class definition -->
<?= $this->section('bodyclass') ?>register-page<?= $this->endSection() ?>
<!-- .body attribute -->

<!-- Main content -->
<?= $this->section('main') ?>
    <div class="register-box">
        <div class="card">
            <div class="card-body register-card-body">
                <p class="login-box-msg">Register a new membership</p>

                <?php include('templates/adminlte/errormessage.php'); ?>

                <form action="<?= url_to('register') ?>" method="post">
                    <?= csrf_field() ?>

                    <!-- Email -->
                    <div class="input-group mb-3">
                        <input type="email" class="form-control" id="floatingEmailInput" name="email" inputmode="email" autocomplete="email" placeholder="<?= lang('Auth.email') ?>" value="<?= old('email') ?>" required>
                        <div class="input-group-append">
                            <div class="input-group-text">
                            <span class="fas fa-envelope"></span>
                            </div>
                        </div>
                    </div>

                    <!-- company_id -->
                     <div class="input-group mb-3">
                        <input type="text" class="form-control" id="floatingCompanyIDInput" name="company_id" inputmode="text" autocomplete="company_id" placeholder="Company ID" value="<?= old('company_id') ?>" required>
                        <div class="input-group-append">
                            <div class="input-group-text">
                            <span class="fas fa-id-card"></span>
                            </div>
                        </div>
                    </div>

                    <!-- employee_id -->
                    <div class="input-group mb-3">
                        <input type="text" class="form-control" id="floatingEmployeeIDInput" name="employee_id" inputmode="text" autocomplete="employee_id" placeholder="Emloyee ID" value="<?= old('employee_id') ?>" required>
                        <div class="input-group-append">
                            <div class="input-group-text">
                            <span class="fas fa-id-card"></span>
                            </div>
                        </div>
                    </div>

                    <!-- display_name -->
                    <div class="input-group mb-3">
                        <input type="text" class="form-control" id="floatingDisplayNameInput" name="display_name" inputmode="text" autocomplete="display_name" placeholder="Display Name" value="<?= old('display_name') ?>" required>
                        <div class="input-group-append">
                            <div class="input-group-text">
                            <span class="fas fa-id-card"></span>
                            </div>
                        </div>
                    </div>

                    <!-- Username -->
                    <div class="input-group mb-3">
                        <input type="text" class="form-control" id="floatingUsernameInput" name="username" inputmode="text" autocomplete="username" placeholder="<?= lang('Auth.username') ?>" value="<?= old('username') ?>" required>
                        <div class="input-group-append">
                            <div class="input-group-text">
                            <span class="fas fa-user"></span>
                            </div>
                        </div>
                    </div>


                    <!-- Password -->
                    <div class="input-group mb-3">
                        <input type="password" class="form-control" id="floatingPasswordInput" name="password" inputmode="text" autocomplete="new-password" placeholder="<?= lang('Auth.password') ?>" required>
                        <div class="input-group-append">
                            <div class="input-group-text">
                            <span class="fas fa-lock"></span>
                            </div>
                        </div>
                    </div>

                    <!-- Password (Again) -->
                    <div class="input-group mb-3">
                        <input type="password" class="form-control" id="floatingPasswordConfirmInput" name="password_confirm" inputmode="text" autocomplete="new-password" placeholder="<?= lang('Auth.passwordConfirm') ?>" required>
                        <div class="input-group-append">
                            <div class="input-group-text">
                            <span class="fas fa-lock"></span>
                            </div>
                        </div>
                    </div>

                    <div class="d-grid col-12 col-md-8 mx-auto m-3">
                        <button type="submit" class="btn btn-primary btn-block"><?= lang('Auth.register') ?></button>
                    </div>

                    <p class="text-center"><?= lang('Auth.haveAccount') ?> <a href="<?= url_to('login') ?>"><?= lang('Auth.login') ?></a></p>

                </form>
            </div>
        </div>
    </div>
<?= $this->endSection() ?>
<!-- .Main content -->
