<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<html>
  <head profile="<c:url value="/profile.txt"/>">
    <title><fmt:message key="setup.fs.title"/></title>
    <link media="screen" href="<c:url value="/css/global.css"/>" type="text/css" rel="stylesheet" />
  </head>
  <body>
    <h1><fmt:message key="setup.confirm.title"/></h1>
    <p><fmt:message key="setup.confirm.intro"/></p>

	<form method="post" action="<c:url value="/setup/wizard.do"/>">
		
		<dl class="menu">
		
			<dt><fmt:message key="setup.features.heading"/></dt>
			<dd>

				<table>
					<tr>
						<th><fmt:message key="setup.feature.registration.displayName"/></th>
						<td>
							<c:choose>
								<c:when test="${command.settings['feature.registration'] == 'true'}">
									<fmt:message key="enabled"/>
								</c:when>
								<c:otherwise>
									<fmt:message key="disabled"/>
								</c:otherwise>
							</c:choose>
						</td>
					</tr>
					<tr>
						<th><fmt:message key="setup.feature.anonymous.displayName"/></th>
						<td>
							<c:choose>
								<c:when test="${command.settings['feature.anonymous'] == 'true'}">
									<fmt:message key="enabled"/>
								</c:when>
								<c:otherwise>
									<fmt:message key="disabled"/>
								</c:otherwise>
							</c:choose>
						</td>
					</tr>
					<tr>
						<th><fmt:message key="setup.feature.comments.displayName"/></th>
						<td>
							<c:choose>
								<c:when test="${command.settings['feature.comments'] == 'true'}">
									<fmt:message key="enabled"/>
								</c:when>
								<c:otherwise>
									<fmt:message key="disabled"/>
								</c:otherwise>
							</c:choose>
						</td>
					</tr>
					<tr>
						<th><fmt:message key="setup.feature.recipeimages.displayName"/></th>
						<td>
							<c:choose>
								<c:when test="${command.settings['feature.recipeimages'] == 'true'}">
									<fmt:message key="enabled"/>
								</c:when>
								<c:otherwise>
									<fmt:message key="disabled"/>
								</c:otherwise>
							</c:choose>
						</td>
					</tr>
				</table>
			
			</dd>
			
			<dt><fmt:message key="setup.db.heading"/></dt>
			<dd>

				<table>
					<tr>
						<th><fmt:message key="setup.db.hibernate.dialect.displayName"/></th>
						<td>
							<c:choose>
								<c:when test="${command.settings['hibernate.dialect'] 
									== 'org.hibernate.dialect.DB2Dialect'}">
									DB2
								</c:when>
								<c:when test="${command.settings['hibernate.dialect'] 
									== 'org.hibernate.dialect.MySQLDialect'}">
									MySQL
								</c:when>
								<c:when test="${command.settings['hibernate.dialect'] 
									== 'org.hibernate.dialect.PostgreSQLDialect'}">
									PostgreSQL
								</c:when>
								<c:otherwise>
									<c:out value="${command.settings['hibernate.dialect']}"/>
								</c:otherwise>
							</c:choose>
							<c:if test="${command.changedHibernateDialect}">
								<div class="error">
									<fmt:message key="setup.db.chagned.hibernateDialect"/>
								</div>
							</c:if>
						</td>
					</tr>
				</table>
			
			</dd>
			
			<dt><fmt:message key="setup.fs.heading"/></dt>
			<dd>

				<table>
					<tr>
						<th><fmt:message key="setup.fs.index.dir.displayName"/></th>
						<td><c:out value="${command.settings['lucene.index.base.path']}"/></td>
					</tr>
					<c:if test="${command.settings['feature.recipeimages'] == 'true'}">
						<tr>
							<th><fmt:message key="setup.fs.image.dir.displayName"/></th>
							<td><c:out value="${command.settings['recipe.image.base.path']}"/></td>
						</tr>
						<tr>
							<th><fmt:message key="setup.fs.image.url.displayName"/></th>
							<td><c:out value="${command.settings['recipe.image.base.url']}"/></td>
						</tr>
					</c:if>
				</table>
			
			</dd>
			
			<dt><fmt:message key="setup.other.heading"/></dt>
			<dd>

				<table>
					<tr>
						<th><fmt:message key="setup.crypto.key.displayName"/></th>
						<td><c:out value="${command.settings['mail.from']}"/></td>
					</tr>
					<tr>
						<th><fmt:message key="setup.mail.from.displayName"/></th>
						<td><c:out value="${command.settings['crypto.key']}"/></td>
					</tr>
					<tr>
						<th><fmt:message key="setup.crypto.pbe.salt.displayName"/></th>
						<td><c:out value="${command.settings['crypto.pbe.salt']}"/></td>
					</tr>
					<tr>
						<th><fmt:message key="setup.crypto.salt.displayName"/></th>
						<td><c:out value="${command.settings['crypto.salt']}"/></td>
					</tr>
				</table>
			
			</dd>
			
			<c:if test="${!command.skipAdminUser and !command.changedHibernateDialect}">
			
				<dt><fmt:message key="setup.admin.heading"/></dt>
				<dd>
	
					<table>
						<tr>
							<th><fmt:message key="name.displayName"/></th>
							<td>${command.user.name}</td>
						</tr>
						<tr>
							<th><fmt:message key="email.displayName"/></th>
							<td>${command.user.email}</td>
						</tr>
						<tr>
							<th><fmt:message key="login.displayName"/></th>
							<td>${command.user.login}</td>
						</tr>
						<tr>
							<th><fmt:message key="password.displayName"/></th>
							<td>*****</td>
						</tr>
					</table>
						
				</dd>
				
			</c:if>
			
		</dl>
		
		<div>
			<input type="submit" name="_target5" value="<fmt:message key="back.displayName"/>"/>
			<input type="submit" name="_finish" value="<fmt:message key="save.displayName"/>"/>
		</div>
	</form>

  </body>
</html>
