<!-- Edit Sub Expense Type Modal -->
<div class="modal fade" id="addSubTypeModal" tabindex="-1" role="dialog">
  <div class="modal-dialog" role="document">
    <form action="<?= base_url('admin/expense/add_sub_expense_type') ?>" method="post">
<input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>" 
           value="<?= $this->security->get_csrf_hash(); ?>" />
      <input type="hidden" name="id" id="edit-subtype-id">

      <div class="modal-content">
        <div class="modal-header">
          <h4 class="m-b-0 text-white">Edit Sub Expense Type</h4>
          <button type="button" class="close" data-dismiss="modal">&times;</button>
        </div>

        <div class="modal-body">
          <div class="form-group">
            <label>Select Expense Type</label>
            <select name="expense_type_id" id="edit-subtype-type-id" required class="form-control">
              <option value="">Select Expense Type</option>
              <?php foreach ($expense_types as $et): ?>
                <option value="<?= $et->id ?>"><?= $et->expense_type ?></option>
              <?php endforeach; ?>
            </select>
          </div>

          <div class="form-group">
            <label>Sub Expense Type</label>
            <input type="text" name="sub_expense_type" id="edit-subtype-name" required class="form-control">
          </div>

          <div class="form-group">
            <label>Note</label>
            <input type="text" name="note" id="edit-subtype-note" class="form-control">
          </div>
        </div>

        <div class="modal-footer">
          <button type="submit" class="btn btn-success">Update</button>
          <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
        </div>
      </div>
    </form>
  </div>
</div>

