<%@ page contentType="text/html; charset=UTF-8" %> 
<%@ include file="/includes.jsp" %>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Ardeo eMDT Login</title>
		<link rel="stylesheet" href="css/webapp.css" type="text/css" />
		<link rel="stylesheet" href="css/dialog.css" type="text/css" />
		<link rel="icon" href="images/emdt.ico" type="image/x-icon" />
		<link rel="shortcut icon" href="images/emdt.ico" type="image/x-icon" />
		<script src="js/webapp.js" type="text/javascript"></script>
		<style type="text/css">
		.dialogSection	{
			background-color: #f0f8ff;
		}
		.logoSection	{
			background-color: #ffffff;
		}
		</style>
		</head>
		<body>
		<table height="100%" width="100%" cellpadding="0" cellspacing="0">
			<tr class="logoSection">
				<td height="1" valign="top">
					<tiles:insertTemplate template ="tiles/loginHeader.jsp"/>
				</td>
			</tr>

			<tr height="15%">
				<td align="right" valign="top" class="dialogSection">
				</td>
			</tr>
			<tr>
				<td align="center" class="dialogSection">
					<div style="font-size: 16pt; color: #0069ca; margin-bottom: 10px;"><spring:message code="emdt.login.welcome" text="Welcome to Ardeo eMDT"/></div>
					<c:if test="${expiresInDays <= 14 && expiresInDays > 0}">
						<div class="error" ><img style="vertical-align: bottom; " width="16" height="16" src="images/16x16/exclamation.png"/>Please note that this software license will expire in less than <c:out value="${expiresInDays}"/> days.<br/></div>
					</c:if>
					<c:if test="${expiresInDays <= 0}">
						<div class="error" ><img style="vertical-align: bottom; " width="16" height="16" src="images/16x16/exclamation.png"/>This software license has now expired and use of this application is not authorised.<br/></div>
					</c:if>
					<tiles:insertTemplate template ="tiles/loginBox.jsp"/>

					<c:if test="${'true' eq isAuthenticationLdap}">
						<div style="color: #888"><spring:message code="emdt.login.ad.prompt1" text="To continue, please enter your Windows login details."/><br/><spring:message code="emdt.login.ad.prompt2" text="(You may also log in using an eMDT login account)" /></div>
					</c:if>
					<noscript><span class="error">Important: this application requires JavaScript to be enabled in order to operate correctly. <br/> <br/>Please review your browser settings and enable JavaScript before you continue.</span></noscript>
				</td>
			</tr>
			<c:if test="${not empty loginScreenMessage}">
				<tr class="dialogSection">
					<td align="center">
						<div id="screenMessageDiv">${loginScreenMessage}</div>
					</td>
				</tr>
			</c:if>
			<tr height="10px">
				<td class="dialogSection" align="center" >
				</td>
			</tr>
			<c:if test="${'true' eq allowAccountCreation}">
				<tr class="dialogSection">
					<td align="center" valign="top">
					<div style="color: #888">
					<b><spring:message code="emdt.login.apply" text="Apply for login" /></b><br />
					If you do not have a login account and would <br/>like one, please <a href="loginapplication.jsp">click here</a> to apply</div></td>
				</tr>
			</c:if>

			<tr class="dialogSection" height="60%">
				<td valign="bottom">
					<tiles:insertTemplate template ="tiles/loginFooter.jsp"/>
				</td>
			</tr>
		</table>
	</body>
</html>