#if($params.computer)
#set($continents = [ "Africa", "Asia", "Latin America", "Europe", "Germany" ])
#set($continent_numbers = [ 72,73,74,71,75 ])
<div id="assistant" class="attributeform">
<form method="POST" action="assistant-kas-action.vm">
<input type="hidden" name="computer" value="$params.computer">
<label>Kontinent:</label>#dropdown("continent",$continents,$properties.getComputerProperty($params.computer,"continent").value)
#computer_property_input("Netz-Nr.:",$params.computer,"network_number")
<label></label><button id="formsave">&nbsp;</button>
<br>
#set($w=$properties.getComputerProperty($params.computer,"wan_type").value)
#set($dhcp=$properties.getComputerProperty($params.computer,"dhcp").value)
#if($w=="Routed")
#if($dhcp=="true")
#set($wan_type="Routed-DHCP")
#else
#set($wan_type="Routed-Static")
#end
#elseif($w=="Pppoe")
#set($wan_type="PPPoE")
#set($dhcp="false")
#end
<label>WAN:</label>#dropdown("wan_type",[ "Routed-DHCP", "Routed-Static", "PPPoE"],$wan_type)
#set($peerdns=$properties.getComputerProperty($params.computer,"pppoe_usepeerdns").value)
#if($peerdns==true)
#set($checked="checked")
#end
<label></label><input type="checkbox" id="pppoe_usepeerdns" name="pppoe_usepeerdns" $!checked><span class="formtextitem">Use Peer DNS</span>
<br>
#computer_property_input("WAN IP:",$params.computer,"routed_ip")
#computer_property_input("PPPoE-Username:",$params.computer,"pppoe_user")
<br>
#computer_property_input("WAN Netmask:",$params.computer,"routed_netmask")
#computer_property_input("PPPoE-Password:",$params.computer,"pppoe_password")
<br>
#computer_property_input("Force MTU:",$params.computer,"pppoe_mtu")
<br>
#computer_property_input("External DNS:",$params.computer,"external_dns")
<br>
</form>
</div>
<script type="text/javascript">
$(function() {
	$("#formsave").button( { disabled: true, text: false, icons: { primary: "ui-icon-disk" }});
	var formModified = false;
	var setFormModified = function() {
		if(formModified == false) {
			formModified = true;
			$("#assistant").addClass("form-modified");
                	$("#formsave").button("option","disabled",false);
		}	
	};

	$("#assistant input[type=text]").change(setFormModified);
	$("#assistant input[type=text]").keyup(setFormModified);
	$("#assistant select").change(setFormModified);
	$("#pppoe_usepeerdns").change(setFormModified);

});
</script>
#end
