💄 (admin): rework add/edit category

This commit is contained in:
Kazhnuz 2025-01-18 15:50:13 +01:00
parent 152f35023a
commit 6a39877747
2 changed files with 17 additions and 11 deletions

View file

@ -2,15 +2,16 @@
<?php echo Bootstrap::formOpen(array('id'=>'jsform')); ?>
<div class="align-middle">
<div class="float-right mt-1">
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<button type="button" class="btn btn-danger btn-sm" data-toggle="modal" data-target="#jsdeleteModal"><?php $L->p('Delete') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<div class="d-flex justify-content-between mb-2">
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Edit Category'), 'icon'=>'cog')); ?>
<div>
<button type="submit" class="btn btn-primary" name="save"><?php $L->p('Save') ?></button>
<button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#jsdeleteModal"><?php $L->p('Delete') ?></button>
<a class="btn btn-secondary" href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
</div>
<div class="card"><div class="card-body">
<?php
// Token CSRF
echo Bootstrap::formInputHidden(array(
@ -68,6 +69,8 @@
echo Bootstrap::formClose();
?>
</div>
</div>
<!-- Modal for delete category -->
<?php

View file

@ -2,14 +2,15 @@
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
<div class="align-middle">
<div class="float-right mt-1">
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>" role="button"><?php $L->p('Cancel') ?></a>
<div class="d-flex justify-content-between mb-2">
<?php echo Bootstrap::pageTitle(array('title'=>$L->g(string: 'New category'), 'icon'=>'tag')); ?>
<div>
<button type="submit" class="btn btn-primary" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary" href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('New category'), 'icon'=>'tag')); ?>
</div>
<div class="card"><div class="card-body">
<?php
echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF',
@ -35,5 +36,7 @@
'rows'=>3
));
?>
</div>
</div>
<?php echo Bootstrap::formClose(); ?>