diff --git a/src/main/java/NTNU/IDATT1002/controllers/SignUp.java b/src/main/java/NTNU/IDATT1002/controllers/SignUp.java index 39792ecd96b1f8761adf4ac77926b637a4374fb4..4282666a0b349999bc9b7aeb17f25ada9f8c4bf4 100644 --- a/src/main/java/NTNU/IDATT1002/controllers/SignUp.java +++ b/src/main/java/NTNU/IDATT1002/controllers/SignUp.java @@ -5,10 +5,24 @@ import java.io.IOException; import NTNU.IDATT1002.App; import javafx.event.ActionEvent; import javafx.scene.control.Button; +import javafx.scene.control.DatePicker; +import javafx.scene.control.PasswordField; +import javafx.scene.control.TextField; +import javafx.scene.layout.GridPane; public class SignUp { - public Button signup; + public GridPane signup_form; + public TextField signup_firstName; + public TextField signup_lastName; + public TextField signup_username; + public TextField signup_email; + public PasswordField signup_password; + public TextField signup_phoneCode; + public TextField signup_phoneNr; + public DatePicker signup_birthDate; + + public Button signup_btn; /** * Method that switches to login page diff --git a/src/main/resources/NTNU/IDATT1002/signup.fxml b/src/main/resources/NTNU/IDATT1002/signup.fxml index 6017c685aa0ec1892e4f9f4c3a8ca67367b55a97..c114b3c1985af60651e49bc2fd129d2512ae9d5b 100644 --- a/src/main/resources/NTNU/IDATT1002/signup.fxml +++ b/src/main/resources/NTNU/IDATT1002/signup.fxml @@ -2,41 +2,64 @@ <?import javafx.geometry.Insets?> <?import javafx.scene.control.Button?> +<?import javafx.scene.control.DatePicker?> <?import javafx.scene.control.Label?> <?import javafx.scene.control.PasswordField?> <?import javafx.scene.control.TextField?> <?import javafx.scene.layout.ColumnConstraints?> <?import javafx.scene.layout.GridPane?> +<?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.RowConstraints?> <?import javafx.scene.layout.VBox?> +<?import javafx.scene.text.Font?> <?import javafx.scene.text.Text?> -<VBox alignment="CENTER" prefHeight="400.0" prefWidth="600.0" spacing="20.0" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/" fx:controller="NTNU.IDATT1002.controllers.SignUp"> +<VBox alignment="CENTER" prefHeight="400.0" prefWidth="600.0" spacing="20.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="NTNU.IDATT1002.controllers.SignUp"> <children> - <Label text="Sign Up page" /> - <GridPane hgap="10.0" maxWidth="-Infinity" prefHeight="110.0" prefWidth="300.0" vgap="10.0"> + <Label text="Sign Up page"> + <font> + <Font size="14.0" /> + </font></Label> + <GridPane fx:id="signup_form" hgap="10.0" maxWidth="-Infinity" prefHeight="229.0" prefWidth="348.0" vgap="10.0"> <columnConstraints> <ColumnConstraints hgrow="SOMETIMES" maxWidth="-Infinity" minWidth="10.0" prefWidth="80.0" /> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> </columnConstraints> <rowConstraints> + <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> + <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> + <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> + <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> </rowConstraints> <children> - <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Username:" GridPane.halignment="RIGHT" /> - <Text strokeType="OUTSIDE" strokeWidth="0.0" text="E-Mail:" GridPane.halignment="RIGHT" GridPane.rowIndex="1" /> - <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Password:" GridPane.halignment="RIGHT" GridPane.rowIndex="2" /> - <TextField GridPane.columnIndex="1" /> - <TextField GridPane.columnIndex="1" GridPane.rowIndex="1" /> - <PasswordField GridPane.columnIndex="1" GridPane.rowIndex="2" /> + <Text layoutX="37.0" layoutY="110.0" strokeType="OUTSIDE" strokeWidth="0.0" text="First name:" textAlignment="RIGHT" wrappingWidth="59.4921875" GridPane.halignment="RIGHT" /> + <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Last name:" GridPane.halignment="RIGHT" GridPane.rowIndex="1" /> + <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Username:" GridPane.halignment="RIGHT" GridPane.rowIndex="2" /> + <Text strokeType="OUTSIDE" strokeWidth="0.0" text="E-Mail:" GridPane.halignment="RIGHT" GridPane.rowIndex="3" /> + <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Password:" GridPane.halignment="RIGHT" GridPane.rowIndex="4" /> + <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Phone:" GridPane.halignment="RIGHT" GridPane.rowIndex="5" /> + <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Birth date:" GridPane.halignment="RIGHT" GridPane.rowIndex="6" /> + <TextField fx:id="signup_firstName" GridPane.columnIndex="1" /> + <TextField fx:id="signup_lastName" GridPane.columnIndex="1" GridPane.rowIndex="1" /> + <TextField fx:id="signup_username" GridPane.columnIndex="1" GridPane.rowIndex="2" /> + <TextField fx:id="signup_email" GridPane.columnIndex="1" GridPane.rowIndex="3" /> + <PasswordField fx:id="signup_password" prefWidth="247.0" GridPane.columnIndex="1" GridPane.rowIndex="4" /> + <HBox GridPane.columnIndex="1" GridPane.rowIndex="5"> + <children> + <TextField fx:id="signup_phoneCode" prefHeight="25.0" prefWidth="150.0" promptText="Calling code" /> + <TextField fx:id="signup_phoneNr" prefWidth="242.0" promptText="Phone number" /> + </children> + </HBox> + <DatePicker fx:id="signup_birthDate" GridPane.columnIndex="1" GridPane.rowIndex="6" /> </children> <padding> <Insets bottom="3.0" left="3.0" right="3.0" top="3.0" /> </padding> </GridPane> - <Button fx:id="signup" onAction="#switchToLogin" text="Sign up" /> + <Button fx:id="signup_btn" onAction="#switchToLogin" prefHeight="26.0" prefWidth="57.0" text="Sign up" /> </children> <padding> <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />