mirror of
https://github.com/Karaka-Management/oms-QA.git
synced 2026-01-11 15:48:42 +00:00
51 lines
1.7 KiB
PHP
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>
|