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("name") String name,
@RequestParam("address") String address,
@RequestParam("type") String type,
@RequestParam("ad") String ad,
@RequestParam("type") String type, //TODO store
@RequestParam("ad") String ad, //TODO store
HttpSession session
)
{

View File

@ -1,78 +1,84 @@
<!DOCTYPE html>
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">
<title>Neuen Account erstellen</title>
<link rel="stylesheet" th:href="@{/css/ecom.css}"/>
<script th:src="@{/js/scrollToContent.js}"></script>
</head>
<body>
<nav th:replace="fragments/header :: header">Header</nav>
<main class="modal">
<form class="detailflex m" th:action="@{/register}" method="POST">
<div>
<h1>Neuen Account erstellen</h1>
</div>
<div>
<h2> Login Daten </h2>
</div>
<div>
<label for="username">Email Adresse</label>
<input class="full-width" type="text" name="username" placeholder="Email Adresse" id="username" required>
</div>
<div>
<label for="password">Passwort</label>
<input class="full-width" type="password" name="password" placeholder="Passwort" id="password" required>
</div>
<div>
<label for="password2">Passwort wiederholen</label>
<input class="full-width" type="password" name="password2" placeholder="Passwort" id="password2" required>
</div>
<div>
<h2> Rechungs- und Lieferinformation </h2>
</div>
<div class="col-2">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">
<title>Neuen Account erstellen</title>
<link rel="stylesheet" th:href="@{/css/ecom.css}"/>
<script th:src="@{/js/scrollToContent.js}"></script>
</head>
<body>
<nav th:replace="fragments/header :: header">Header</nav>
<main class="modal">
<form class="detailflex m" th:action="@{/register}" method="POST">
<div>
<label for="salutation">Anrede</label>
<input class="full-width" list="salutationsOpt" name="salutation" id="salutation" placeholder="Anrede"
required/>
<datalist id="salutationsOpt">
<option value="Herr">
<option value="Frau">
<option value="Herr Dr.">
<option value="Frau Dr.">
</datalist>
<h1>Neuen Account erstellen</h1>
</div>
<div>
<label for="name">Name</label>
<input class="full-width" type="text" name="name" id="name" placeholder="Nachname Vorname" required/>
<h2> Login Daten </h2>
</div>
</div>
<div>
<div>
<label for="username">Email Adresse</label>
<input class="full-width" type="text" name="username" placeholder="Email Adresse" id="username" required>
</div>
<div>
<label for="password">Passwort</label>
<input class="full-width" type="password" name="password" placeholder="Passwort" id="password" required>
</div>
<div>
<label for="password2">Passwort wiederholen</label>
<input class="full-width" type="password" name="password2" placeholder="Passwort" id="password2" required>
</div>
<div>
<h2> Rechungs- und Lieferinformation </h2>
</div>
<div class="col-2">
<div>
<label for="salutation">Anrede</label>
<input class="full-width" list="salutationsOpt" name="salutation" id="salutation" placeholder="Anrede"
required/>
<datalist id="salutationsOpt">
<option value="Herr">
<option value="Frau">
<option value="Herr Dr.">
<option value="Frau Dr.">
</datalist>
</div>
<div>
<label for="name">Name</label>
<input class="full-width" type="text" name="name" id="name" placeholder="Nachname Vorname" required/>
</div>
</div>
<div>
<label for="address">Anschrift</label>
<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>
</div>
<div>
placeholder="Optional: Zusatz&#10;Optional: Unternehmen&#10;Straße Hausnummer&#10;Postleitzeit Ort&#10;Land"></textarea>
</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>
<button class="full-width" type="submit" name="action" value="login">Registeren</button>
<a th:href="@{/terms}">
Unsere AGBs finden sie hier.
Unsere AGBs finden sie hier.
</a>
</div>
</form>
</main>
<footer th:replace="fragments/footer :: footer"></footer>
</body>
</html>
</div>
</form>
</main>
<footer th:replace="fragments/footer :: footer"></footer>
</body>
</html>