oms-QA/Theme/Backend/qa-app-view.tpl.php
Dennis Eichhorn 02898279ac
Some checks failed
Image optimization / general_image_workflow (push) Has been cancelled
CI / general_module_workflow_php (push) Has been cancelled
CI / general_module_workflow_js (push) Has been cancelled
fix version and bugs
2024-05-21 00:09:16 +02:00

51 lines
1.7 KiB
PHP

<?php
/**
* Jingga
*
* PHP Version 8.2
*
* @package Modules\QA
* @copyright Dennis Eichhorn
* @license OMS License 2.2
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
use Modules\QA\Models\NullQAApp;
use phpOMS\Uri\UriFactory;
$app = $this->data['app'] ?? new NullQAApp();
$isNew = $app->id === 0;
/** @var \phpOMS\Views\View $this */
echo $this->data['nav']->render();
?>
<div class="row">
<div class="col-xs-12 col-md-6">
<section class="portlet">
<form method="<?= $isNew ? 'PUT' : 'POST'; ?>" action="<?= UriFactory::build('{/api}wiki/app?csrf={$CSRF}'); ?>">
<div class="portlet-head"><?= $this->getHtml('App'); ?></div>
<div class="portlet-body">
<div class="form-group">
<label for="iId"><?= $this->getHtml('ID', '0', '0'); ?></label>
<input type="text" name="id" id="iId" value="<?= $app->id; ?>" disabled>
</div>
<div class="form-group">
<label for="iName"><?= $this->getHtml('Name'); ?></label>
<input type="text" name="Name" id="iName" value="<?= $this->printHtml($app->name); ?>" required>
</div>
</div>
<div class="portlet-foot">
<?php if ($isNew) : ?>
<input id="iCreateSubmit" type="Submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
<?php else : ?>
<input id="iSaveSubmit" type="Submit" value="<?= $this->getHtml('Save', '0', '0'); ?>">
<?php endif; ?>
</div>
</form>
</section>
</div>
</div>