diff --git a/src/main/java/com/bib/essensbestellungsverwaltung/SingUpController.java b/src/main/java/com/bib/essensbestellungsverwaltung/SingUpController.java index 891eac6..b01c029 100644 --- a/src/main/java/com/bib/essensbestellungsverwaltung/SingUpController.java +++ b/src/main/java/com/bib/essensbestellungsverwaltung/SingUpController.java @@ -12,55 +12,55 @@ import java.io.IOException; public class SingUpController { @FXML - private TextField tfName; + private TextField tfLastName; @FXML - private TextField tfVorname; + private TextField tfFirstName; @FXML private TextField tfEmail; @FXML - private PasswordField pfPasswort; + private PasswordField pfPassword; @FXML - private TextField tfPLZ; + private TextField tfPostCode; @FXML - private TextField tfStadt; + private TextField tfCity; @FXML - private TextField tfStrasse; + private TextField tfStreet; @FXML - private TextField tfHausnummer; + private TextField tfHouseNumber; @FXML private void onKontoErstellenBtClick(){ - String name = tfName.getText(); - String vorname = tfVorname.getText(); + String lastName = tfLastName.getText(); + String firstName = tfFirstName.getText(); String email = tfEmail.getText(); - String passwort = pfPasswort.getText(); - String plz = tfPLZ.getText(); - String stadt = tfStadt.getText(); - String strasse = tfStrasse.getText(); - String hausnummer = tfHausnummer.getText(); + String password = pfPassword.getText(); + String postCode = tfPostCode.getText(); + String city = tfCity.getText(); + String street = tfStreet.getText(); + String houseNumber = tfHouseNumber.getText(); Alert alert; - if(name.isEmpty() || vorname.isEmpty() || email.isEmpty() || passwort.isEmpty() || plz.isEmpty() || - stadt.isEmpty() || strasse.isEmpty() || hausnummer.isEmpty()){ + if(lastName.isEmpty() || firstName.isEmpty() || email.isEmpty() || password.isEmpty() || postCode.isEmpty() || + city.isEmpty() || street.isEmpty() || houseNumber.isEmpty()){ - if(name.isEmpty()){ + if(lastName.isEmpty()){ alert = new Alert(Alert.AlertType.ERROR," Die Eingabefeld 'Name' ist leer."); alert.showAndWait(); - } else if (vorname.isEmpty()) { + } else if (firstName.isEmpty()) { alert = new Alert(Alert.AlertType.ERROR," Die Eingabefeld 'Vorname' ist leer."); alert.showAndWait(); } else if (email.isEmpty()) { alert = new Alert(Alert.AlertType.ERROR," Die Eingabefeld 'E-Mail' ist leer."); alert.showAndWait(); - } else if (passwort.isEmpty()) { + } else if (password.isEmpty()) { alert = new Alert(Alert.AlertType.ERROR," Die Eingabefeld 'Passwort' ist leer."); alert.showAndWait(); - } else if (plz.isEmpty()) { + } else if (postCode.isEmpty()) { alert = new Alert(Alert.AlertType.ERROR," Die Eingabefeld 'Postleitzahl' ist leer."); alert.showAndWait(); - } else if (stadt.isEmpty()) { + } else if (city.isEmpty()) { alert = new Alert(Alert.AlertType.ERROR," Die Eingabefeld 'Stadt' ist leer."); alert.showAndWait(); - } else if (strasse.isEmpty()) { + } else if (street.isEmpty()) { alert = new Alert(Alert.AlertType.ERROR," Die Eingabefeld 'Straße' ist leer."); alert.showAndWait(); }else { @@ -69,8 +69,8 @@ public class SingUpController { } }else { - Address newAdresse = new Address(strasse,hausnummer,plz,stadt); - User newUser = new User(name,vorname,passwort,email,newAdresse); + Address newAdresse = new Address(street,houseNumber,postCode,city); + User newUser = new User(lastName,firstName,password,email,newAdresse); if(StartViewApplication.firstLaunch){ long id = AccountMgr.createWorker(new Worker(newUser)); if(id < 1) { @@ -91,14 +91,14 @@ public class SingUpController { alert = new Alert(Alert.AlertType.CONFIRMATION,"Eltern Account erfolgreich erstellt"); alert.showAndWait(); } - tfName.setText(""); - tfVorname.setText(""); + tfLastName.setText(""); + tfFirstName.setText(""); tfEmail.setText(""); - pfPasswort.setText(""); - tfPLZ.setText(""); - tfStadt.setText(""); - tfStrasse.setText(""); - tfHausnummer.setText(""); + pfPassword.setText(""); + tfPostCode.setText(""); + tfCity.setText(""); + tfStreet.setText(""); + tfHouseNumber.setText(""); } } diff --git a/src/main/resources/com/bib/essensbestellungsverwaltung/signUp-view.fxml b/src/main/resources/com/bib/essensbestellungsverwaltung/signUp-view.fxml index 9b61a38..cd6d094 100644 --- a/src/main/resources/com/bib/essensbestellungsverwaltung/signUp-view.fxml +++ b/src/main/resources/com/bib/essensbestellungsverwaltung/signUp-view.fxml @@ -31,7 +31,7 @@ - + @@ -42,7 +42,7 @@ - + @@ -64,7 +64,7 @@ - + @@ -80,7 +80,7 @@ - + @@ -88,7 +88,7 @@ - + @@ -100,7 +100,7 @@ - + @@ -108,7 +108,7 @@ - +