From cb144866a6cc0118ff4d8a84e6c90bd82096836f Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Sat, 20 Apr 2024 12:11:28 +1000 Subject: [PATCH] Change wording of "submit anyway" button when saving a draft --- thrimbletrimmer/scripts/edit.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/thrimbletrimmer/scripts/edit.js b/thrimbletrimmer/scripts/edit.js index 245915e..61b5c0d 100644 --- a/thrimbletrimmer/scripts/edit.js +++ b/thrimbletrimmer/scripts/edit.js @@ -1129,7 +1129,13 @@ async function sendVideoData(newState, overrideChanges) { globalPageState = PAGE_STATE.CONFIRMING; const serverErrorNode = document.createTextNode(await submitResponse.text()); const submitButton = document.createElement("button"); - submitButton.innerText = "Submit Anyway"; + if (newState === "UNEDITED") { + submitButton.innerText = "Save Draft Anyway"; + } else if (newState === "MODIFIED") { + submitButton.innerText = "Submit Changes Anyway"; + } else { + submitButton.innerText = "Submit Anyway"; + } submitButton.addEventListener("click", (_event) => { sendVideoData(newState, true); });