<?= $this->extend('admin/template/template') ?>


<?= $this->section('content') ?>
<section>
<div class="container-fluid">
<div class="row justify-content-center">
	<div class="col-md-8 shadow rounded-bottom p-5">
        <!-- > Breadcrumb -->
		<nav style="--bs-breadcrumb-divider: url(&#34;data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M2.5 0L1 1.5 3.5 4 1 6.5 2.5 8l4-4-4-4z' fill='%236c757d'/%3E%3C/svg%3E&#34;);" aria-label="breadcrumb">
			<ol class="breadcrumb">
				<li class="breadcrumb-item"><?=anchor('/','Painel')?></li>
				<li class="breadcrumb-item"><?=anchor('/fatura','Faturas')?></li>
				<li class="breadcrumb-item active" aria-current="page">Editar</li>
			</ol>
		</nav>
		<!-- # end breadcrumb -->
		<!-- > Conteudo -->
		<h2>Editar forma de pagamento</h2>
		<?php
		$validation = \Config\Services::validation();
		echo form_open('faturaFormapgto/edita/'.$faturaFormapgto['id_faturaformapgto']);
			// input nome
			echo form_label(' ','input_nome');
			echo form_input('input_nome', ($faturaFormapgto['fatfor_nome'])? $faturaFormapgto['fatfor_nome'] : '','class="form-control" placeholder="Insira um nome"');
			// <!-- descricao Error -->
			if($validation->getError('input_nome')) { ?>
				<div class='alert alert-danger mt-2'>
				<?= $validation->getError('input_nome'); ?>
				</div><?php 
			}
			echo '<br>';
			// input descricao
			echo form_label(' ','input_detalhamento');
			echo form_textarea('input_detalhamento', ($faturaFormapgto['fatfor_detalhamento'])? $faturaFormapgto['fatfor_detalhamento'] : '','class="form-control" placeholder="Descreva neste campo"');
			// <!-- descricao Error -->
			if($validation->getError('input_detalhamento')) { ?>
				<div class='alert alert-danger mt-2'>
				<?= $validation->getError('input_detalhamento'); ?>
				</div><?php 
			}
			echo '<br>';
			

			echo '<div class="mt-3">';
			echo form_hidden('id_faturaformapgto',$faturaFormapgto['id_faturaformapgto']);
			echo form_submit('enviar','Atualizar Fatura','class="btn btn-primary w-100');
			echo '</div>';
		echo form_close();

		echo '<br>Criado: ' . $faturaFormapgto['created_at'];
		echo '<br>Editado: ' . $faturaFormapgto['updated_at'];
		echo '<br>Excluido: '. $faturaFormapgto['deleted_at'];
		?>
	</div>
</div>
</div>
</section>
<?= $this->endSection() ?>