<!DOCTYPE html>
<html>
<script src="script.js"></script>
<script>
    function init() {
        t();
        ip();
        secTypeChange();
    }
</script>    
<head>
<title>DASH</title>
<link rel=stylesheet href=styles.css />
</head>
<body onload="init();">
<div style=display:inline-block>
<div style="text-align:center;">
    <span id=t>DASH {{dashId}}</span><br/>
    <span style='font-size:12px'>{{version}}</span>
</div>

<form onsubmit="return v();" action='save' style="margin:0 auto;" method="post">
    <span class=s>WIFI</span>
    <div class=r>
        <label>SSID</label>
        <span class=c><input name=ssid type=text value="{{ssid}}"/></span>
    </div>
    <div class="r">
        <label>Security</label>
        <span class="c">
            <select onchange="secTypeChange()" name=secType>
                <option value=0 {{secTypeOpenSelected}}>Open</option>
                <option value=1 {{secTypeWPASelected}}>WPA</option>
                <option value=2 {{secTypeWPA2Selected}}>WPA2</option>
                <option value=3 {{secTypeWEPSelected}}>WEP</option>
            </select>
        </span>
    </div>
    <div id="password-field" class="r">
        <label>Password</label>
        <span class="c"><input name=secKey type=password value='{{password}}' /></span>
    </div>

    <div class="r">
        <label>IP Addressing</label>
        <span class="c">
            <input {{ipAddressingDhcpChecked}} name=ipAddrMode value=1 type=radio onclick='ip()' /> 
            DHCP&nbsp;&nbsp;
            <input {{ipAddressingStaticChecked}} name=ipAddrMode value=2 type=radio onclick='ip()'/>
            Static
        </span>
    </div>
    <div id="ip-static-settings">
        <div class="r">
            <label>IP Address</label>
            <span class=c><input name=ipAddress type=text value="{{staticIpAddress}}"/></span>
        </div>
        <div class="r">
            <label>Network Mask</label>
            <span class=c><input name=networkMask type=text value="{{networkMask}}"/></span>
        </div>
        <div class="r">
            <label>Gateway</label>
            <span class=c><input name=gateway type=text value="{{gateway}}"/></span>
        </div>
        <div class="r">
            <label>DNS</label>
            <span class=c><input name=dns type=text value="{{dns}}"/></span>
        </div>
    </div>

    <span class=s>ACCOUNT</span>
    <div class="r">
        <label>Type</label>
        <span class="c">
            <input {{ihTypeIHBoxChecked}} name=ihType value=1 type=radio onclick='t()' /> 
            IHBox&nbsp;&nbsp;
            <input {{ihTypeCloudChecked}} name=ihType value=2 type=radio onclick='t()'/>
            Cloud
        </span>
    </div>
    <div id="accn" class=r>
        <label>Account Number</label>
        <span class=c><input name=account type=text value="{{account}}"/></span>
    </div>
    <div id="hn" class=r>
        <label>IHBox Server</label>
        <span class=c><input name=hostname type=text value="{{hostname}}"/></span>
    </div>

    <div class=a>
        <span id="wait" style="display: none">Please wait...</span>
        <input id="saveButton" type=submit value=Save />
    </div>
</form>
<hr class=h/>
<span>&copy; 2015 Ampexa</span>
</div>
</body>
</html>