Modification et ajout de catégorie fonctionne. Accès page admin protété
This commit is contained in:
parent
2535d13d7c
commit
3a80108ba5
11 changed files with 338 additions and 126 deletions
|
|
@ -72,8 +72,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="sb-sidenav-footer">
|
||||
<div class="small">Connecté avec le compte :</div>
|
||||
{$smarty.session.user.user_name}
|
||||
<div class="small">Connecté avec le compte : {$smarty.session.user.user_name} {$smarty.session.user.user_firstname}</div>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
@ -106,34 +105,21 @@
|
|||
</div>
|
||||
<!-- catégorie modif -->
|
||||
<div class="p-3 mt-2 text-primary-emphasis bg-primary-subtle border border-primary-subtle rounded-3">
|
||||
<form method="post">
|
||||
<div class="container-fluid pt-2">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<select class="form-select" aria-label="Default select example">
|
||||
<option value="0" {if ($objCategory->getId() == 0)} selected {/if}>Modifier un catégorie existante</option>
|
||||
{foreach from=$arrCategoryToDisplay item=arrDetCategory}
|
||||
|
||||
<option value="{$objCategory->getId()}" {if ($objCategory->getId() == $arrDetCategory['category_id'])} selected {/if}>
|
||||
{$objCategory->getName()}
|
||||
<option value="0" selected >Modifier un catégorie existante</option>
|
||||
<form method="post">
|
||||
<select class="form-select" aria-label="Default select example" name="id_to_edit">
|
||||
<option value="0">Modifier un catégorie existante</option>
|
||||
{foreach from=$arrCategoryToDisplay item=category}
|
||||
<option value="{$category->getId()}">{$category->getName()}</option>
|
||||
{/foreach}
|
||||
|
||||
{foreach from=$arrCategoryToDisplay item=arrDetCategory}
|
||||
<option value="{$arrDetCategory->getId()}" >
|
||||
{$arrDetCategory->getName()}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<br>
|
||||
<input type="text" class="form-control" id="floatingInput" name="edit_category">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
</select>
|
||||
<br>
|
||||
<input type="text" class="form-control" id="floatingInput" name="new_name">
|
||||
<button type="submit" class="btn bg-success text-light rounded-circle"> ✓</button>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button class="btn bg-danger text-light rounded-circle">X</button>
|
||||
</div>
|
||||
</form>
|
||||
<div>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
|
|
@ -141,14 +127,16 @@
|
|||
<div class="row">
|
||||
<!-- creation cat-->
|
||||
<div class="col-6">
|
||||
<label>Créer une nouvelle catégorie</label>
|
||||
<div class="form-floating mb-3">
|
||||
<input type="text" class="form-control" id="floatingInput" name="new_category">
|
||||
<label for="floatingInput">Créer une nouvelle catégorie</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button type="submit" class="btn bg-success text-light rounded-circle"> ✓</button>
|
||||
<form method="POST">
|
||||
<label>Créer une nouvelle catégorie</label>
|
||||
<div class="form-floating mb-3">
|
||||
<input type="text" class="form-control" id="floatingInput" name="new_category">
|
||||
<label for="floatingInput">Créer une nouvelle catégorie</label>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button type="submit" class="btn bg-success text-light rounded-circle"> ✓</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue