<?php
/*
 * *************************************************
 * Copyright (C) 2021 Earworks.                    *
 * Codeigniter Project Template Modification       *
 * Please contact our email for more information : *
 * contact@earworks.co.id                          *
 * *************************************************
 */

defined('BASEPATH') OR exit('No direct script access allowed');
?>
<?= form_open_multipart(current_url() . '?redir=' . $redir, ['class' => 'form-horizontal']) ?>

<div class="form-group">
    <?= lang('nama', [], 'nama', ['class' => 'col-sm-3 control-label']) ?>
    <div class="col-sm-9">
        <?= form_input('nama', $data['nama'], ['class' => 'form-control']) ?>
    </div>
</div>

<!--<div class="form-group">
<?= lang('location', [], 'location', ['class' => 'col-sm-3 control-label']) ?>
    <div class="col-sm-9">
<?=
form_dropdown('location', [
    'jakarta' => 'Jakarta',
    'medan' => 'Medan',
    'surabaya' => 'Surabaya'
    ], $data['location'], ['class' => 'form-control'])
?>
    </div>
</div>-->

<?php if ($is_create === false) : ?>
    <div class="form-group">
        <?= lang('slug', [], 'slug', ['class' => 'col-sm-3 control-label']) ?>
        <div class="col-sm-9">
            <?= form_input('slug', $data['slug'], ['class' => 'form-control']) ?>
        </div>
    </div>
<?php endif; ?>

<div class="form-group">
    <?= lang('total', [], 'total', ['class' => 'col-sm-3 control-label']) ?>
    <div class="col-sm-9">
        <?= form_input('total', $data['total'], ['class' => 'form-control']) ?>
    </div>
</div>

<div class="form-group">
    <?= lang('gambar', [], 'gambar', ['class' => 'col-sm-3 control-label']) ?>
    <div class="col-sm-9">
        <?= form_upload('gambar', $data['gambar'], ['class' => 'form-control', 'accept' => 'video/*,image/*,video/mp4,video/x-m4v']) ?>
        <?php if ($data['gambar']): ?>
            <?= show_file($data['gambar'], '../img/uploads') ?>
        <?php endif; ?>
    </div>
</div>

<div class="form-group">
    <div class="col-sm-9 col-sm-offset-3">
        <?= form_submit('submit', 'Submit', ['class' => 'btn blue']) ?>
    </div>
</div>
<?= form_close() ?>