<div class="row justify-content-center">
    <div class="col">
        <div class="card shadow-sm border-bottom-primary">
            <div class="card-header bg-white py-3">
                <div class="row">
                    <div class="col">
                        <h4 class="h5 align-middle m-0 font-weight-bold text-primary">
                            Creación de Nuevo Abogado
                        </h4>
                    </div>
                    <div class="col-auto">


                        <?php if( $this->uri->segment(3) =="cf" || $this->uri->segment(3)=="ccs" || $this->uri->segment(3)=="cca" ) { ?>

                            <a href="#" onclick="history.back()" class="btn btn-sm btn-secondary btn-icon-split">
                                <span class="icon">
                                    <i class="fa fa-arrow-left"></i>
                                </span>
                                <span class="text">
                                    Volver
                                </span>
                            </a>

                        <?php } else { ?>

                            <a href="<?= base_url('abogados') ?>" class="btn btn-sm btn-secondary btn-icon-split">
                                <span class="icon">
                                    <i class="fa fa-arrow-left"></i>
                                </span>
                                <span class="text">
                                    Volver
                                </span>
                            </a>
    
                        <?php } ?>

                    </div>
                </div>
            </div>
            <div class="card-body">
                <?= $this->session->flashdata('pesan'); ?>
                <?= form_open(); ?>
                
                <input type="hidden" name="hidd_origen" id="hidd_origen" value="<?= $this->uri->segment(3); ?>">
                
                <div class="row form-group">
                    <label class="col-md-3 text-md-right" for="nombre_abogado">Nombre Abogado</label>
                    <div class="col-md-4">
                        <div class="input-group">
                            <div class="input-group-prepend">
                                <span class="input-group-text" id="basic-addon1"><i class="fa fa-fw fa-user-tie"></i></span>
                            </div>
                            <input value="<?= set_value('nombre_abogado'); ?>" name="nombre_abogado" id="nombre_abogado" type="text" class="form-control" placeholder="Ingresar Nombre de Abogado">
                        </div>
                        <?= form_error('nombre_abogado', '<small class="text-danger">', '</small>'); ?>
                    </div>
                </div>

                <div class="row form-group">
                    <label class="col-md-3 text-md-right" for="rut">RUT Abogado</label>
                    <div class="col-md-4">
                        <div class="input-group">
                            <div class="input-group-prepend">
                                <span class="input-group-text" id="basic-addon1"><i class="fa fa-fw fa-user-tie"></i></span>
                            </div>
                            <input value="<?= set_value('rut'); ?>" name="rut" id="rut" type="text" class="form-control" placeholder="Ingresar RUT de Abogado">
                        </div>
                        <?= form_error('rut', '<small class="text-danger">', '</small>'); ?>
                    </div>
                </div>


                <div class="row form-group">
                    <label class="col-md-3 text-md-right" for="telefono">Teléfono</label>
                    <div class="col-md-4">
                        <div class="input-group">
                            <div class="input-group-prepend">
                                <span class="input-group-text" id="basic-addon1"><i class="fa fa-fw fa-phone"></i></span>
                            </div>
                            <input value="<?= set_value('telefono'); ?>" name="telefono" id="telefono" type="text" class="form-control" placeholder="Ingresar Teléfono">
                        </div>
                        <?= form_error('telefono', '<small class="text-danger">', '</small>'); ?>
                    </div>
                </div>
                
                <div class="row form-group">
                    <label class="col-md-3 text-md-right" for="direccion">Dirección</label>
                    <div class="col-md-4">
                        <div class="input-group">
                            <div class="input-group-prepend">
                                <span class="input-group-text" id="basic-addon1"><i class="fa fa-fw fa-location-arrow"></i></span>
                            </div>
                            <textarea name="direccion" id="direccion" class="form-control" rows="4" placeholder="Ingresar Dirección"><?= set_value('direccion'); ?></textarea>
                        </div>
                        <?= form_error('direccion', '<small class="text-danger">', '</small>'); ?>
                    </div>
                </div>

                <div class="row form-group">
                    <label class="col-md-3 text-md-right" for="email">Email</label>
                    <div class="col-md-4">
                        <div class="input-group">
                            <div class="input-group-prepend">
                                <span class="input-group-text" id="basic-addon1"><i class="fa fa-fw fa-at"></i></span>
                            </div>
                            <input value="<?= set_value('email'); ?>" name="email" id="email" type="text" class="form-control" placeholder="Ingresar Email">
                        </div>
                        <?= form_error('email', '<small class="text-danger">', '</small>'); ?>
                    </div>
                </div>


                <input type="hidden" name="is_active" value="1">

                <div class="row form-group">
                    <div class="col-md-4 offset-md-3">
                        <button type="submit" class="btn btn-success">Crear Abogado</button>
                    </div>
                </div>
                <?= form_close(); ?>
            </div>
        </div>
    </div>
</div>