diff --git a/cookbook/templates/forms/edit_internal_recipe.html b/cookbook/templates/forms/edit_internal_recipe.html
index 8bb031048..4c3dc55a6 100644
--- a/cookbook/templates/forms/edit_internal_recipe.html
+++ b/cookbook/templates/forms/edit_internal_recipe.html
@@ -21,7 +21,13 @@
{% csrf_token %}
{{ form|crispy }}
+
+
+
+
+
+
{% trans 'Delete' %}
@@ -48,8 +54,7 @@
title: "{% trans 'ingredient' %}",
field: "ingredient",
validator: "required",
- editor: "select",
- editorParams: {values: {"test1": "Test1", "test2": "Test2"}}
+ editor: "input"
},
{title: "{% trans 'amount' %}", field: "amount", validator: "required", editor: "input"},
{title: "{% trans 'unit' %}", field: "unit", validator: "required", editor: "input"},
@@ -72,6 +77,18 @@
})
}
});
+
+
+ document.getElementById("new_empty").addEventListener("click", function () {
+ data.push({
+ ingredient: "{% trans 'ingredient' %}",
+ amount: "100",
+ unit: "g",
+ id: Math.floor(Math.random() * 10000000),
+ delete: false,
+ });
+ });
});
+
{% endblock %}
\ No newline at end of file