<!-- content_customer_center/add_address.tpl -->
<div class="full_box">
	<div class="title_wrapper">
		<div class="title" style="width:550px;;"><h2>Adressen</h2></div>
		<a class="icon" href="#add_address_form" style="width:160px;background-image:url({$PARENT_THEME_DIR}/media/images/edit_add.png);"><span>Adresse hinzuf&uuml;gen</span></a>
		<div class="clear"></div>
	</div>

	<div class="box_content">
		<div class="box_padder">
			<form target="{$this_url}" method="post" id="add_address_form" class="formated_form">
				
				<input type="hidden" name="action" value="add_address" />
				<input type="hidden" name="id" />
				
				<!-- block: company -->
				<div class="line first">
					<div class="full">
						<label for="company">Firma</label>
						<input type="text" class="full" name="company" />
					</div>
				</div>
				<!-- end block: company -->
			
				<!-- block: honorific -->
				<div class="line">
					<div class="short">
						<label for="honorific">Anrede</label><br />
						<select name="honorific" class="short">
							<option value="0" {if $customer->honorific == '0'}selected="selected"{/if}>Herr</option>
							<option value="1" {if $customer->honorific == '1'}selected="selected"{/if}>Frau</option>
							<option value="2" {if $customer->honorific == '2'}selected="selected"{/if}>Firma</option>
						</select>
					</div>
				</div>
				<!-- end block: honorific -->
					
				<!-- block: name -->
				<div class="line">
					<div class="half">
						<label for="firstname">Vorname</label><br />
						<input type="text" class="half" name="firstname" value="{$customer->firstname}" />
					</div>
					
					<div class="last half">
						<label for="surname">Nachname</label><br />
						<input type="text" class="half" name="surname" value="{$customer->surname}" />
					</div>
				</div>
				<!-- end block: name -->
				
				<!-- block: street -->
				<div class="line">
					<div class="long">
						<label for="street">Strasse</label><br />
						<input type="text" class="half" name="street" />
					</div>
					
					<div class="last half">
						<label for="house_number">Hausnummer</label><br />
						<input type="text" class="half" name="house_number" />
					</div>
				</div>
				<!-- end block: street -->
				
				<!-- block: city and country -->
				<div class="line">
					<div class="half">
						<label for="zip_code">Postleitzahl</label><br />
						<input type="text" class="half" name="zip_code" />
					</div>
					
					<div class="last half">
						<label for="city">Ort</label><br />
						<input type="text" class="half" name="city" />
					</div>
				</div>
				<!-- end block: city -->
				
				<!-- block: country -->
				<div class="line">
					<div class="half">
						<label for="country">Land</label><br />
						<select name="country" >
							{foreach from=$countries item=country}
							<option value="{$country->id}">{$country->name}</option>
							{/foreach}
						</select>
					</div>
				</div>
				<!-- end block: country -->
				
				<!-- block: submit -->
				<div class="line">
					<span class="target">
					</span>
					<input type="submit" value="Speichern" class="button" style="width:125px;margin-left:350px;" />
				</div>
				<!-- end block: submit -->
			</form>
			
			{if $customer_addresses}
				{foreach from=$customer_addresses item=address}
				
				<div class="address{if $address->id == $customer->default_address} default_address{/if}">
	
					<div class="menu_bar">
						{if $address->id == $customer->default_address}
							<span class="standard">Standard</span>
						{/if}
						
						<a href="{$this_url}&action=delete_address&id={$address->id}" class="delete_address">&nbsp;</a>
						
						<a href="{$this_url}&action=get_address&id={$address->id}" class="edit_address">&nbsp;</a>
						
						{if $address->id != $customer->default_address}
							<a href="{$this_url}&action=set_standard&id={$address->id}" class="set_standard">&nbsp;</a>
						{/if}
						
						<div class="clear"></div>
					</div>
	
					<div class="vcard">
						<div class="honorific">{$address->honorific_text}</div>
						{if $address->company != ""}
							<div>{$address->company}</div>
						{/if}
						<div class="fn">{$address->firstname} {$address->surname}</div>
						
						<div class="adr">
							<div class="street-address">{$address->street} {$address->house_number}</div>
							<div><span class="region">{$address->zip_code}</span> <span class="locality">{$address->city}</span></div>
						</div>
						
						<div class="country">{$address->country}</div>
					</div>
				</div>
				{/foreach}
				<div class="clear"></div>
			{else}
				<p>Sie haben keine Adressen angegeben.</p>
			{/if}
		</div>
	</div>
</div>
