From 5d12cb64e4afe3eb53639e8465ffe4b7f46e5b37 Mon Sep 17 00:00:00 2001 From: Preston Doman Date: Tue, 5 Feb 2019 10:12:30 -0800 Subject: [PATCH] Remove error message display --- front/static/js/login.js | 6 ------ front/static/js/viewHistory.js | 6 +++--- front/static/login.html | 1 - 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/front/static/js/login.js b/front/static/js/login.js index 7be086e..cdef5f4 100644 --- a/front/static/js/login.js +++ b/front/static/js/login.js @@ -1,8 +1,3 @@ -function displayErrorMessage(errorMessage) { - const errorReport = document.querySelector("#errorReport"); - errorReport.innerHTML = JSON.parse(errorMessage).error; -} - function postToLoginEndpoint(event) { event.preventDefault(); @@ -30,7 +25,6 @@ function postToLoginEndpoint(event) { console.error("LOGIN FAILURE!"); console.error("Server status: " + this.status); console.error("Server response:\n" + this.response); - displayErrorMessage(this.response); } } }; diff --git a/front/static/js/viewHistory.js b/front/static/js/viewHistory.js index 82c2f4d..4b2899b 100644 --- a/front/static/js/viewHistory.js +++ b/front/static/js/viewHistory.js @@ -224,7 +224,7 @@ function displayListOfReports(parsedData) { for (let i = 0; i < reports.length; i++) { let title = reports[i].title; let dateCreated = new Date(reports[i].date_created).toLocaleDateString("en-US"); - let submitted = reports[i].submitted; + let state = reports[i].submitted; let dateSubmitted; let rid = reports[i].report_pk; @@ -233,7 +233,7 @@ function displayListOfReports(parsedData) { bodyRow.insertCell(1).innerHTML = dateCreated; let stateCell = bodyRow.insertCell(2); - stateCell.innerHTML = submitted; + stateCell.innerHTML = state; stateCell.classList.add("d-none", "d-lg-table-cell"); // Column visible only on large displays // Create edit/view button @@ -242,7 +242,7 @@ function displayListOfReports(parsedData) { actionButton.setAttribute("data-rid", rid); actionButton.classList.add("btn"); - if (submitted === false) { + if (state === false) { // Edit button dateSubmitted = "TBD"; actionButton.classList.add("btn-primary", "edit-report-button"); // Add event listener class diff --git a/front/static/login.html b/front/static/login.html index 5c60531..03938ea 100644 --- a/front/static/login.html +++ b/front/static/login.html @@ -41,7 +41,6 @@ -