Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion static/js/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const editBackBtn = document.querySelector("#view-edit .btn-back")
const editReloadBtn = document.querySelector("#view-edit .btn-reload")
const editTags = document.getElementById("edit-tags")
const editWarnings = document.getElementById("edit-warnings")
const editFixToSubmit = document.getElementById("fix-to-continue")
const editSubmitBtn = document.querySelector("#view-edit .btn-next")
const sumitBackBtn = document.querySelector("#view-submit .btn-back")
const routeSummary = document.getElementById("route-summary")
Expand Down Expand Up @@ -130,6 +131,7 @@ export const processRouteWarnings = (data) => {
if (activeView === "submit") switchView("edit")

editSubmitBtn.classList.add("d-none")
editFixToSubmit.classList.add("d-none")

editWarnings.innerHTML = ""
let highestSeverityLevel = 0
Expand Down Expand Up @@ -201,7 +203,10 @@ export const processRouteWarnings = (data) => {

editSubmitBtn.classList.toggle("mt-2", data.warnings.length > 0)

if (highestSeverityLevel === 0) editSubmitBtn.classList.remove("d-none")
if (highestSeverityLevel === 0) {
editSubmitBtn.classList.remove("d-none")
editFixToSubmit.classList.add("d-none")
}
}

const unload = () => {
Expand Down
4 changes: 4 additions & 0 deletions templates/_menu.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
<div class="actions text-end">
<button class="btn btn-primary btn-next w-100 d-none">Finish editing</button>
</div>

<i id="fix-to-continue" class="d-none">
Fix the errors above to upload
</i>
</div>
</div>

Expand Down