some more stuff

This commit is contained in:
2024-02-03 17:30:51 +01:00
parent 87c12b0bb4
commit 6f07524342
5 changed files with 40 additions and 12 deletions

View File

@@ -2,6 +2,5 @@
<h2>Niekto to pobabral</h2>
<h1 class="error-code">500</h1>
<h3><i class="ri-error-warning-line"></i> Nejaký neschopný vývojár nevedel robiť túto stránku. <i class="ri-error-warning-line"></i></h3>
<h4>__TEMPLATE_ERROR__</h4>
<a href="/index" class="back"><i class="ri-arrow-left-line"></i> SPÄŤ DOMOV</a>
</div>

View File

@@ -33,6 +33,16 @@
doAccountAction(data, "Profile update Successful!", "Profile update failed.");
}
function updateEmail() {
const newEmail = document.getElementById("updateNewEmail").value;
const data = new URLSearchParams();
data.append("action", "update_user_email");
data.append("email", newEmail);
doAccountAction(data, "Email update Successful!", "Email update failed.");
}
async function getUserInfo() {
const userId = document.getElementById("getUserInfoId").value;
@@ -120,6 +130,16 @@
</form>
</div>
<div class="form-container" id="updateUserEmailForm">
<h1>Update User Email</h1>
<form>
<label for="updateNewEmail">New Email:</label>
<input type="email" id="updateNewEmail" name="updateNewEmail" required>
<button type="button" onclick="updateEmail()">Update Email</button>
</form>
</div>
<button type="button" onclick="logout()">Logout</button>
<!-- Include other user action forms similarly -->