<?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('geocolonias_edit_geocolonia'); ?></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">
                                            <?php echo lang('geocolonias_dpto_cod', 'dpto_cod', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-md-10">    
                                                <select id="departamento" name="departamento" class="selectpicker">
                                                <?php
                                                    foreach ($ddl_dpto as $row) {
                                                        if ($geocolonia_dpto_cod['value'] == $row->dpto) {
                                                            echo '<option value="'.$row->dpto.'" selected>'.$row->dpto.' - '.$row->dpto_desc.'</option>';
                                                        }else{
                                                            echo '<option value="'.$row->dpto.'">'.$row->dpto.' - '.$row->dpto_desc.'</option>';
                                                        }
                                                    }
                                                ?>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('geocolonias_dist_cod', 'dist_cod', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-md-10">    
                                                <select id="dist" name="dist" class="selectpicker">
                                                <?php
                                                    foreach ($ddl_dist as $rows) {
                                                        if ($geocolonia_dpto_cod['value'] == $rows->dpto) {
                                                            if ($geocolonia_dist_cod['value'] == $rows->distrito) {
                                                                echo '<option value="'.$rows->distrito.'" selected>'.$rows->distrito.' - '.$rows->dist_desc.'</option>';
                                                            }else{
                                                                echo '<option value="'.$rows->distrito.'">'.$rows->distrito.' - '.$rows->dist_desc.'</option>';
                                                            }
                                                        }                                                        
                                                    }
                                                ?>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('geocolonias_col_cod', 'col_cod', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-10">
                                                <?php echo form_input($geocolonia_col_cod);?>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('geocolonias_id_codgeo', 'id_codgeo', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-10">
                                                <?php echo form_input($geocolonia_id_codgeo);?>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <?php echo lang('geocolonias_col_desc', 'col_desc', array('class' => 'col-sm-2 control-label')); ?>
                                            <div class="col-sm-10">
                                                <?php echo form_input($geocolonia_col_desc);?>
                                            </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/geocolonias/geocolonias', lang('actions_cancel'), array('class' => 'btn btn-default btn-flat')); ?>
                                                </div>
                                            </div>
                                        </div>
                                    <?php echo form_close();?>
                                </div>
                            </div>
                         </div>
                    </div>
                </section>
            </div>
