76 lines
4.1 KiB
PHP
Executable File
76 lines
4.1 KiB
PHP
Executable File
<!-- Content Wrapper. Contains page content -->
|
|
<div class="content-wrapper">
|
|
<section class="content-header">
|
|
<h1>
|
|
PROFIL
|
|
<small>Edit Profil</small>
|
|
</h1>
|
|
</section>
|
|
|
|
<section class="content">
|
|
<a href="<?php echo base_url('dashboard/profil'); ?>" class="btn btn-sm btn-primary">Kembali</a>
|
|
|
|
<br/><br/>
|
|
|
|
<?php foreach($profil as $l): ?>
|
|
<form method="post" action="<?php echo base_url('dashboard/profil_update'); ?>" enctype="multipart/form-data" novalidate>
|
|
<!-- CSRF Protection -->
|
|
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
|
|
<input type="hidden" name="id" value="<?php echo $l->profil_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="judul" id="judul" class="form-control" placeholder="Masukkan judul profil .." required value="<?php echo set_value('judul', $l->profil_judul); ?>">
|
|
<?php echo form_error('judul', '<div class="text-danger">', '</div>'); ?>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Deskripsi</label>
|
|
<textarea id="editor1" name="konten" rows="10" cols="80" required><?php echo set_value('konten', $l->profil_konten); ?></textarea>
|
|
<?php echo form_error('konten', '<div class="text-danger">', '</div>'); ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<div class="box box-primary">
|
|
<div class="box-body">
|
|
<div class="form-group">
|
|
<label>Kategori</label>
|
|
<select class="form-control" name="kategori" required>
|
|
<option value="">- Pilih Kategori -</option>
|
|
<?php foreach($kategori_profil as $k): ?>
|
|
<option value="<?php echo $k->kategori_profil_id; ?>" <?php echo set_select('kategori_profil', $k->kategori_profil_id, ($l->profil_kategori == $k->kategori_profil_id)); ?>>
|
|
<?php echo $k->kategori_profil_nama; ?>
|
|
</option>
|
|
<?php endforeach; ?>
|
|
</select>
|
|
<?php echo form_error('kategori_profil', '<div class="text-danger">', '</div>'); ?>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Gambar Sampul</label>
|
|
<input type="file" name="sampul">
|
|
<p class="help-block">Silakan upload Gambar...!</p>
|
|
<?php if(isset($gambar_error)): ?>
|
|
<div class="text-danger"><?php echo $gambar_error; ?></div>
|
|
<?php endif; ?>
|
|
<?php echo form_error('sampul', '<div class="text-danger">', '</div>'); ?>
|
|
</div>
|
|
|
|
<input type="submit" name="status" value="Draft" class="btn btn-warning btn-block">
|
|
<input type="submit" name="status" value="Publish" class="btn btn-success btn-block">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<?php endforeach; ?>
|
|
</section>
|
|
</div>
|