diff --git a/public/bestellformular/bestellformular.html b/public/bestellformular/bestellformular.html
index f45469d..1e990b5 100644
--- a/public/bestellformular/bestellformular.html
+++ b/public/bestellformular/bestellformular.html
@@ -19,13 +19,13 @@
Bestellformular
-
+
-
+
-
+
@@ -60,10 +60,23 @@
const kundenNrInput = document.getElementById('KundenNr');
const VornameInput = document.getElementById('Vorname');
const NachnameInput = document.getElementById('Nachname');
- if (kundenNrInput, VornameInput, NachnameInput) {
+
+ const isLoggedIn = user_id && vorname && nachname;
+
+ if (isLoggedIn) {
kundenNrInput.value = user_id;
VornameInput.value = vorname;
NachnameInput.value = nachname;
+
+ // Felder sperren, damit sie nicht bearbeitet werden können
+ kundenNrInput.readOnly = true;
+ VornameInput.readOnly = true;
+ NachnameInput.readOnly = true;
+ } else {
+ // Felder leer lassen & bearbeitbar
+ kundenNrInput.readOnly = false;
+ VornameInput.readOnly = false;
+ NachnameInput.readOnly = false;
}
console.log("User ID from sessionStorage:", user_id);
@@ -177,6 +190,7 @@
}
+
diff --git a/scripts/routes/other/route-index.js b/scripts/routes/other/route-index.js
index 6ba00d0..a059c66 100644
--- a/scripts/routes/other/route-index.js
+++ b/scripts/routes/other/route-index.js
@@ -16,7 +16,7 @@ router.get('/registrieren', (req, res) => {
res.sendFile(path.join(__dirname, '../../../public/registrieren/registrieren.html'));
})
-// Route - HeaderFooter
+// Route - HeaderFooter Skript
router.get('/header_footer', (req, res) => {
res.sendFile(path.join(__dirname, '../../../scripts/einfügenHeaderFooter.js'));
})
@@ -66,13 +66,14 @@ router.get('/bestellformular', (req, res) => {
res.sendFile(path.join(__dirname, '../../../public/bestellformular/bestellformular.html'));
})
+// Route - Bestellungen
router.get('/bestellung', (req, res) => {
res.sendFile(path.join(__dirname, '../../../public/bestellung/bestellung.html'));
})
+// Route - Kontaktformular
router.get('/kontaktformular', (req, res) => {
res.sendFile(path.join(__dirname, '../../../public/kontaktformular/kontaktformular.html'));
})
-
module.exports = router;
\ No newline at end of file
diff --git a/static/Styles/styles-main.css b/static/Styles/styles-main.css
index 5ac7c35..1f12e2b 100644
--- a/static/Styles/styles-main.css
+++ b/static/Styles/styles-main.css
@@ -581,12 +581,6 @@ input[type="text"]:focus, input[type="number"]:focus {
background-color: #e95b00;
}
-#KundenNr, #Vorname, #Nachname {
- background-color: #f5f5f5;
- border: none;
- cursor: not-allowed;
-}
-
@media (max-width: 768px) {
.ArtikelNrText, .StueckzahlText {
width: 100%;