Recipe edit (WIP): all form fields are now saved
This commit is contained in:
parent
07b7ff425e
commit
6876a254e1
12 changed files with 563 additions and 210 deletions
|
|
@ -20,6 +20,6 @@
|
|||
|
||||
{% block body_container %}{% endblock %}
|
||||
|
||||
<footer class="footer-container">gburri - 2022</footer>
|
||||
<footer class="footer-container">gburri - 2025</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -20,10 +20,11 @@
|
|||
<textarea
|
||||
id="text-area-description">{{ recipe.description }}</textarea>
|
||||
|
||||
<label for="input-estimated-time">Estimated time</label>
|
||||
<label for="input-estimated-time">Estimated time [min]</label>
|
||||
<input
|
||||
id="input-estimated-time"
|
||||
type="number"
|
||||
step="1" min="0" max="1000"
|
||||
value="
|
||||
{% match recipe.estimated_time %}
|
||||
{% when Some with (t) %}
|
||||
|
|
@ -63,7 +64,7 @@
|
|||
<div id="groups-container">
|
||||
|
||||
</div>
|
||||
<input id="button-add-group" type="button" value="Add a group"/>
|
||||
<input id="button-add-group" type="button" value="Add a group" />
|
||||
|
||||
<div id="hidden-templates">
|
||||
<div class="group">
|
||||
|
|
@ -73,15 +74,19 @@
|
|||
<label for="input-group-comment">Comment</label>
|
||||
<input class="input-group-comment" type="text" />
|
||||
|
||||
<input class="input-group-delete" type="button" value="Remove group" />
|
||||
|
||||
<div class="steps"></div>
|
||||
|
||||
<input class="button-add-step" type="button" value="Add a step"/>
|
||||
<input class="button-add-step" type="button" value="Add a step" />
|
||||
</div>
|
||||
|
||||
<div class="step">
|
||||
<label for="text-area-step-action">Action</label>
|
||||
<textarea class="text-area-step-action"></textarea>
|
||||
|
||||
<input class="input-step-delete" type="button" value="Remove step" />
|
||||
|
||||
<div class="ingredients"></div>
|
||||
|
||||
<input class="button-add-ingedient" type="button" value="Add an ingredient"/>
|
||||
|
|
@ -89,13 +94,18 @@
|
|||
|
||||
<div class="ingredient">
|
||||
<label for="input-ingredient-quantity">Quantity</label>
|
||||
<input class="input-ingredient-quantity" type="number" />
|
||||
<input class="input-ingredient-quantity" type="number" step="0.1" min="0" max="10000" />
|
||||
|
||||
<label for="input-ingredient-unit">Unity</label>
|
||||
<label for="input-ingredient-unit">Unit</label>
|
||||
<input class="input-ingredient-unit" type="text" />
|
||||
|
||||
<label for="input-ingredient-name">Name</label>
|
||||
<input class="input-ingredient-name" type="text" />
|
||||
|
||||
<label for="input-ingredient-comment">Comment</label>
|
||||
<input class="input-ingredient-comment" type="text" />
|
||||
|
||||
<input class="input-ingredient-delete" type="button" value="Remove ingredient" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue