51 lines
1.5 KiB
HTML
51 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Manage Drink</title>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>Manage Drink</h1>
|
|
|
|
<div class="card">
|
|
<h2>{{ drink.name }}</h2>
|
|
<p>Price: {{ "%.2f"|format(drink.price) }}€</p>
|
|
<p>Stock: {{ drink.stock }}</p>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h3>Restock</h3>
|
|
<form method="POST" action="/drink/{{ drink.id }}/restock">
|
|
<label>
|
|
Add quantity:
|
|
<input type="number" name="amount" min="1" required>
|
|
</label>
|
|
<button class="button" type="submit">Increase stock</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h3>Adjust price</h3>
|
|
<form method="POST" action="/drink/{{ drink.id }}/price">
|
|
<label>
|
|
New price:
|
|
<input type="number" step="0.01" name="price" required>
|
|
</label>
|
|
<button class="button" type="submit">Change price</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h3>Danger zone</h3>
|
|
<form method="POST" action="/drink/{{ drink.id }}/delete" onsubmit="return confirm('Delete this drink?');">
|
|
<button class="button" type="submit" style="background: red;">Delete drink</button>
|
|
</form>
|
|
</div>
|
|
|
|
<a class="button" href="/drinks">Back to list</a>
|
|
</div>
|
|
</body>
|
|
</html>
|