<?php
defined('BASEPATH') OR exit('No direct script access allowed');

?>

            <div class="content-wrapper">
                <section class="content-header">
                    <?php echo $pagetitle; ?>
                    <?php echo $breadcrumb; ?>
                </section>

                <section class="content">
                    <div class="row">
                        <div class="col-md-12">
                             <div class="box">
                                <div class="box-header with-border">
                                    <h3 class="box-title"><?php echo lang('fincas_edit_finca'); ?></h3>
                                </div>
                                <div class="box-body">
                                    <?php echo $message;?>  
                                    
                                    <!-- El form_open ya tiene establecido el method="POST" -->
                                    <?php echo form_open(current_url(), array('class' => 'form-horizontal', 'id' => 'form-edit_user')); ?>
                                        <div class="form-group">
                                        <div class="form-group">
                                            <?php echo lang('fincas_dpto', 'dpto', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-3">
                                                <?php  
                                                    $attribute = 'class="form-control selectpicker" title="Departamentos" id="dpto" name="dpto" '; 
                                                    echo form_dropdown('dpto', $dpto, $dpto_sel, $attribute); ?>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('fincas_distrito', 'distrito', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-3">
                                                <?php  
                                                    $attribute = 'class="form-control selectpicker" title="Distrito" id="distrito" name="distrito" '; 
                                                    echo form_dropdown('distrito', $distritos, $distritos_sel, $attribute); ?>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('fincas_colonia', 'colonia', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-6">
                                                <?php  
                                                    $attribute = 'class="selectpicker form-control" title="Departamentos y Distritos" id="colonia" data-live-search="true"'; 
                                                    echo form_dropdown('colonia', $colonias, $colonias_sel, $attribute); ?>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('fincas_finca', 'finca', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-1">
                                                <?php echo form_input($finca);?>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('fincas_padron', 'padron', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-3">
                                                <?php echo form_input($padron);?>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('fincas_sup_legal', 'sup_legal', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-3">
                                                <?php echo form_input($sup_legal);?>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('fincas_sup_gis', 'sup_gis', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-3">
                                                <?php echo form_input($sup_gis);?>
                                            </div>
                                        </div>                                        
                                        <div class="form-group">
                                            <?php echo lang('fincas_observacion', 'observacion', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-4">
                                                <?php echo form_textarea($observacion) ?>                   
                                            </div>                                            
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('fincas_antecedente', 'antecedente', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-4">
                                                <?php echo form_textarea($antecedente) ?>                   
                                            </div>                                            
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('fincas_fecha_inscrip', 'fecha_inscrip', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-3">
                                                <div class="input-group date" data-provide="datepicker" data-date-format="dd/mm/yyyy">
                                                    <div class="input-group">
                                                        <div class="input-group-addon">
                                                            <i class="fa fa-calendar"></i>
                                                        </div>
                                                        <?php echo form_input($fecha_inscrip);?>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                       
                                        <div class="form-group">
                                            <div class="col-sm-offset-2 col-sm-10">
                                                <div class="btn-group">
                                                    <?php echo form_button(array('type' => 'submit', 'class' => 'btn btn-primary btn-flat', 'content' => lang('actions_submit'))); ?>
                                                    <?php echo form_button(array('type' => 'reset', 'class' => 'btn btn-warning btn-flat', 'content' => lang('actions_reset'))); ?>
                                                    <?php echo anchor('man_espacial/fincas/fincas', lang('actions_cancel'), array('class' => 'btn btn-default btn-flat')); ?>
                                                </div>
                                            </div>
                                        </div>
                                    <?php echo form_close();?>
                                </div>
                            </div>
                         </div>
                    </div>
                </section>
            </div>
