<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">        
    <section class="content-header">
        <h1>rfc2350 CSIRT <small>Edit rfc2350</small></h1>
    </section>

    <section class="content">
        <a href="<?= site_url('dashboard/rfc2350'); ?>" aria-label="Kembali" class="btn btn-sm btn-primary">
            <i class="fa fa-arrow-left"></i> Kembali
        </a>

        <br/><br/>        

        <?php foreach($rfc2350 as $p): ?>
        <form method="post" action="<?= site_url('dashboard/rfc2350_update'); ?>" enctype="multipart/form-data" novalidate>
            <!-- CSRF Protection -->
            <input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>" value="<?= $this->security->get_csrf_hash(); ?>" />
            <input type="hidden" name="id" value="<?= $p->rfc2350_id; ?>">

            <div class="row">
                <div class="col-md-8">
                    <div class="box box-primary">
                        <div class="box-body">
                            <div class="form-group">
                                <label>Judul</label>
                                <input type="text" name="nama" class="form-control" placeholder="Masukkan nama rfc2350 .." required value="<?= set_value('nama', $p->rfc2350_nama); ?>">
                                <?= form_error('nama', '<div class="text-danger">', '</div>'); ?>
                            </div>

                            <div class="form-group">
                                <label>Kategori</label>
                                <select class="form-control" name="kategori" required>
                                    <option value="">- Pilih Kategori -</option>
                                    <?php foreach ($kategori_rfc2350 as $k): ?>
                                        <option value="<?= $k->kategori_rfc2350_id; ?>" <?= set_select('kategori_rfc2350', $k->kategori_rfc2350_id, ($p->rfc2350_kategori == $k->kategori_rfc2350_id)); ?>>
                                            <?= $k->kategori_rfc2350_nama; ?>
                                        </option>
                                    <?php endforeach; ?>
                                </select>
                                <?= form_error('kategori', '<div class="text-danger">', '</div>'); ?>
                            </div>

                            <div class="form-group">
                                <label>Upload Dokumen</label>
                                <input type="file" name="dokumen">
                                <p class="help-block">Format yang didukung: PDF, DOC, DOCX</p>
                                <?php if(isset($dokumen_error)): ?>
                                    <div class="text-danger"> <?= $dokumen_error; ?> </div>
                                <?php endif; ?>
                                <?= form_error('dokumen', '<div class="text-danger">', '</div>'); ?>
                            </div>

                            <!-- Progress Bar -->
                            <div class="progress progress-sm active">
                                <div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;" id="progressBar">
                                    <span class="sr-only">0% Complete</span>
                                </div>
                            </div>
                            
                            <input type="submit" name="masuk_bro" value="Draft" class="btn btn-warning btn-block">
                            <input type="submit" name="masuk_bro" value="Publish" class="btn btn-success btn-block">                            
                        </div>
                    </div>
                </div>    
            </div>    
        </form>   
        <?php endforeach; ?>
    </section>
</div>
