<?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?>
<link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<div id="content">
	<div><?= html_entity_decode($viewDatas['currentCategory']->head) ?></div>
	<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
	<table class="form table table-bordered table-hover table-striped">
		<tr>
			<td class="label">상품명</td>
			<td class="column"><?= $viewDatas['entity']->getTitle() ?></td>
		</tr>
		<tr>
			<td class="label">결제금액</td>
			<td class="column"><?= number_format($viewDatas['entity']->price) ?>원</td>
		</tr>
		<?php foreach ($viewDatas['fields'] as $field) : ?>
			<tr>
				<td class="label"><?= getFieldLabel_CardHelper($field, $viewDatas) ?></td>
				<td class="column">
					<?= getFieldForm_CardHelper($field, old($field, $viewDatas['entity']->$field ?: DEFAULTS['EMPTY']), $viewDatas) ?>
					<?= validation_show_error($field); ?>
				</td>
			</tr>
		<?php endforeach; ?>
		<tr>
			<td class="label"></td>
			<td class="column">
				<?= form_submit('', '카드결제', array("class" => "btn btn-outline btn-primary")); ?>
			</td>
		</tr>
	</table>
	<?= form_close(); ?>
	<div><?= html_entity_decode($viewDatas['currentCategory']->tail) ?></div>
</div>
<?= $this->endSection() ?>