
<div id="content_box_item_list" class="full_box">
	<div class="title_wrapper">
		<h1>Registrierung</h1>
	</div>
	<div class="box_content">
	
		<!-- template begin content_customer_registration.tpl -->
		{if isset($error_message)}
			{foreach from=$error_message item=message}
				<div style="font-weight:bold;font-size:14px;color:#cc0000;border:#cc0000 1px solid;padding:10px;text-align:center;">
					{$message}
				</div>
				<br />
			{/foreach}
		{/if}	
	
		<p style="margin:20px;">
			{$system_configuration.customer_registration_text|replace:"\n":"<br />"}
		</p>

		<form class="cashier formated_form" method="post" enctype="multipart/form-data" style="display:block;">
			<input id="is_merchant" type="hidden" name="customer_field[merchant]" value="{if $system_configuration.merchant_registration_active}true{else}false{/if}" />
			
			<!-- block: honorific -->
			<div class="line">
				<div class="short highlighted {if isset($data.state) && $data.state == 2}required{/if}">
					<label for="customer_field[honorific]">Anrede *</label><br />
					<select id="honorific" name="customer_field[honorific]" class="short">
					<option value="2" {if isset($data.form_data.honorific) && $data.form_data.honorific == '2'}selected="selected"{/if}>Firma</option>
						<option value="0" {if isset($data.form_data.honorific) && $data.form_data.honorific == '0'}selected="selected"{/if}>Herr</option>
						<option value="1" {if isset($data.form_data.honorific) && $data.form_data.honorific == '1'}selected="selected"{/if}>Frau</option>
						
					</select>
				</div>
			</div>
			<!-- end block: honorific -->
			
			<!-- block: company -->
			<div class="line first">
				<div id="label_firma" class="full {if isset($data.state) && $data.state == 2 && $data.form_data.honorific == 2}highlighted required{/if}">
					<label for="customer_field[company]">Firma <span>*</span></label>
					<input type="text" class="full" name="customer_field[company]" value="{if isset($data.form_data.company)}{$data.form_data.company}{/if}" />
				</div>
			</div>
	
			
			
			<!-- end block: company -->

			<!-- block: name -->
			<div class="line">
				<div id="label_vorname" class="half {if !isset( $data.form_data.honorific) || $data.form_data.honorific != '2'}highlighted{/if} {if isset($data.state) && $data.state == 2 && (!isset( $data.form_data.honorific) || $data.form_data.honorific != '2')}required{/if}">
					<label for="customer_field[firstname]">Vorname <span>*</span></label><br />
					<input type="text" class="half" name="customer_field[firstname]" value="{if isset($data.form_data.firstname)}{$data.form_data.firstname}{/if}" />
				</div>
				
				<div id="label_nachname" class="last half {if !isset( $data.form_data.honorific) || $data.form_data.honorific != '2'}highlighted{/if} {if isset($data.state) && $data.state == 2 &&(!isset( $data.form_data.honorific) || $data.form_data.honorific != '2')}required{/if}">
					<label for="customer_field[surname]">Nachname <span>*</span></label><br />
					<input type="text" class="half" name="customer_field[surname]" value="{if isset($data.form_data.surname)}{$data.form_data.surname}{/if}" />
				</div>
			</div>
			<!-- end block: name -->
			
			<!-- block: street -->
			<div class="line">
				<div class="half highlighted {if isset($data.state) && $data.state == 2}required{/if}">
					<label for="customer_field[street]">Strasse *</label><br />
					<input type="text" class="half" name="customer_field[street]" value="{if isset($data.form_data.street)}{$data.form_data.street}{/if}" />
				</div>
				
				<div class="last half highlighted {if isset($data.state) && $data.state == 2}required{/if}">
					<label for="customer_field[house_number]">Hausnummer *</label><br />
					<input type="text" class="half" name="customer_field[house_number]" value="{if isset($data.form_data.house_number)}{$data.form_data.house_number}{/if}" />
				</div>
			</div>
			<!-- end block: street -->
			
			<!-- block: city and country -->
			<div class="line">
				<div class="half highlighted {if isset($data.state) && $data.state == 2}required{/if}">
					<label for="customer_field[zip_code]">Postleitzahl *</label><br />
					<input type="text" class="half" name="customer_field[zip_code]" value="{if isset($data.form_data.zip_code)}{$data.form_data.zip_code}{/if}" />
				</div>
				
				<div class="last half highlighted {if isset($data.state) && $data.state == 2}required{/if}">
					<label for="customer_field[city]">Ort *</label><br />
					<input type="text" class="half" name="customer_field[city]" value="{if isset($data.form_data.city)}{$data.form_data.city}{/if}" />
				</div>
			</div>
	
			<div class="line">
				<div class="half highlighted {if isset($data.state) && $data.state == 2}required{/if}">
					<label for="customer_field[country]">Land *</label>Pflichtfeld f&uuml;r Versandkostenberechnung.<br />
					<select id="countries" class="half" name="customer_field[country]" >
						{foreach from=$countries item=country}
						<option value="{$country->id}" {if isset($data.form_data.country) &&  $data.form_data.country == $country->id}selected="selected"{/if} >{$country->name}</option>
						{/foreach}
					</select>
				</div>
			</div>
			<!-- end block: country -->
                        
                        {if $system_configuration.merchant_registration_active}
			<div id="merchant_data">
				<div class="line ">
					<div id="label_tax_id" class="half  {if isset($data.state) && $data.state == 2 && $data.form_data.honorific == 2}highlighted required{/if}">
						<label for="customer_field[tax_id]">Ust-ID <span>*</span></label>
						<input type="text" class="half" name="customer_field[tax_id]" value="{if isset($data.form_data.tax_id)}{$data.form_data.tax_id}{/if}" />
					</div>
					
					<div class="half last">
						<label for="">Steuernummer</label>
						<input type="text" class="half" name="customer_field[tax_number]" value="{if isset($data.form_data.tax_number)}{$data.form_data.tax_number}{/if}" />
					</div>
				</div>
			</div>
			{/if}
                        
			{*
			<div class="line">
				<label>Geburtsdatum</label>
				<br />
				
				<select style="width:70px;margin-right:10px;" name="birthdate[day]" size="1">
					<option value="0">Tag</option>
					{foreach from=$days item=day}
					<option value="{$day}" {if isset($data.date.day) && $day == $data.date.day}selected="selected"{/if}>{$day}</option>
					{/foreach}
				</select>
				
				<select style="width:70px;margin-right:10px;" name="birthdate[month]" size="1">
					<option value="0">Monat</option>
					{foreach from=$months item=month}
					<option value="{$month}" {if isset($data.date.month) && $month == $data.date.month}selected="selected"{/if}>{$month}</option>
					{/foreach}
				</select>
				
				<select style="width:70px;" name="birthdate[year]" size="1">
					<option value="0">Jahr</option>
					{foreach from=$years item=year}
						<option value="{$year}" {if isset($data.date.year) && $year == $data.date.year}selected="selected"{/if}>{$year}</option>
					{/foreach}
				</select>
			</div>
			*}
			<div class="line">
				<div class="half highlighted {if isset($data.state) && $data.state == 2}required{/if}">
					<label for="customer_field[phone]">Telefon *</label><br />
					<input type="text" class="half" name="customer_field[phone]" value="{if isset($data.form_data.phone)}{$data.form_data.phone}{/if}" />
				</div>
				
				<div class="last half highlighted {if isset($data.state) && $data.state == 2}required{/if}">
					<label for="customer_field[email]">E-Mail *</label><br />
					<input type="text" class="half" name="customer_field[email]" value="{if isset($data.form_data.email)}{$data.form_data.email}{/if}" />
				</div>
			</div>
			
			<div class="line">
				<div class="half">
					<label for="customer_field[fax]">Fax</label><br />
					<input type="text" class="half" name="customer_field[fax]" value="{if isset($data.form_data.fax)}{$data.form_data.fax}{/if}" />
				</div>
				
				<div class="last half">
					<label for="customer_field[website]">Webseite</label><br />
					<input type="text" class="half" name="customer_field[website]" value="{if isset($data.form_data.website)}{$data.form_data.website}{/if}" />
				</div>
			</div>
			
			<div class="line">
				<div class="half">
					<label for="customer_field[mobile]">Handy</label><br />
					<input type="text" class="half" name="customer_field[mobile]" value="{if isset($data.form_data.mobile)}{$data.form_data.mobile}{/if}" />
				</div>
			</div>
			
	
			<div class="line">
				<div class="half highlighted {if isset($data.state) && $data.state == 2}required{/if}">
					<label for="customer_field[password1]">Passwort *</label>
					<br />
					<input id="password_one" type="password" class="half" name="customer_field[password1]">
				</div>
			</div>
			
			<div class="line">
				<div  class="half highlighted {if isset($data.state) && $data.state == 2}required{/if}">
					<label for="customer_field[password2]">Passwort best&auml;tigen *</label>
					<br />
					<input id="password_two" type="password" class="half" name="customer_field[password2]">
				</div>
				
				<div class="half last">
					<p id="passwords_match"></p>
				</div>
			</div>
			
			<div class="box_padder" style="margin:20px;">
				Klicken Sie auf die &Uuml;berschriften, um den vollst&auml;ndigen Artikel zu lesen<br />
				<br />
				
				{if isset($agb_data.datenschutz)}
				<div id="data_privacy" class="cashdesk_agreement_header">Datenschutz</div>
				<div id="data_privacy_wrapper" style="background:#979797;border:1px solid #979797;margin-top:2px;display:none;">
					<div id="data_privacy_content" style="margin:10px;border:1px solid white;background:white;">
						<div style="margin:10px;">{$agb_data.datenschutz}</div>
					</div>
				</div>
				{/if}
				
				{if isset($agb_data.agbs)}
				<div id="terms_and_conditions" class="cashdesk_agreement_header">AGB</div>
				<div id="terms_and_conditions_wrapper" style="background:#979797;border:1px solid #979797;margin-top:2px;display:none;">
					<div id="terms_and_conditions_content" style="margin:10px;border:1px solid white;background:white;">
						<div style="margin:10px;">{$agb_data.agbs}</div>
					</div>
				</div>
				{/if}
			</div>
			
			<div style="margin:20px;">
				<input id="agreements_accepted" type="checkbox" value="yes" name="agreements_accepted" /> 
				<label for="agreements_accepted">
					Ich habe die AGB und Datenschutzbestimmungen gelesen, verstanden und akzeptiere sie.
				</label>
			</div>
			<div style="margin:20px;">
				<div class="g-recaptcha" data-sitekey="6LfR26UZAAAAAPtLKYjzWSz_6genzowdDSAtA8tu"></div>
			</div>
			
			<!-- block: submit -->
			<div class="line" style="position:relative;height:20px;">
				<input class="button" type="submit" name="submit" value="Anmelden" style="position:absolute;right:0px;" />
			</div>
			<!-- end block: submit -->
		</form>
	</div>
	<div class="box_footer"></div>
</div>

 <script type="text/javascript">     
     var countries = [];
    {foreach from=$countries item=country}
        countries['c_' + {$country->id}] = {$country->customer_ust_id_required};
    {/foreach}
</script>
<script type="text/javascript" src="{$PARENT_THEME_DIR}/media/js/content_customer_registration.js"></script>
<!-- template end content_customer_registration.tpl -->