diff --git a/public/javascripts/admin/orders/add.js b/public/javascripts/admin/orders/add.js
index 62337de..3385b3d 100644
--- a/public/javascripts/admin/orders/add.js
+++ b/public/javascripts/admin/orders/add.js
@@ -4,7 +4,7 @@ const day = document.getElementById("day");
const locals = {
sandwich: document.querySelector("#oderCreator label").innerHTML,
day: document.querySelector("label[for=day]").innerText,
- give: document.querySelector("p label span").innerText
+ give: document.getElementById("dummy").innerText
};
function lastOrderId() {
@@ -39,6 +39,8 @@ document.getElementById("addOrder").addEventListener("click", () => {
remove
`);
+ M.updateTextFields();
+
sandwich.selectedIndex = 0;
day.value = "";
diff --git a/public/javascripts/index.js b/public/javascripts/index.js
index 047b3e4..1e37c8b 100644
--- a/public/javascripts/index.js
+++ b/public/javascripts/index.js
@@ -30,6 +30,8 @@ document.getElementById("addOrder").addEventListener("click", () => {
remove
`);
+ M.updateTextFields();
+
sandwich.selectedIndex = 0;
day.value = "";
diff --git a/public/javascripts/layout.js b/public/javascripts/layout.js
index a97274c..7c90d5f 100644
--- a/public/javascripts/layout.js
+++ b/public/javascripts/layout.js
@@ -1,6 +1,6 @@
document.addEventListener("DOMContentLoaded", function() {
M.AutoInit();
- M.updateTextFields;
+ M.updateTextFields();
});
function cb(token) {
diff --git a/views/admin/orders/edit.pug b/views/admin/orders/edit.pug
index ced9729..457bedc 100644
--- a/views/admin/orders/edit.pug
+++ b/views/admin/orders/edit.pug
@@ -1,6 +1,7 @@
extends ../../layout
block content
+ span#dummy.hide=__("admin.given")
div.container
h1=__("admin.ordersManagement")
div.row