<?= $this->extend('themes/vuexy/main/defaultlayout') ?>

<?= $this->section('content'); ?>
<!--Content Body-->
<div class="row">
    <div class="col-md-12">
        <div class="card mb-4">
            <h5 class="card-header">Perfil de Usuario</h5>
            <!-- Account -->
            <div class="card-body">
                <form id="formAccountSettings" method="post" action="<?= route_to("profileStore") ?>">
                    <?= csrf_field() ?>
                    <div class="row">
                        <div class="mb-3 col-md-4">
                            <label for="first_name" class="form-label"><?= lang("App.profile_first_name") ?> *</label>
                            <input
                                    class="form-control"
                                    tabindex="1"
                                    type="text"
                                    id="first_name"
                                    name="first_name"
                                    placeholder="<?= lang("App.profile_first_name_ph") ?>"
                                    value="<?= (isset($obj)) ? $obj->first_name : set_value('first_name'); ?>"
                                    autofocus
                            />
                        </div>
                        <div class="mb-3 col-md-4">
                            <label for="last_name" class="form-label"><?= lang("App.profile_last_name") ?> *</label>
                            <input class="form-control"
                                   tabindex="2"
                                   type="text"
                                   name="last_name"
                                   id="last_name"
                                   placeholder="<?= lang("App.profile_last_name_ph") ?>"
                                   value="<?= (isset($obj)) ? $obj->last_name : set_value('last_name'); ?>"
                            />
                        </div>
                        <div class="mb-3 col-md-4">
                            <label for="email" class="form-label"><?= lang("App.profile_email") ?></label>
                            <input
                                    class="form-control"
                                    tabindex="3"
                                    type="text"
                                    id="email"
                                    name="email"
                                    disabled
                                    placeholder="<?= lang("App.profile_email_ph") ?>"
                                    value="<?= (isset($obj)) ? $obj->email : set_value('email'); ?>"
                            />
                        </div>
                        <div class="mb-3 col-md-6">
                            <label for="new_pwd" class="form-label"><?= lang("App.profile_password") ?></label>
                            <input
                                    class="form-control"
                                    tabindex="4"
                                    type="text"
                                    id="new_pwd"
                                    name="new_pwd"
                                    placeholder="<?= lang("App.profile_password_ph") ?>"
                                    value=""
                            />
                        </div>
                        <div class="mb-3 col-md-6">
                            <label for="new_pwd_confirm" class="form-label"><?= lang("App.profile_confirm_password") ?></label>
                            <input
                                    class="form-control"
                                    tabindex="5"
                                    type="text"
                                    id="new_pwd_confirm"
                                    name="new_pwd_confirm"
                                    placeholder="<?= lang("App.profile_confirm_password_ph") ?>"
                                    value=""
                            />
                        </div>
                    </div>
                    <div class="mt-2">
                        <button type="submit" class="btn btn-primary me-2"><?= lang("Basic.global.Save") ?? '' ?></button>
                        <?= anchor(route_to("home"), lang("Basic.global.Cancel"), ["class" => "btn btn-dark"]) ?>
                    </div>
                </form>
            </div>
            <!-- /Account -->
        </div>
    </div>   

</div>
</div>


<?= $this->endSection() ?>



<?= $this->section('additionalInlineJs') ?>
"use strict";
$(document).ready(function () {
    $('#first_name').focus();
});

<?= $this->endSection() ?>
