<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<%
if (request.getParameter("lang") != null) {
  session.setAttribute("javax.servlet.jsp.jstl.fmt.locale.session", request.getParameter("lang"));
}
%>
<fmt:bundle basename="messages">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
  <title>Wizard - <fmt:message key="product.name" /></title>
	
	<jsp:include page="head_include.jsp">
		<jsp:param name="page" value="wizard" />
	</jsp:include>
</head>
<body class="wizard-page unifi">

<div class="modal">
	<div class="loading-indicator ui-corner-all">
		<img class="loading-image" src="/media/global/loader-black.gif" alt="Loading" />
		<span class="loading-message">Saving settings... Please Wait.</span>
	</div>
</div>

<div class="page-content">
	<form id="WizardForm" action="/">
		<div class="wizard-content content-box">
			<div class="wizard-logo">
				<div class="header-logo"><fmt:message key="product.shortname" /></div>
			</div>
			<ul class="wizard-navigation">
				<li id="WelcomeTab"><fmt:message key="wizard.welcome" /></li>
				<li id="DiscoverTab"><fmt:message key="wizard.discover" /></li>
				<li id="WirelessTab"><fmt:message key="wizard.config" /></li>
				<li id="SecureTab"><fmt:message key="wizard.admin" /></li>
				<li id="FinishTab"><fmt:message key="wizard.finish" /></li>
			</ul>
			<div class="navigation-indicator">
				<div id="Indicator" class="indicator"></div>
			</div>

			<div id="WelcomeContent" class="section-content">
				<p>Thank you for purchasing Ubiquiti Enterprise solution. You will be able to set up your wireless network in a few minutes.</p>
				<p>
					<label for="Lang">First, please select the language of your preference</label>
					<select id="Lang" name="lang">
						<option value="en_US">English</option>
						<!--
						<option value="zh_TW">Traditional Chinese (繁體中文)</option>
						-->
					</select>
				</p>
				<p>
					<label for="CountryCode">Select your country</label>
					<select id="CountryCode" name="countryCode">
					</select>
				</p>
				<p>
				<label>Alternatively, you can <a href="#" class="restore-button">restore from a previous backup</a></label>
				  <input id="BackupFile" name="restoreFile" type="file" class="text-input" style="display:none" />
				  <div id="BackupFile-confirm" style="display:none">
					  <input type="button" name="confirm" value="Confirm" class="button" />
					  <input type="button" name="cancel" value="Cancel" class="button" />
					  <div class="confirm-text"> </div>
				  </div>
				</p>
			</div>

			<div id="DiscoverContent" class="section-content">
				<p>Please select the devices you'd like to config.</p>
				<div class="ap-data-table">
					<div id="discovered">
					</div>
					<div id="discovered-none">
						No devices have been discovered. Make sure the devices are on the same L2/switch network and try again.
					</div>
				</div>
			</div>

			<div id="WirelessContent" class="section-content">
				<p>The Installation Wizard will create a secure primary wireless network for your devices. Enter the wireless settings that you would like to use below:
					<fieldset>
						<p class="form-element">
							<label for="NetworkName">Secure SSID</label>
							<input id="NetworkName" name="corp-ssid" type="text" />
						</p>
						<p class="form-element">
							<label for="Passphrase">Security Key</label>
							<input id="Passphrase" name="corp-passphrase" type="text" />
						</p>
					</fieldset>
				</p>
				<p>Optionally, you may create an open wireless network for your guests.
					<fieldset>
						<p class="form-element">
							<label for="EnableGuestAccess">Enable Guest Access</label>
							<input id="EnableGuestAccess" name="do-guest" type="checkbox" />
						</p>
						<p class="form-element enable-guest-access" style="display:none">
							<label for="GuestNetworkName">Guest SSID</label>
							<input id="GuestNetworkName" name="guest-ssid" type="text" />
						</p>
					</fieldset>
				</p>
			</div>

			<div id="SecureContent" class="section-content">
				<p>Please enter an administrator name and password for UniFi Controller access.</p>
				<fieldset>
					<p class="form-element">
						<label for="AdminName">Admin Name</label>
						<input id="AdminName" name="admin-name" type="text" autocomplete="off" />
					</p>
					<p class="form-element">
						<label for="Password">Password</label>
						<input id="Password" name="admin-pass1" type="password" autocomplete="off" />
					</p>
					<p class="form-element">
						<label for="PasswordConfirm">Confirm</label>
						<input id="PasswordConfirm" name="admin-pass2" type="password" autocomplete="off" />
					</p>
				</fieldset>
			</div>

			<div id="FinishContent" class="section-content">
				<p>Please review the settings below. Click Back to make any changes or Finish to activate the settings.
				Once finished you will be redirected to the management interface.</p>
				<dl id="WizardSummary">
				</dl>
			</div>
			<p class="next-previous-controls ui-dark">
				<input name="refreshButton" value="Refresh" type="button" class="ui-button button-others" />
				<input name="backButton" value="Back" type="button" class="ui-button" />
				<input name="nextButton" value="Next" type="submit" class="ui-button ui-positive-alert" />
				<input name="finishButton" value="Finish" type="button" class="ui-button ui-positive-alert" />
			</p>
		</div>
	</form>
</div>
</body>
</html>
</fmt:bundle>
