<!-- #include file="header.inc" -->

<div id="content">

<p>Changes on this page are subject to the presence of the <code>?GamePassword</code> and <code>?AdminPassword</code> options on the
commandline when the server was started. Remove them if you want the changes on this page to have a lasting effect.</p>

<form method="post" action="<%page.fulluri%>" id="gamepassword">
<fieldset>
<legend>Game Password</legend>
<div class="section">
<p>Game password set: <em><%has.gamepassword%></em></p>
<input type="hidden" name="action" value="gamepassword" />
<dl>
    <dt><label for="gamepw1">Password</label></dt>
    <dd><input type="password" name="gamepw1" id="gamepw1" /></dd>
    <dt><label for="gamepw2">Confirmation</label></dt>
    <dd><input type="password" name="gamepw2" id="gamepw2" /></dd>    
</dl>
<button type="submit">save password</button>
<p><em>Note:</em> to remove the game password simply leave the password fields empty. </p>
</div>
</fieldset>
</form>

<form method="post" action="<%page.fulluri%>" id="adminpassword">
<fieldset>
<legend>Administration Password</legend>
<div class="section">
<input type="hidden" name="action" value="adminpassword" />
<dl>
    <dt><label for="adminpw1">Password</label></dt>
    <dd><input type="password" name="adminpw1" id="adminpw1" /></dd>
    <dt><label for="adminpw2">Confirmation</label></dt>
    <dd><input type="password" name="adminpw2" id="adminpw2" /></dd>    
</dl>
<button type="submit">save password</button>
<p><em>Note:</em> after changing the password you might need to log in again for the WebAdmin.</p>
</div>
</fieldset>
</form>

</div>

<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
    $('#gamepassword').submit(function(){
        if ($('#gamepw1').val() != $('#gamepw2').val()) {
            alert('Game password and confirmation do not match');
            $('#gamepw2').focus();
            return false;
        }
    });
    $('#adminpassword').submit(function(){
        if ($('#adminpw1').val() != $('#adminpw2').val()) {
            alert('Admin password and confirmation do not match');
            $('#adminpw2').focus();
            return false;
        }
        if ($('#adminpw1').val() == "") {
            alert('Admin password can not be empty');
            $('#adminpw1').focus();
            return false;
        }
    });
});
//]]>
</script>

<!-- #include file="navigation.inc" -->
<!-- #include file="footer.inc" -->
