started with template fixes

This commit is contained in:
Dennis Eichhorn 2024-03-29 15:26:00 +00:00
parent 15f1975139
commit 3cfae87e1b
5 changed files with 12 additions and 7 deletions

View File

@ -22,6 +22,7 @@ return [
[
'dest' => '\Modules\Helper\Controller\ApiController:apiHelperExport',
'verb' => RouteVerb::GET,
'csrf' => true,
'permission' => [
'module' => ApiController::NAME,
'type' => PermissionType::READ,
@ -33,6 +34,7 @@ return [
[
'dest' => '\Modules\Helper\Controller\ApiController:apiTemplateCreate',
'verb' => RouteVerb::SET,
'csrf' => true,
'permission' => [
'module' => ApiController::NAME,
'type' => PermissionType::READ,
@ -44,6 +46,7 @@ return [
[
'dest' => '\Modules\Helper\Controller\ApiController:apiReportCreate',
'verb' => RouteVerb::SET,
'csrf' => true,
'permission' => [
'module' => ApiController::NAME,
'type' => PermissionType::CREATE,

View File

@ -24,18 +24,18 @@ echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12 col-md-6">
<div class="portlet">
<form id="helper-report-create" action="<?= UriFactory::build('{/api}helper/report/report'); ?>" method="post">
<form id="helper-report-create" action="<?= UriFactory::build('{/api}helper/report/report?csrf={$CSRF}'); ?>" method="post">
<div class="portlet-head"><?= $this->getHtml('Report'); ?></div>
<div class="portlet-body">
<table class="layout wf-100">
<tbody>
<tr><td><label for="iTitle"><?= $this->getHtml('Title'); ?></label>
<tr><td><input id="iTitle" name="name" type="text" placeholder="P&L Reporting 2015 December v1.0" required>
<tr><td><input id="iTitle" name="name" type="text" required>
<tr><td><label for="iTemplate"><?= $this->getHtml('Template'); ?></label>
<tr><td><select id="iTemplate" name="template">
<?php foreach ($templateList as $key => $value) : ?>
<option value="<?= (int) $key; ?>"><?= $this->printHtml($value->name); ?>
<?php endforeach; ?>
<?php endforeach; ?>
</select>
</table>
</div>

View File

@ -121,10 +121,12 @@ echo $this->data['nav']->render(); ?>
<?php endif; ?>
</table>
</div>
<!--
<div class="portlet-foot">
<a tabindex="0" class="button" href="<?= UriFactory::build($previous); ?>"><?= $this->getHtml('Previous', '0', '0'); ?></a>
<a tabindex="0" class="button" href="<?= UriFactory::build($next); ?>"><?= $this->getHtml('Next', '0', '0'); ?></a>
</div>
-->
</div>
</div>
</div>

View File

@ -18,12 +18,12 @@ echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12 col-md-6">
<div class="portlet">
<form id="helper-template-create" action="<?= \phpOMS\Uri\UriFactory::build('{/api}helper/report/template'); ?>" method="post">
<form id="helper-template-create" action="<?= \phpOMS\Uri\UriFactory::build('{/api}helper/report/template?csrf={$CSRF}'); ?>" method="post">
<div class="portlet-head"><?= $this->getHtml('Template'); ?></div>
<div class="portlet-body">
<div class="form-group">
<label for="iTitle"><?= $this->getHtml('Title'); ?></label>
<input id="iTitle" name="name" type="text" placeholder="P&L Reporting" required>
<input id="iTitle" name="name" type="text" required>
</div>
<div class="form-group">
@ -46,7 +46,7 @@ echo $this->data['nav']->render(); ?>
<div class="form-group">
<label for="iExpected"><?= $this->getHtml('Expected'); ?></label>
<div class="ipt-wrap">
<div class="ipt-first"><input id="iExpected" type="text" placeholder="file.csv"><input name="expected" type="hidden"></div>
<div class="ipt-first"><input id="iExpected" type="text"><input name="expected" type="hidden"></div>
<div class="ipt-second"><button><?= $this->getHtml('Add', '0', '0'); ?></button></div>
</div>
</div>

View File

@ -61,7 +61,7 @@ echo $this->data['nav']->render(); ?>
<div class="portlet">
<div class="portlet-head"><?= $this->getHtml('Reports'); ?></div>
<div class="portlet-body">
<form action="<?= UriFactory::build('{/api}helper/template'); ?>" method="post">
<form action="<?= UriFactory::build('{/api}helper/template?csrf={$CSRF}'); ?>" method="post">
<table class="layout wf-100">
<tbody>
<tr>