develop #50
@ -19,13 +19,13 @@
|
||||
<h2>Bestellformular</h2>
|
||||
|
||||
<label for="vorname">Vorname:</label>
|
||||
<input type="text" id="Vorname" name="Vorname" required placeholder=" - Vorname -" readonly>
|
||||
<input type="text" id="Vorname" name="Vorname" required placeholder="Vorname">
|
||||
|
||||
<label for="nachname">Nachname:</label>
|
||||
<input type="text" id="Nachname" name="Nachname" required placeholder="- Nachname -" readonly>
|
||||
<input type="text" id="Nachname" name="Nachname" required placeholder="Nachname">
|
||||
|
||||
<label for="kundenNr">Kunden Nr.:</label>
|
||||
<input type="text" id="KundenNr" name="KundenNr" required placeholder="- Kunden Nr. -" readonly>
|
||||
<input type="text" id="KundenNr" name="KundenNr" required placeholder="Kunden Nr.">
|
||||
|
||||
<label for="strasse">Straße:</label>
|
||||
<input type="text" id="strasse" name="strasse" required placeholder="Strasse">
|
||||
@ -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);
|
||||
|
||||
@ -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%;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user