diff --git a/locales/en.json b/locales/en.json index fd68cd6..a04f4af 100644 --- a/locales/en.json +++ b/locales/en.json @@ -1,22 +1,32 @@ { - "layout": { - "home": "Home", - "sandwiches": "Sandwiches", - "commands": "Commands", - "administration": "Administration", - "logout": "Logout", - "login": "Login", - "register": "Register", - "about": "About", - "aboutDescription": "This software respond to the COVID-19 health crisis for the following students' offices food supply", - "bio": "Bio student office", - "chemistry": "Chemistry student office", - "GC": "Civil engineering student office", - "GCPD": "Chemical and process engineering student office", - "GEA": "Management of companies and administrations student office", - "IT": "IT student office", - "made": "Made with ❤️ by", - "contact": "Contact", - "orderIssue": "Order issue" - } + "layout": { + "home": "Home", + "sandwiches": "Sandwiches", + "commands": "Commands", + "administration": "Administration", + "logout": "Logout", + "login": "Login", + "register": "Register", + "about": "About", + "aboutDescription": "This software respond to the COVID-19 health crisis for the following students' offices food supply", + "bio": "Bio student office", + "chemistry": "Chemistry student office", + "GC": "Civil engineering student office", + "GCPD": "Chemical and process engineering student office", + "GEA": "Management of companies and administrations student office", + "IT": "IT student office", + "made": "Made with ❤️ by", + "contact": "Contact", + "orderIssue": "Order issue" + }, + "index": { + "welcome": "Welcome to Sandwiches Order Doua", + "department": "Department", + "firstName": "First name", + "lastName": "Last name", + "command": "Command", + "sandwich": "Sandwich", + "day": "Day", + "pay": "Pay" + } } diff --git a/public/javascripts/index.js b/public/javascripts/index.js index 4d73b50..fcc8f2a 100644 --- a/public/javascripts/index.js +++ b/public/javascripts/index.js @@ -1,5 +1,10 @@ const commandAction = document.getElementById("command-action"); const rmButton = document.getElementById("remove-command"); +const locals = { + command: document.querySelector("#command1>h2").innerHTML.replace(" 1", ""), + sandwich: document.querySelector("label[for='sandwich1']").innerHTML, + day: document.querySelector("label[for='day1']").innerHTML +}; function lastCommandId() { let list = document.querySelectorAll("div.command h2"); @@ -9,14 +14,14 @@ function lastCommandId() { document.getElementById("add-command").addEventListener("click", () => { let id = lastCommandId() + 1; commandAction.insertAdjacentHTML("beforebegin", `