<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
	<meta http-equiv="Pragma" content="no-cache">
	<meta http-equiv="Expires" content="0">
	
	<!-- Bootstrap CSS -->
	<link rel="stylesheet" href="common/css/bootstrap.cerulean.min.css" />
	<!-- Icons CSS -->
	<link rel="stylesheet" href="common/css/fontawesome-all.min.css">
	
	<title th:text="${sysconf.title} + ': user already registered'"></title>
</head>

<body>

	<div class="container">
		<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
			<a class="navbar-brand" href="#"><img src="resources/images/openaire_logo_small.png" width="30" height="30" alt="OpenAIRE logo"><span th:text="${sysconf.title}"></span></a>

			<button class="navbar-toggler" type="button" data-toggle="collapse"	data-target="#navbarSupportedContent"><span class="navbar-toggler-icon"></span></button>

			<div class="collapse navbar-collapse w-100 order-1" id="navbarSupportedContent">
				<ul class="navbar-nav ml-auto">
					<li class="nav-item dropdown">
						<a class="nav-link dropdown-toggle" href="javascript:void(0)" data-toggle="dropdown">Support</a>
						<div class="dropdown-menu dropdown-menu-right">
							<a class="dropdown-item" th:href="${sp.value}" th:each="sp : ${supportPages}" th:text='${sp.key}' target="_blank"></a>
						</div>
					</li>
				</ul>
			</div>
		</nav>
		
	    <div class="card" style="margin-top: 25px" ng-if="registrationStatus == 0">
			<div class="card-body">
				<h5 class="card-title">Already registered</h5>
				<p class="card-text" th:inline="text">
					Hello <b th:text="${email}" id="current_user"></b>,<br />
					<span sec:authorize="hasRole('ROLE_OPENORGS_ADMIN') or hasRole('ROLE_OPENORGS_NATIONAL_ADMIN') or hasRole('ROLE_OPENORGS_USER')">
						You are already registered.
					</span>
					<span sec:authorize="hasRole('ROLE_OPENORGS_PENDING')">
						Your registration need to be approved by an administrator. Please wait.
					</span>
				</p>	
			</div>
		</div>
		
		<br />

		<a class="btn btn-sm btn-primary" th:href="@{/logout}">Close</a>
	</div>
