<?= form_open(current_url() . '/insert', ["method" => "post"]) ?>
<table class="table table-bordered table-striped" style="width:400px; margin:0 auto;">
  <tr>
    <th style="text-align:center;">도메인</th>
    <th style="text-align:center;">Type</th>
    <th style="text-align:center;">IP/내용</th>
    <th style="text-align:center;">CDN기능</th>
    <th colspan="2" style="text-align:center;">호스트명</th>
  </tr>
  <tr>
    <td>
      <?= getFieldForm_RecordHelper('zone_uid', isset($zone_uid) ? $zone_uid : old('zone_uid'), $fieldFormOptions) ?>
      <?= validation_show_error('zone_uid'); ?>
    </td>
    <td>
      <?= form_dropdown('type', array_merge(["" => "Type 선택"], lang('Admin/Cloudflare/API/Record.TYPE')), old('type')) ?>
      <?= validation_show_error('type'); ?>
    </td>
    <td>
      <?= form_input('content', is_null(old('content')) ? DEFAULT_EMPTY : old('content'), ["size" => 30]) ?>
      <?= validation_show_error('content'); ?>
    </td>
    <td><?= form_dropdown('proxied', ["" => "CDN기능 선택", "on" => "사용", "off" => "사용 않함"], old('proxied')) ?>
      <?= validation_show_error('proxied'); ?>
    </td>
    <td>
      <?= form_textarea('hosts', is_null(old('hosts')) ? DEFAULT_EMPTY : old('hosts'), ["cols" => 30, "rows" => 5]) ?>
      <?= validation_show_error('hosts'); ?>
    </td>
    <td><input type="submit" value="추가" class="btn btn-sm btn-primary btn-circle" type="button" /></td>
  </tr>
</table>
<?= form_close(); ?>
<?php if (session()->getFlashdata('error')) : ?><?= session()->getFlashdata('error') ?><?php endif ?>