<?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 #004785;">
                <!--div class="box-header">
                    <h3 class="box-title"><?= lang('update_info'); ?></h3>
                </div-->
                <div class="box-body">
                    <div class="col-lg-12">
                        <?php $attrib = array('class' => 'validation', 'role' => 'form');
                        echo form_open("makers/edit/".$maker->id, $attrib); ?>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                   <div class="form-group">
                                    <?= lang("maker", "maker"); ?>
                                    <?php echo form_input('maker', (isset($maker->maker)?$maker->maker:""), 'class="form-control" id="maker" required="required" maxlength="80"'); ?>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <div class="col-md-12 text-right">
                                    <?php echo form_submit('edit_maker', $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>
                        <?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>
$(document).ready(function () {
    $('#maker').focus();

    $('#btn-cancel').click(function (e) {
        if (confirm("¿Está seguro que desea cancelar?")) {
            window.location.href = base_url + "makers"
        }
    });
});
</script>