<?php
$input_title = array(
    'name' => 'title',
    'type' => 'text',
    'value' => isset($title) ? $title : $vlive[0]['title'],
    'placeholder' => '',
    'class' => '',
    'style' => 'width: 100%'
);

$input_embed_code = array(
    'name' => 'embed_code',
    'type' => 'text',
    'value' => isset($embed_code) ? $embed_code : $vlive[0]['embed_code'],
    'placeholder' => '',
    'class' => '',
    'style' => 'width: 100%',
    'rows' => 3
);
?>
<div class="row">
    <div class="widget-box">
        <div class="widget-header">
            <p class="widget-title"><?php echo (isset($functionName)) ? $functionName : 'Thêm mới' ?></p>
        </div>
        <div class="widget-body">
            <div class="widget-main">
                <?php $attributes = array('class' => 'form-horizontal', 'id' => 'myform'); ?>
                <?php echo form_open(base_url('backend/cmsVheartbeatlive/editVheartbeatlive/' . $vlive[0]['id']), $attributes); ?>
                <div class="form-group">
                    <label class="col-lg-3"></label>
                    <div class="col-lg-3">
                        <input type="hidden" name="id" value="<?php echo $vlive[0]['id']; ?>" />
                        <?php if(validation_errors()){echo form_error('id', '<div class="error">', '</div>');} ?>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-3">Tiêu đề (*)</label>
                    <div class="col-lg-6">
                        <?php echo form_input($input_title); ?>
                        <?php if(validation_errors()){echo form_error('title', '<div class="error">', '</div>');} ?>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-3">Mã nhúng (*)</label>
                    <div class="col-lg-6">
                        <?php echo form_textarea($input_embed_code); ?>
                        <?php if(validation_errors()){echo form_error('embed_code', '<div class="error">', '</div>');} ?>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-lg-3"></div>
                    <div class="col-lg-4">
                        <button class="btn btn-sm btn-primary" type="submit" name="btnSave">
                            <i class="ace-icon fa fa-check bigger-110"></i>Lưu lại
                        </button>
                        <button class="btn btn-sm" type="reset">
                            <i class="ace-icon fa fa-undo bigger-110"></i>Xóa form
                        </button>
                    </div>
                </div>
                <?php echo form_close(); ?>
            </div>
        </div>
    </div>
</div><!-- /.row -->
