<?php defined('BASEPATH') or exit('No direct script access allowed');?>
<?php echo form_open(current_url(), 'class="form-horizontal"');?>
  <div class="form-group">
    <label class="col-sm-3 control-label">Username</label>
    <div class="col-sm-9">
      <input type="text" class="form-control" name="username" value="<?php echo html_escape(@$this->input->post('username'));?>" maxlength="16" required="required"/>
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-3 control-label">Tagihan</label>
    <div class="col-sm-9">
      <input type="text" class="form-control" name="tagihan" value="<?php echo html_escape(@$this->input->post('tagihan'));?>" maxlength="32" required="required"/>
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-3 control-label">Keterangan</label>
    <div class="col-sm-9">
      <textarea class="form-control" name="keterangan" rows="4" maxlength="160"><?php echo html_escape(@$this->input->post('keterangan'));?></textarea>
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-3 control-label">Jumlah</label>
    <div class="col-sm-9">
      <input type="number" class="form-control" name="jumlah" value="<?php echo html_escape(@$this->input->post('jumlah'));?>" min="1000" required="required"/>
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-3 control-label">Pembayaran</label>
    <div class="col-sm-9">
      <select class="form-control" name="pembayaran" required="required">
        <option value="">-- Pilih --</option>
        <?php foreach ($payments as $payment_key=>$payment_val):?>
        <option value="<?php echo $payment_key;?>"<?php echo (@$this->input->post('pembayaran') == $payment_key ? ' selected="selected"' : '');?>><?php echo html_escape($payment_val);?></option>
        <?php endforeach;?>
      </select>
    </div>
  </div>
  <div class="form-group" style="margin-bottom:0">
    <div class="col-sm-offset-3 col-sm-9">
      <button type="submit" class="btn btn-primary" name="submit" value="save"><i class="fa fa-check"></i> Simpan</button>
      &nbsp;
      <a href="<?php echo site_url('admin/transaksi/tagihan');?>" class="btn btn-default" data-dismiss="modal"><i class="fa fa-remove"></i> Batal</a>
    </div>
  </div>
<?php echo form_close();?>