<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
<div class="modal-dialog">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-2x">&times;</i>
            </button>
            <h4 class="modal-title" id="myModalLabel"><?php echo lang('edit_type'); ?></h4>
        </div>
        <?php $attrib = array('data-toggle' => 'validator', 'role' => 'form');
        echo admin_form_open_multipart("transaction/edit_type/" . $type->id, $attrib); ?>
        <div class="modal-body">
           <!-- <p><?= lang('update_info'); ?></p>-->

           <div class="form-group">
                <?= lang('account_category', 'account_category'); ?>
                <?php
                $ct[''] = lang('select').' '.lang('account_category');
                foreach ($account_category as $category) {
                    $ct[$category->id] = $category->name;
                }
                ?>
                <?= form_dropdown('account_category', $ct, set_value('account_category', $type->account_category), 'class="form-control tip"  required="required"'); ?>
            </div>
            <div class="form-group">
                <?= lang('name', 'name'); ?>
                <?= form_input('name', $type->name, 'class="form-control gen_slug" id="name" required="required"'); ?>
            </div>

           
            
            <?php echo form_hidden('id', $type->id); ?>
        </div>
        <div class="modal-footer">
            <?php echo form_submit('edit_type', lang('edit_type'), 'class="btn btn-primary"'); ?>
        </div>
    </div>
    <?php echo form_close(); ?>
</div>
<script type="text/javascript" src="<?= $assets ?>js/custom.js"></script>
<?= $modal_js ?>
