Went through todos

This commit is contained in:
Dennis Eichhorn 2024-05-02 22:54:39 +00:00
parent 8644f3e830
commit a2d420bb8b
2 changed files with 20 additions and 6 deletions

View File

@ -18,7 +18,7 @@ use phpOMS\Account\PermissionType;
use phpOMS\Router\RouteVerb;
return [
'^.*/tag$' => [
'^.*/tag(\?.*|$)$' => [
[
'dest' => '\Modules\Tag\Controller\ApiController:apiTagCreate',
'verb' => RouteVerb::PUT,
@ -66,7 +66,7 @@ return [
],
],
],
'^.*/tag/l11n$' => [
'^.*/tag/l11n(\?.*|$)$' => [
[
'dest' => '\Modules\Tag\Controller\ApiController:apiTagL11nCreate',
'verb' => RouteVerb::PUT,
@ -74,7 +74,7 @@ return [
'active' => true,
'permission' => [
'module' => ApiController::NAME,
'type' => PermissionType::READ,
'type' => PermissionType::CREATE,
'state' => PermissionCategory::TAG,
],
],
@ -85,7 +85,18 @@ return [
'active' => true,
'permission' => [
'module' => ApiController::NAME,
'type' => PermissionType::READ,
'type' => PermissionType::MODIFY,
'state' => PermissionCategory::TAG,
],
],
[
'dest' => '\Modules\Tag\Controller\ApiController:apiTagL11nDelete',
'verb' => RouteVerb::DELETE,
'csrf' => true,
'active' => true,
'permission' => [
'module' => ApiController::NAME,
'type' => PermissionType::DELETE,
'state' => PermissionCategory::TAG,
],
],

View File

@ -53,10 +53,13 @@ echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12 col-md-6">
<div class="portlet">
<form id="tagForm" method="<?= $isNew ? 'PUT' : 'POST'; ?>" action="<?= UriFactory::build('{/api}tag?csrf={$CSRF}'); ?>"
<form id="tagForm"
method="<?= $isNew ? 'PUT' : 'POST'; ?>"
action="<?= UriFactory::build('{/api}tag?csrf={$CSRF}'); ?>"
data-ui-container="#tagTable tbody"
data-add-form="tagForm"
data-add-tpl="#tagTable tbody .oms-add-tpl-tag">
data-add-tpl="#tagTable tbody .oms-add-tpl-tag"
<?= $isNew ? 'data-redirect="' . UriFactory::build('{/base}/tag/view') . '?id={/0/response/id}"' : ''; ?>>
<div class="portlet-head"><?= $this->getHtml('Tag'); ?></div>
<div class="portlet-body">
<div class="form-group">