Spaces:
Runtime error
Runtime error
Update templates/menu.html
Browse files- templates/menu.html +13 -27
templates/menu.html
CHANGED
@@ -462,40 +462,26 @@ form-check-input addon-option{
|
|
462 |
</div>
|
463 |
</div>
|
464 |
|
465 |
-
<!-- Category Filter with Custom Radio Buttons -->
|
466 |
<form method="get" action="/menu" class="text-center mb-4">
|
467 |
<label class="form-label fw-bold">Select a Category:</label>
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
<!-- Veg Toggle Button (Checkbox styled as toggle) -->
|
472 |
-
<div class="form-check form-check-inline">
|
473 |
-
<input type="checkbox" id="category-Veg" name="category" value="Veg"
|
474 |
class="custom-toggle"
|
475 |
-
{% if selected_category ==
|
476 |
-
<label class="form-check-label" for="category-
|
477 |
-
|
|
|
478 |
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
</div>
|
486 |
</div>
|
487 |
-
|
488 |
-
<!-- Non-Veg logic handled in backend but not displayed in UI -->
|
489 |
-
<input type="hidden" name="category" value="{% if selected_category == 'Non-Veg' %}Non-Veg{% endif %}">
|
490 |
</form>
|
491 |
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
<!-- Show menu items only when Customized Dish is not selected -->
|
500 |
<div class="container mt-4">
|
501 |
<h1 class="text-center">Menu</h1>
|
|
|
462 |
</div>
|
463 |
</div>
|
464 |
|
|
|
465 |
<form method="get" action="/menu" class="text-center mb-4">
|
466 |
<label class="form-label fw-bold">Select a Category:</label>
|
467 |
+
<div class="form-check form-check-inline">
|
468 |
+
{% for category in categories %}
|
469 |
+
<input type="radio" id="category-{{ category }}" name="category" value="{{ category }}"
|
|
|
|
|
|
|
470 |
class="custom-toggle"
|
471 |
+
{% if selected_category == category %}checked{% endif %} onchange="this.form.submit()">
|
472 |
+
<label class="form-check-label" for="category-{{ category }}">{{ category }}</label>
|
473 |
+
{% endfor %}
|
474 |
+
</div>
|
475 |
|
476 |
+
<!-- Customized Dish toggle (styled like a switch) -->
|
477 |
+
<div class="form-check form-check-inline">
|
478 |
+
<input type="radio" id="category-CustomizedDish" name="category" value="Customized Dish"
|
479 |
+
class="custom-toggle"
|
480 |
+
{% if selected_category == "Customized Dish" %}checked{% endif %} onchange="this.form.submit()">
|
481 |
+
<label class="form-check-label" for="category-CustomizedDish">Customized Dish</label>
|
|
|
482 |
</div>
|
|
|
|
|
|
|
483 |
</form>
|
484 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
485 |
<!-- Show menu items only when Customized Dish is not selected -->
|
486 |
<div class="container mt-4">
|
487 |
<h1 class="text-center">Menu</h1>
|