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

<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box" style="border-top: 2.5px solid #9fc10b;">
                <!-- <div class="box-header">
                    <h3 class="box-title">< ?= lang('enter_info'); ? ></h3>
                </div> -->
                <div class="box-body">
                    <div class="col-lg-12">
                        <?php
                        $attrib = array('class' => 'validation', 'role' => 'form');
                        echo form_open("brands/edit/".$brand->id, $attrib); ?>
                        <div class="row">
                            <?php $this->load->view($this->theme.'brands/partials/form'); ?>
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="col-md-12 text-right">
                                        <?php echo form_submit('edit_brand', $this->lang->line("accept"), 'class="btn btn-primary" id="btn-accept"'); ?>
                                        <a id="btn-cancel" class="btn btn-danger"><?= lang("cancel") ?></a>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <?php echo form_close(); ?>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
    </div>
</section>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>

<!--<script src="< ?= $assets ? >plugins/input-mask/jquery.inputmask.js" type="text/javascript"></script>
<script src="< ?= $assets ? >plugins/input-mask/jquery.inputmask.date.extensions.js" type="text/javascript"></script>-->
<script>
$(document).ready(function () {
    $('#brand_code').focus();
    $('#btn-cancel').click(function (e) {
        if (confirm("¿Está seguro que desea cancelar?")) {
            window.location.href = base_url + "brands"
        }
    });
});
</script>