File: /home/artinside/sites.artinside.com.br/paliar/themes/admin/widgets/documents/document.php
<?php $this->layout("_admin"); ?>
<section class="wrapper">
<!-- page start-->
<?php if (!$documents): ?>
<div class="row">
<div class="col-12 text-center my-4 text-sm-center">
<h3> Novo Documento</h3>
<p>Crie um novo Documento </p>
</div>
<div class="col-lg-12">
<section class="card">
<header class="card-header infinity-bg white-text">
Cadastrar Documento
</header>
<div class="card-body">
<form class="form-horizontal tasi-form" method="post" action="<?= url("/admin/documents/document"); ?>">
<input type="hidden" name="action" value="create"/>
<div class="form-group row">
<label class="col-sm-2 col-sm-2 control-label">Documento*</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">Descrição Breve</label>
<div class="col-sm-10">
<textarea name="description" class="form-control"></textarea>
<!-- <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/documents/home"); ?>">Cancelar</a>
</form>
</div>
</section>
</div>
</div>
</div>
<?php else: ?>
<div class="row">
<div class="col-12 text-center my-4 text-sm-center">
<h3> <?= $documents->title; ?> </h3>
<p>Edição de Depoimento </p>
</div>
<div class="col-lg-12">
<section class="card">
<header class="card-header infinity-bg white-text text-center">
Edição de Depoimento
</header>
<div class="card-body">
<form class="form-horizontal tasi-form" method="post" action="<?= url("/admin/documents/document/{$documents->id}"); ?>">
<input type="hidden" name="action" value="update"/>
<div class="form-group row">
<label class="col-sm-2 col-sm-2 control-label">Documento*</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="title" value="<?= $documents->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">Descrição Breve</label>
<div class="col-sm-10">
<textarea name="description" class="form-control"><?= $documents->description?></textarea>
<!-- <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/documents/home"); ?>">Cancelar</a>
</form>
</div>
</section>
</div>
</div>
<?php endif; ?>
<!-- page end-->
</section>