add radio BTNs to register

This commit is contained in:
Hendrik Schutter 2020-06-12 23:31:57 +02:00
parent 1590821f64
commit 0f7d248d40
2 changed files with 75 additions and 69 deletions

View File

@ -31,8 +31,8 @@ public class RegisterController {
@RequestParam("salutation") String salutation, @RequestParam("salutation") String salutation,
@RequestParam("name") String name, @RequestParam("name") String name,
@RequestParam("address") String address, @RequestParam("address") String address,
@RequestParam("type") String type, @RequestParam("type") String type, //TODO store
@RequestParam("ad") String ad, @RequestParam("ad") String ad, //TODO store
HttpSession session HttpSession session
) )
{ {

View File

@ -1,19 +1,15 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org"> <html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
<head>
<head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">
<title>Neuen Account erstellen</title> <title>Neuen Account erstellen</title>
<link rel="stylesheet" th:href="@{/css/ecom.css}"/> <link rel="stylesheet" th:href="@{/css/ecom.css}"/>
<script th:src="@{/js/scrollToContent.js}"></script> <script th:src="@{/js/scrollToContent.js}"></script>
</head> </head>
<body>
<body> <nav th:replace="fragments/header :: header">Header</nav>
<nav th:replace="fragments/header :: header">Header</nav> <main class="modal">
<main class="modal">
<form class="detailflex m" th:action="@{/register}" method="POST"> <form class="detailflex m" th:action="@{/register}" method="POST">
<div> <div>
<h1>Neuen Account erstellen</h1> <h1>Neuen Account erstellen</h1>
@ -25,21 +21,17 @@
<label for="username">Email Adresse</label> <label for="username">Email Adresse</label>
<input class="full-width" type="text" name="username" placeholder="Email Adresse" id="username" required> <input class="full-width" type="text" name="username" placeholder="Email Adresse" id="username" required>
</div> </div>
<div> <div>
<label for="password">Passwort</label> <label for="password">Passwort</label>
<input class="full-width" type="password" name="password" placeholder="Passwort" id="password" required> <input class="full-width" type="password" name="password" placeholder="Passwort" id="password" required>
</div> </div>
<div> <div>
<label for="password2">Passwort wiederholen</label> <label for="password2">Passwort wiederholen</label>
<input class="full-width" type="password" name="password2" placeholder="Passwort" id="password2" required> <input class="full-width" type="password" name="password2" placeholder="Passwort" id="password2" required>
</div> </div>
<div> <div>
<h2> Rechungs- und Lieferinformation </h2> <h2> Rechungs- und Lieferinformation </h2>
</div> </div>
<div class="col-2"> <div class="col-2">
<div> <div>
<label for="salutation">Anrede</label> <label for="salutation">Anrede</label>
@ -57,22 +49,36 @@
<input class="full-width" type="text" name="name" id="name" placeholder="Nachname Vorname" required/> <input class="full-width" type="text" name="name" id="name" placeholder="Nachname Vorname" required/>
</div> </div>
</div> </div>
<div> <div>
<label for="address">Anschrift</label> <label for="address">Anschrift</label>
<textarea rows="5" class="full-width" type="text" name="address" id="address" <textarea rows="5" class="full-width" type="text" name="address" id="address"
placeholder="Optional: Zusatz&#10;Optional: Unternehmen&#10;Straße Hausnummer&#10;Postleitzeit Ort&#10;Land"></textarea> placeholder="Optional: Zusatz&#10;Optional: Unternehmen&#10;Straße Hausnummer&#10;Postleitzeit Ort&#10;Land"></textarea>
</div> </div>
<fieldset>
<input type="radio" id="type-priv" name="type" value="priv">
<label for="male">Ich bin Privatkunde</label><br>
<input type="radio" id="type-bus" name="type" value="bus">
<label for="female">Ich bin Geschäftskunde</label><br>
</fieldset>
<div>
<h2> Werbung </h2>
</div>
<div>
<fieldset>
<input type="radio" id="ad-y" name="ad" value="y">
<label for="age1">Ich möchte Werbung erhalten.</label><br>
<input type="radio" id="ad-n" name="ad" value="n">
<label for="age2">Ich möchte keine Werbung erhalten.</label><br>
</fieldset>
</div>
<div> <div>
<button class="full-width" type="submit" name="action" value="login">Registeren</button> <button class="full-width" type="submit" name="action" value="login">Registeren</button>
<a th:href="@{/terms}"> <a th:href="@{/terms}">
Unsere AGBs finden sie hier. Unsere AGBs finden sie hier.
</a> </a>
</div> </div>
</form> </form>
</main> </main>
<footer th:replace="fragments/footer :: footer"></footer> <footer th:replace="fragments/footer :: footer"></footer>
</body> </body>
</html> </html>