<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Registration</title>
<link rel="stylesheet"
	href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
	integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
	crossorigin="anonymous">
</head>
<body>

	<!-- create navigation bar ( header) -->
	<nav class="navbar navbar-inverse navbar-fixed-top">
		<div class="container">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed"
					data-toggle="collapse" data-target="#navbar" aria-expanded="false"
					aria-controls="navbar">
					<span class="sr-only">Toggle navigation</span> <span
						class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="#" th:href="@{/}">Registracija</a>
			</div>
		</div>
	</nav>

<br>
<br>
	<!-- Create HTML registration form -->
	<div class="container">
		<div class="row">
			<div class="col-md-6 col-md-offset-3">

				<!-- success message -->
				<div th:if="${param.success}">
					<div class="alert alert-info">Uspesno ste se registrovali!</div>
				</div>

				<h1>Registracija</h1>

				<form th:action="@{/registration}" method="post" th:object="${user}">
					<div class="form-group">
						<label class="control-label" for="firstName"> Ime </label>
						<input id="firstName" class="form-control" th:field="*{firstName}"
							required autofocus="autofocus" />
					</div>

					<div class="form-group">
						<label class="control-label" for="lastName"> Prezime </label> <input
							id="lastName" class="form-control" th:field="*{lastName}"
							required autofocus="autofocus" />
					</div>

					<div class="form-group">
						<label class="control-label" for="email"> Email </label> <input
							id="email" class="form-control" th:field="*{email}" required
							autofocus="autofocus" />
					</div>

					<div class="form-group">
						<label class="control-label" for="password"> Lozinka </label> <input
							id="password" class="form-control" type="password"
							th:field="*{password}" required autofocus="autofocus" />
					</div>

					<div class="form-group">
						<button type="submit" class="btn btn-success">Registruj me</button>
						<span>Vec imate nalog? <a href="/" th:href="@{/login}">Prijavite se</a></span>
					</div>
				</form>
			</div>
		</div>
	</div>
</body>
</html>