<form class="easyway_shop" id="admin_address_editor" method="post" action="{$action}">
	
	{if $address->id}
	<input type="hidden" name="address[id]" value="{$address->id}" />
	{/if}
	
	<input type="hidden" name="address[customer_id]" value="{$address->customer_id}" />
	<input type="hidden" name="address[orders]" value="{$address->orders}" />

	<div class="block wide">
	
		<div class="line">
			<div class="width_5_out_of_5">
				<label>Firma</label>
				<input type="text" name="address[company]" value="{$address->company}" />
			</div>
		</div>
				
		<div class="line">
			<div class="width_1_out_of_5">
				<label>Anrede</label>
				<select name="address[honorific]">
					<option value="0" {if $address->honorific == '0'}selected="selected"{/if} >Herr</option>
					<option value="1" {if $address->honorific == '1'}selected="selected"{/if} >Frau</option>
					<option value="2" {if $address->honorific == '2'}selected="selected"{/if} >Firma</option>
				</select>
			</div>
		</div>
		
		<div class="line">	
			<div class="width_2_out_of_5">
				<label>Vorname</label>
				<input type="text" name="address[firstname]" value="{$address->firstname}" />
			</div>
			
			<div class="width_2_out_of_5">
				<label>Nachname</label>
				<input type="text" name="address[surname]" value="{$address->surname}" />
			</div>
		</div>
			
		<div class="line">
			<div class="width_3_out_of_5">
				<label>Strasse</label>
				<input type="text" name="address[street]" value="{$address->street}" />
			</div>
			
			<div class="width_2_out_of_5">
				<label>Haus-Nr.</label>
				<input type="text" name="address[house_number]" value="{$address->house_number}" />
			</div>
		</div>
			
		<div class="line">
			<div class="width_1_out_of_5">
				<label>PLZ</label>
				<input type="text" name="address[zip_code]" value="{$address->zip_code}" />
			</div>
			
			<div class="width_2_out_of_5">
				<label>Ort</label>
				<input type="text" name="address[city]" value="{$address->city}" />
			</div>
			
			<div class="width_2_out_of_5">
				<label>Land</label>
				<select id="address_country" name="address[country]">
					{foreach from=$countries item=country}
						<option value="{$country->id}" {if $country->id == $address->country}selected="selected"{/if}>{$country->name}</option>
					{/foreach}
				</select>
			</div>
		</div>
		
		<div class="line">
			<div class="width_5_out_of_5">
				<input type="submit" value="speichern" />
			</div>
		</div>
		
	</div>
	
</form>
