mirror of
https://github.com/cse110-fa22-group29/cse110-fa22-group29.git
synced 2025-09-10 08:27:20 +00:00
fixed the update form, and update functionality, and formatted
Co-authored-by: Kara Hoagland <KH-Cl@users.noreply.github.com> Co-authored-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
@@ -44,7 +44,7 @@ function setupInfo(){
|
||||
if(currReview["tags"]){
|
||||
for (let i = 0; i < currReview["tags"].length; i++) {
|
||||
let newTag = document.createElement("label");
|
||||
newTag.setAttribute("class","tag");
|
||||
newTag.setAttribute("class","d-tag");
|
||||
newTag.innerHTML = currReview["tags"][i];
|
||||
tagContainer.append(newTag);
|
||||
}
|
||||
@@ -67,7 +67,7 @@ function setupUpdate(){
|
||||
let updateBtn = document.getElementById("update-btn");
|
||||
let currID = JSON.parse(sessionStorage.getItem("currID"));
|
||||
let currReview = getReviewFromStorage(currID);
|
||||
let form = document.getElementById("update-food-entry");
|
||||
let form = document.getElementById("new-food-entry");
|
||||
let updateDiv = document.getElementById("update-form");
|
||||
updateBtn.addEventListener("click", function(){
|
||||
//update function
|
||||
@@ -171,7 +171,7 @@ function setupUpdate(){
|
||||
|
||||
updateReviewToStorage(currID, newData);
|
||||
|
||||
form.style.display = "none";
|
||||
updateDiv.classList.add("hidden");
|
||||
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user