<?php $this->load->view('web/layout/header'); ?>

<body class="bg-primary">

    <div class="authentication-page hero-1 py-5">
        <!-- bg-overlay-img -->
        <div class="bg-overlay overflow-hidden bg-transparent">
            <div class="hero-1-bg"></div>
        </div>

        <div class="container">
            <div class="row justify-content-center  mt-sm-5">
                <div class="col-md-8 col-lg-6 col-xl-5">
                    <div>
                        <div class="text-center mb-5">
                            <a href="index-1.html" class="mb-3 d-block auth-logo">
                                    <img src="images/logo-light.png" alt="" height="22" class="logo">
                                </a>
                            <h5 class="font-16 text-white-50">DocNex Publicações</h5>
                        </div>

                        <div class="card">
                            <div class="card-body p-4">
                                <div class="text-center mt-2">
                                    <h5>Formulário de cadastro!</h5>
                                </div>

                                <div class="p-2 mt-4">
                                    <?php echo form_open('restricted/auth/register'); ?>

                                        <div class="mb-3">
                                            <label class="form-label" for="name">Nome</label>
                                            <input type="text" class="form-control" name="first_name" placeholder="Digite seu nome..." value="<?php echo set_value('first_name'); ?>">
                                            <?php echo form_error('first_name', '<div class="text-danger">', '</div>'); ?>
                                        </div>
                                        <div class="mb-3">
                                            <label class="form-label" for="last_name">Sobrenome</label>
                                            <input type="text" class="form-control" name="last_name" placeholder="Digite seu sobrenome..." value="<?php echo set_value('last_name'); ?>">
                                            <?php echo form_error('last_name', '<div class="text-danger">', '</div>'); ?>
                                        </div>
                                        <div class="mb-3">
                                            <label class="form-label" for="email">Email</label>
                                            <input type="text" class="form-control" name="email" placeholder="Digite seu email..." value="<?php echo set_value('email'); ?>">
                                            <?php echo form_error('email', '<div class="text-danger">', '</div>'); ?>
                                        </div>
                                        <div class="mb-3">
                                            <label class="form-label" for="email">Telefone (Whatsapp)</label>
                                            <input type="text" class="form-control" name="phone" placeholder="Digite seu telefone..." value="<?php echo set_value('phone'); ?>">
                                            <?php echo form_error('phone', '<div class="text-danger">', '</div>'); ?>
                                        </div>
                                        <div class="mb-3">
                                        <label for="group">Cargo</label>
                                        <select class="form-control" name="group">
                                            <?php foreach ($groups as $group) : ?>
                                                <?php if($group->id != 1): ?>
                                                    <option value="<?php echo $group->id; ?>"> <?php echo $group->description; ?></option>
                                                <?php endif; ?>
                                            <?php endforeach; ?>
                                        </select>
                                    </div>
                                        <div class="mb-3">
                                            <label class="form-label" for="password">Senha</label>
                                            <input type="password" class="form-control" name="password" placeholder="Digite sua senha...">
                                            <?php echo form_error('password', '<div class="text-danger">', '</div>'); ?>
                                        </div>
                                        <div class="mb-3">
                                            <label class="form-label" for="check_password">Confirme sua senha</label>
                                            <input type="password" class="form-control" name="confirm_password" placeholder="Digite sua senha novamente...">
                                            <?php echo form_error('confirm_password', '<div class="text-danger">', '</div>'); ?>
                                        </div>

                                        <div class="mt-3 d-grid">
                                            <button type="submit" class="btn btn-info">Criar conta</button>
                                        </div>
                                    <?php echo form_close(); ?>
                                    <!-- end-form -->
                                </div>
                            </div>
                        </div>

                        <div class="mt-5 mb-5 text-center text-white-50">
                            <p>Já possui uma conta ? <a href="<?php echo base_url('restricted/auth'); ?>" class="font-weight-semibold text-white"> Fazer login </a> </p>
                        </div>

                    </div>
                </div>
            </div>
            <!-- end row -->
        </div>
        <!-- end container -->
    </div>


    <!-- Javascript -->
    <script src="<?php echo base_url('public/assets/web/js/bootstrap.bundle.min.js'); ?>"></script>

    <!-- unicon -->
    <script src="https://unicons.iconscout.com/release/v2.1.11/script/monochrome/bundle.js"></script>

</body>

</html>