reupload of project

This commit is contained in:
2024-12-06 09:28:08 +01:00
parent f025364a05
commit ebb3f69a4e
28 changed files with 2031 additions and 735 deletions

View File

@@ -0,0 +1,18 @@
function handleCreateUser(event) {
event.preventDefault();
const form = event.target;
fetch(form.action, {
method: form.method,
body: new FormData(form),
})
.then(response => response.text())
.then(result => {
if (result === 'exists') {
alert('Uživatel s tímto uživatelským jménem již existuje.');
} else {
alert('Nový uživatel byl úspěšně vytvořen.');
window.location.reload();
}
})
.catch(error => console.error('Error:', error));
}