diff --git a/app/templates/order.html b/app/templates/order.html index e456ae3..b223ab2 100644 --- a/app/templates/order.html +++ b/app/templates/order.html @@ -54,24 +54,26 @@ - {% if dish and dish.choices %} - {% for (choice_type, choice) in dish.choices %} -
-
- -
- {% endfor %} - {% endif %} +
+ {% if dish and dish.choices %} + {% for (choice_type, choice) in dish.choices %} +
+
+ +
+ {% endfor %} + {% endif %} +
{{ form.comment.label(class='control-label') }}
@@ -202,5 +204,11 @@ var choice = options[index] select.val(choice.value).trigger("change") } + + function updateChoices() { + var dish_id = $("#dish_id").val(); + $("#dish_choices").html("Choices for " + dish_id); + } + $("#dish_id").on("change", updateChoices); {% endblock %}