Versie 1.0
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<div class="page-header mb-4">
|
||||
|
||||
<h1>Product wijzigen</h1>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Productgegevens</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form id="product-edit-<%= product.id %>" method="post" action="/products/<%= product.id %>">
|
||||
<label class="form-label" for="product-name">Productnaam</label>
|
||||
<input id="product-name" class="form-control mb-3" type="text" name="name"
|
||||
value="<%= product.name %>" maxlength="120" required>
|
||||
|
||||
<label class="form-label" for="category-id">Categorie</label>
|
||||
<select id="category-id" class="form-select mb-4" name="category_id">
|
||||
<option value="">Geen categorie</option>
|
||||
<% (categories || []).forEach(category => { %>
|
||||
<option value="<%= category.id %>" <%= product.category_id === category.id ? "selected" : "" %>>
|
||||
<%= category.icon || "" %> <%= category.name %>
|
||||
</option>
|
||||
<% }); %>
|
||||
</select>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="product-actions">
|
||||
<button class="btn btn-primary" type="submit" form="product-edit-<%= product.id %>">Wijzigingen opslaan</button>
|
||||
<form method="post" action="/products/<%= product.id %>/delete"
|
||||
onsubmit="return confirm('Weet je zeker dat je dit product wilt verwijderen?');">
|
||||
<button class="btn btn-outline-danger" type="submit">Product verwijderen</button>
|
||||
</form>
|
||||
<a class="btn btn-link" href="/products">Annuleren</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user