<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<form:form class="form-signup" method="post" action="/signup" commandName="signUpUser">
    <h2 class="form-signin-heading">Create a new account</h2>

    <label for="signUpFirstName" class="sr-only">First name</label>
    <form:input path="firstName" name="firstName" id="signUpFirstName" class="form-control" placeholder="First name" required="required" />
    <form:errors path="firstName" cssClass="error-form" />

    <label for="signUpLastName" class="sr-only">Last Name</label>
    <form:input path="lastName" name="lastName" id="signUpLastName" class="form-control" placeholder="Last name" required="required" />
    <form:errors path="lastName" cssClass="error-form" />

    <label for="signUpBirthDate" class="sr-only">Surname</label>
    <form:input type="date" path="birthDate" name="birthDate" id="signUpBirthDate" class="form-control" placeholder="Birtdate" required="required" />
    <form:errors path="birthDate" cssClass="error-form" />

    <label for="signUpEmail" class="sr-only">Email address</label>
    <form:input path="email" name="email" id="signUpEmail" class="form-control" placeholder="Email address" required="required" />
    <form:errors path="email" cssClass="error-form" />

    <label for="signUpPassword" class="sr-only">Password</label>
    <form:password path="password" name="password" id="signUpPassword" class="form-control" placeholder="Password" required="required" />
    <form:errors path="password" cssClass="error-form" />

    <label for="signUpPasswordRepeat" class="sr-only">Repeat password</label>
    <form:password path="repeatPassword" name="repeatPassword" id="signUpPasswordRepeat" class="form-control" placeholder="Repeat password" required="required" />
    <form:errors path="repeatPassword" cssClass="error-form" />

    <button class="btn btn-lg btn-primary btn-block" type="submit">Sign up</button>
</form:form>