Added in ability to edit the project data item, although backend is not completed yet.

Signed-off-by: rodude123 <rodude123@gmail.com>
This commit is contained in:
2023-02-03 01:20:55 +00:00
parent cef7cc5e64
commit db7c12857e
15 changed files with 326 additions and 120 deletions
+11
View File
@@ -11,12 +11,23 @@ document.addEventListener("DOMContentLoaded", _ =>
});
});
/**
* Shows respective error message for form
* @param {string} message The error message to show
* @param {string} form The form to show the error message for
*/
function showErrorMessage(message, form)
{
document.querySelector(`#${form}Error`).classList.remove("hidden");
document.querySelector(`#${form}Error div`).innerText = message;
}
/**
* Switches between the different forms
* @param {string} from The css selector of form to switch from
* @param {string} to The css selector of form to switch to
*/
function switchView(from, to)
{
document.querySelector(from).classList.toggle("shown");