<div class="info-productm"></div>
<form id="envioVWP">
<div class="info-product">
	<div class="row">
		<div class="col-sm-6">
			<div class="form-group">
				<label for="custom1">*{l s="Name"}:</label>
				<input type="text" class="form-control" name="custom1" id="custom1" />
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-sm-6">
			<div class="form-group">
				<label for="custom2">{l s="Firma/Institut"}:</label>
				<input type="text" class="form-control" name="custom2" id="custom2" />
			</div>
		</div>
		<div class="col-sm-6">
			<div class="form-group">
				<label for="custom3">*{l s="Email"}:</label>
				<input type="text" class="form-control" name="custom3" id="custom3" />
			</div>
		</div>
	</div>
	<hr/>
	<div class="row">
		<div class="col-sm-6">
			<div class="form-group">
				<label for="custom4">*{l s="Menge"}:</label>
				<input type="text" class="form-control" name="custom4" id="custom4" />
			</div>
		</div>
		<div class="col-sm-6">
			<div class="form-group">
				<label for="custom5">*{l s="Material"}:</label>
				<input type="text" class="form-control" name="custom5" id="custom5" />
			</div>
		</div>
		<div class="col-sm-6">
			<div class="form-group">
				<label for="custom6">*{l s=" Durchmesser (mm)"}:</label>
				<input type="text" class="form-control" name="custom6" id="custom6" />
			</div>
		</div>
		<div class="col-sm-6">
			<div class="form-group">
				<label for="custom7">*{l s="Dicke (mm)"}:</label>
				<input type="text" class="form-control" name="custom7" id="custom7" />
			</div>
		</div>
		<div class="col-sm-6">		
			<div class="checkbox">
				<label>
				  <input type="checkbox" name="custom8" id="custom8"> {l s="As cut"}
				</label>
			</div>
		</div>
	</div>
	<hr/>
	<div class="row">
		<div class="col-sm-6">
			<div class="form-group">
				<label for="custom9">{l s="Politur mit einer Rauheit (Ra) < 0,01 μm"}:</label>
				<select class="form-control" id="custom9" name="custom9">
					<option value="" selected="selected"></option>
					<option value="{l s='einseitige Politur'}">{l s='einseitige Politur'}</option>
					<option value="{l s='beidseitige Politur'}">{l s='beidseitige Politur'}</option>
				</select>
			</div>
		</div>
		<div class="col-sm-6">
			<div class="form-group">
				<label for="custom10">{l s="Orientierungsgenauigkeit"}:</label>
				<select class="form-control" id="custom10" name="custom10">
					<option value="" selected="selected"></option>
					<option value="{l s='Orientierungsgenauigkeit < 2°'}">{l s='Orientierungsgenauigkeit < 2°'}</option>
					<option value="{l s='Orientierungsgenauigkeit < 1°'}">{l s='Orientierungsgenauigkeit < 1°'}</option>
					<option value="{l s='Orientierungsgenauigkeit < 0,4°'}">{l s='Orientierungsgenauigkeit < 0,4°'}</option>
					<option value="{l s='Orientierungsgenauigkeit < 0,1°'}">{l s='Orientierungsgenauigkeit < 0,1°'}</option>
				</select>
			</div>
		</div>
		<div class="col-sm-6">
			<div class="form-group">
				<label for="custom11">{l s="Orientierung"}:</label>
				<input type="text" class="form-control" name="custom11" id="custom11" />
			</div>
		</div>
		<div class="col-sm-6">
			<div class="form-group">
				<label for="custom12">{l s="Zweite Orientierung"}:</label>
				<input type="text" class="form-control" name="custom12" id="custom12" />
			</div>
		</div>
		<div class="col-sm-6">
			<div class="form-group">
				<label for="custom13">{l s="Referenz Flat"}:</label>
				<input type="text" class="form-control" name="custom13" id="custom13" />
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-sm-12">
			<div class="form-group">
				<label for="custom14">{l s="Bemerkung"}:</label>
				<textarea class="form-control" id="custom14" name="custom14" ></textarea>
			</div>
		</div>
		<div class="col-sm-12">
			<div class="checkbox">
				<label>
				  <input type="checkbox" id="copia" name="copia"> {l s="Eine Kopie dieser Nachricht an meine E-Mail Adresse"}
				</label>
			</div>
		</div>
		<div class="col-sm-12 text-right">
			<input id="idProduct" name="id_product" type="hidden" value="{$product->id}" />
			<a class="btn btn-mateck" id="enviarinfo">{l s='Request now!'}</a>
		</div>
	</div>
</div>
</form>{addJsDef stf_secure_key=$stf_secure_key}
{addJsDefL name=stf_msg_success}{l s='Your e-mail has been sent successfully' js=1}{/addJsDefL}
{addJsDefL name=stf_msg_error}{l s='Your e-mail could not be sent. Please check the e-mail address and try again.' js=1}{/addJsDefL}
{addJsDefL name=stf_msg_title}{l s='Send to a friend' js=1}{/addJsDefL}
{addJsDefL name=stf_msg_required}{l s='You did not fill required fields' js=1}{/addJsDefL}

{literal}
<script type="text/javascript">
$(document).ready(function(){
	$('#enviarinfo').click(function(){
		var id_product = $('#idProduct').val();
		var custom1 = $('#custom1').val();
		var custom2 = $('#custom2').val();
		var custom3 = $('#custom3').val();
		var custom4 = $('#custom4').val();
		var custom5 = $('#custom5').val();
		var custom6 = $('#custom6').val();
		var custom7 = $('#custom7').val();
		var custom8 = $('#custom8').val();
		var custom9 = $('#custom9').val();
		var custom10 = $('#custom10').val();
		var custom11 = $('#custom11').val();
		var custom12 = $('#custom12').val();
		var custom13 = $('#custom13').val();
		var custom14 = $('#custom14').val();
		if(custom1=='' || custom3=='' || custom4=='' || custom5=='' || custom6=='' || custom7==''){
			alert('error');
			return;
		}
		if (!isNaN(id_product))
		{
			$.ajax({
				url: baseDir + 'modules/sendtoafriend/sendtoinfo.php?rand=' + new Date().getTime(),
				type: "POST",
				headers: {"cache-control": "no-cache"},
				data: {
					action: 'sendToMyInfo', 
					secure_key: stf_secure_key,
					parametro1 : custom1, 
					parametro2 : custom2, 
					parametro3 : custom3, 
					parametro4 : custom4, 
					parametro5 : custom5, 
					parametro6 : custom6, 
					parametro7 : custom7, 
					parametro8 : custom8, 
					parametro9 : custom9, 
					parametro10 : custom10, 
					parametro11 : custom11, 
					parametro12 : custom12, 
					parametro13 : custom13, 
					parametro14 : custom14, 
					id_product: id_product
				},
				dataType: "json",
				success: function(result) {
					$('.info-productm').text((result ? stf_msg_success : stf_msg_error), stf_msg_title);
					if(result)
						$('#envioVWP').trigger("reset");
				}
			});
		}
		else
			$('.info-productm').text(stf_msg_required);
	});
});

</script>
{/literal}