mirror of
https://github.com/RichieCahill/dotfiles.git
synced 2026-04-17 13:08:19 -04:00
25 lines
905 B
HTML
25 lines
905 B
HTML
{% extends "base.html" %}
|
|
{% block title %}{{ meal.name }} - Van{% endblock %}
|
|
{% block content %}
|
|
<h1>{{ meal.name }}</h1>
|
|
{% if meal.instructions %}<p>{{ meal.instructions }}</p>{% endif %}
|
|
|
|
<h2>Ingredients</h2>
|
|
<form hx-post="/meals/{{ meal.id }}/ingredients" hx-target="#ingredient-list" hx-swap="innerHTML" hx-on::after-request="if(event.detail.successful) this.reset()">
|
|
<label>Item
|
|
<select name="item_id" required>
|
|
<option value="">--</option>
|
|
{% for item in items %}
|
|
<option value="{{ item.id }}">{{ item.name }} ({{ item.unit }})</option>
|
|
{% endfor %}
|
|
</select>
|
|
</label>
|
|
<label>Qty needed <input type="number" name="quantity_needed" step="any" min="0.01" required></label>
|
|
<button type="submit">Add</button>
|
|
</form>
|
|
|
|
<div id="ingredient-list">
|
|
{% include "partials/ingredient_rows.html" %}
|
|
</div>
|
|
{% endblock %}
|