File: /home/artinside/www/sabbry/themes/admin/widgets/batch/batch.php
<?php $v->layout("_admin"); ?>
<section class="wrapper">
<!-- page start-->
<?php if (!$batch): ?>
<div class="row">
<div class="col-12 text-center my-4 text-sm-center">
<h3> Novo Lote</h3>
<p>Crie um novo Lote </p>
</div>
<div class="col-lg-12">
<section class="card">
<header class="card-header infinity-bg white-text">
Cadastrar Lote
</header>
<div class="card-body">
<form class="form-horizontal tasi-form" method="post" action="<?= url("admin/batch/batch"); ?>">
<input type="hidden" name="action" value="create"/>
<div class="form-group row">
<label class="col-sm-2 col-sm-2 control-label">Produto*</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="title">
<!-- <span class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>-->
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-sm-2 control-label">Número do Lote*</label>
<div class="col-sm-4">
<input type="text" class="form-control mask-batch" name="batch_number">
<!-- <span class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>-->
</div>
<label class="col-sm-2 col-sm-2 control-label">Quantidade de Litros*</label>
<div class="col-sm-4">
<input type="text" class="form-control" name="quantity">
<span class="help-block">Quantidade em Litros ou kgs.</span>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-sm-2 control-label">Data de Fabricação*</label>
<div class="col-sm-4">
<input type="text" class="form-control" name="manufacturing">
<!-- <span class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>-->
</div>
<label class="col-sm-2 col-sm-2 control-label">Data de Validade*</label>
<div class="col-sm-4">
<input type="text" class="form-control" name="valid">
<!-- <span class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>-->
</div>
</div>
<button class="btn btn-primary" type="submit">Enviar</button>
<a class="btn btn-danger" href="<?= url("/admin/batch/home"); ?>">Cancelar</a>
</form>
</div>
</section>
</div>
</div>
<?php else: ?>
<div class="row">
<div class="col-12 text-center my-4 text-sm-center">
<h3> <?= $batch->title; ?> </h3>
<p>Edição de Lote </p>
</div>
<div class="col-lg-12">
<section class="card">
<header class="card-header infinity-bg white-text text-center">
Edição de Lote
</header>
<div class="card-body">
<form class="form-horizontal tasi-form" method="post" action="<?= url("/admin/batch/batch/{$batch->id}"); ?>">
<input type="hidden" name="action" value="update"/>
<div class="form-group row">
<label class="col-sm-2 col-sm-2 control-label">Produto*</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="title" value="<?= $batch->title; ?>">
<!-- <span class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>-->
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-sm-2 control-label">Número do Lote*</label>
<div class="col-sm-4">
<input type="text" class="form-control mask-batch" name="batch_number" value="<?= $batch->batch_number; ?>">
<!-- <span class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>-->
</div>
<label class="col-sm-2 col-sm-2 control-label">Quantidade de Litros*</label>
<div class="col-sm-4">
<input type="text" class="form-control" name="quantity" value="<?= $batch->quantity; ?>">
<span class="help-block">Quantidade em Litros ou kgs.</span>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-sm-2 control-label">Data de Fabricação*</label>
<div class="col-sm-4">
<input type="text" class="form-control" name="manufacturing" value="<?= $batch->manufacturing; ?>">
<!-- <span class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>-->
</div>
<label class="col-sm-2 col-sm-2 control-label">Data de Validade*</label>
<div class="col-sm-4">
<input type="text" class="form-control" name="valid" value="<?= $batch->valid; ?>">
<!-- <span class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>-->
</div>
</div>
<button class="btn btn-primary" type="submit">Atualizar</button>
<a class="btn btn-danger" href="<?= url("/admin/batch/home"); ?>">Cancelar</a>
</form>
</div>
</section>
</div>
</div>
<?php endif; ?>
<!-- page end-->
</section>