<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  layout:decorator="/templates/layout">
  <head>
  	<title>Customer registration</title>
  </head>
<body>
<div layout:fragment="content">
	
	<h2 align="center">Customer registration</h2>
	<form th:action="@{'/buy;jsessionid=' + ${sessionId}}" method="get">
		<div>
			<label class="radio">
				<input type="radio" name="RETURNING_FLAG" value="Y" checked="checked" />I am existing user
			</label>
		</div>
		<div>
			<label class="radio">
				<input type="radio" name="RETURNING_FLAG" value="N" />I am a first time customer
			</label>
		</div>
		<hr />
		<div>
			<strong>If you are an existing customer, enter your username and password:</strong><br/>
			<br />
			<fieldset>
				<label>
					Username:
				</label>
				<input name="username" type="text" />
				<label>
					Password:
				</label>
				<input name="password" type="password" />
			</fieldset>
		</div>
		<hr />
		<div>
			<strong>If you are a first time customer, enter the details below:</strong><br />
			<br />
			<fieldset>
				<label>Enter your birth date (mm/dd/yyyy):</label>
				<input name="birthdate" />
				<label>Enter your first name: </label>
				<input name="fname" />
				<label>Enter your last name: </label>
				<input name="lname" />
				<label>
					Enter your address 1:
				</label>
				<input name="street1" />
				<label>
					Enter your address 2:
				</label>
				<input name="street2" />
				<label>
					Enter your City, State, Zip:
				</label> 
				<input name="city" placeholder="City" /> 
				<input name="state" placeholder="State" /> 
				<input name="zip" placeholder="Zip" />
				<label>
					Enter your Country: 
				</label>
				<input name="country" />
				<label>
					Enter your Phone: 
				</label>
				<input name="phone" />
				<label>
				Enter your Email: 
				</label>
				<input name="email" />
				<label>
					Special Instructions: 
				</label>
				<textarea name="data" rows="4" cols="65"></textarea>
				<input th:if="${customerId}" type="hidden" th:value="${customerId}" name="C_ID" />
				<input th:if="${shoppingId}" type="hidden" th:value="${shoppingId}" name="SHOPPING_ID" />
			</fieldset>
		</div>
		<center><input type="submit" value="Submit" class="btn" /></center>
	</form>
</div>
</body>
</html>