<?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('colonias_edit_colonia'); ?></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('colonias_dpto_cod', 'dpto_cod', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-3">
                                                <?php  
                                                    $attribute = 'class="form-control selectpicker" title="Departamentos" id="dpto_cod" name="dpto_cod" '; 
                                                    echo form_dropdown('dpto_cod', $dpto, $dpto_sel, $attribute); ?>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('colonias_dist_cod', 'dist_cod', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-3">
                                                <?php  
                                                    $attribute = 'class="form-control selectpicker" title="Distrito" id="dist_cod" name="dist_cod" '; 
                                                    echo form_dropdown('dist_cod', $distritos, $distritos_sel, $attribute); ?>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('colonias_col_codgeo', 'dpto_distrito_colonia', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-6">
                                                <?php  
                                                    $attribute = 'class="selectpicker form-control" title="Departamentos y Distritos" id="dpto_distrito_colonia" data-live-search="true"'; 
                                                    echo form_dropdown('dpto_distrito_colonia', $dpto_distrito_colonia, $dpto_distrito_colonia_sel, $attribute); ?>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('colonias_dist_matriz', 'dist_matriz', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-3">
                                                <?php  
                                                    $attribute = 'class="selectpicker form-control" title="Seleccione el distrito matriz" id="dist_matriz" data-live-search="true"'; 
                                                    echo form_dropdown('dist_matriz', $dist_matriz, $dist_matriz_sel, $attribute); ?>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('colonias_col_cod', 'col_cod', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-1">
                                                <?php echo form_input($col_cod);?>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('colonias_col_desc', 'col_desc', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-3">
                                                <?php echo form_input($col_desc);?>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('colonias_resolucion_hab', 'resolucion_hab', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-3">
                                                <?php echo form_input($resolucion_hab);?>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('colonias_fecha_hab', 'fecha_hab', 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_hab);?>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        
                                        <div class="form-group">
                                            <?php echo lang('colonias_antecedentes', 'antecedentes', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-4">
                                                <?php echo form_textarea($antecedentes) ?>                   
                                            </div>                                            
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('colonias_fecha_inscripcion', 'fecha_inscripcion', 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_inscripcion);?>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('colonias_fecha_deslinde', 'fecha_deslinde', 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_deslinde);?>
                                                    </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/colonias/colonias', lang('actions_cancel'), array('class' => 'btn btn-default btn-flat')); ?>
                                                </div>
                                            </div>
                                        </div>
                                    <?php echo form_close();?>
                                </div>
                            </div>
                         </div>
                    </div>
                </section>
            </div>
