<patTemplate:tmpl name="pageoutput" unusedvars="strip">
<script language="javascript" type="text/javascript">
<!--
jomresJquery(document).ready(function () {
	jomresJquery("#guest_country").change(function(){
		var selectedValue = jomresJquery(this).find(":selected").val();
		clause = "&task=get_region_dropdown_for_country_code&country="+selectedValue;
		jomresJquery.get(live_site_ajax + clause, function (data) {
			populateDiv("guest_region_div",data);
			});
		});

	jomresJquery("#reviewForm").validate({
		rules: {
			firstname: "required",
			surname: "required",
			house: "required",
			street: "required",
			postcode: "required",
			town: "required",
			region: "required",
			email: "required",
		},
		messages: {
			firstname: "{_JOMRES_BOOKINGFORM_MONITORING_REQUIRED_FIRSTNAME}",
			surname: "{_JOMRES_BOOKINGFORM_MONITORING_REQUIRED_SURNAME}",
			house: "{_JOMRES_BOOKINGFORM_MONITORING_REQUIRED_HOUSENO}",
			street: "{_JOMRES_BOOKINGFORM_MONITORING_REQUIRED_STREET}",
			postcode: "{_JOMRES_BOOKINGFORM_MONITORING_REQUIRED_POSTCODE}",
			town: "{_JOMRES_BOOKINGFORM_MONITORING_REQUIRED_TOWN}",
			region: "{_JOMRES_BOOKINGFORM_MONITORING_REQUIRED_REGION}",
			email: "{_JOMRES_BOOKINGFORM_MONITORING_REQUIRED_EMAIL}",
		},
		errorLabelContainer: "#messageBox",
		wrapper: "p",
		submitHandler: function (form) {
			form.submit();
		},
	});
	
	jomresJquery.validator.setDefaults({
		highlight: function (input) {
			jomresJquery(input).addClass("alert alert-warning");
		},
		unhighlight: function (input) {
			jomresJquery(input).removeClass("alert alert-warning");
		}
	});
	
	jomresJquery("#messageBox").hide();
});
//-->
</script>

<div id="messageBox" class="alert alert-error"></div>
<h2 class="page-header">{PAGETITLE}</h2>

<p class="alert alert-info">{GUEST_PROFILE_INFORMATION}</p>

<form action="{JOMRES_SITEPAGE_URL_NOSEF}" method="post" id="reviewForm" name="adminform" enctype="multipart/form-data" role="form" class="form-horizontal">
	<fieldset>
		<div class="alert alert-success">
			<center><h3><i class="fa fa-users text-success" aria-hidden="true"></i></h3></center>
			<div class="control-group">
				<label class="control-label" for="firstname">{HFIRSTNAME}</label>

				<div class="controls">
					<input id="firstname" name="firstname" type="text" value="{FIRSTNAME}" class="required "/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="surname">{HSURNAME}</label>
				<div class="controls">
					<input id="surname" name="surname" type="text" value="{SURNAME}" class="required "/>
				</div>
			</div>

			<div class="control-group">
				<label class="control-label" for="country"> {HCOUNTRY} </label>
				<div class="controls">
					{COUNTRY}
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="region"> {HREGION} </label>
				<div class="controls">
					<div id="guest_region_div">{REGION}</div>
				</div>
			</div>

			
			<div class="control-group">
				<label class="control-label" for="about_me">{GUEST_PROFILE_ABOUT_ME} </label>
				<div class="controls">
					{ABOUT_ME} <p class="help-block">{GUEST_PROFILE_ABOUT_ME_HINTS}</p>
				</div>
			</div>
			
			
			<div class="control-group">
				<label class="control-label" for="files">Image </label>
				<div class="controls">
					{UPLOADINPUT}<span class="help-block"><img src="{IMAGE}" class="img-responsive"/></span><span class="help-block">{DELETELINK}</span>
				</div>
			</div>
		</div>
		
		<div class="span12 alert alert-warning">
			<center><h3><i class="fa fa-user-secret text-warning" aria-hidden="true"></i></h3></center>
			<div class="control-group">
				<label class="control-label" for="house">{HHOUSE}</label>
				<div class="controls">
					<input id="house" name="house" type="text" value="{HOUSE}" class="required "/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="street">{HSTREET}</label>

				<div class="controls">
					<input id="street" name="street" type="text" value="{STREET}" class="required "/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="postcode">{HPOSTCODE}</label>

				<div class="controls">
					<input id="postcode" name="postcode" type="text" value="{POSTCODE}" class="required "/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="town">{HTOWN}</label>

				<div class="controls">
					<input id="town" name="town" type="text" value="{TOWN}" class="required "/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="landline">{HLANDLINE}</label>

				<div class="controls">
					<input id="landline" name="landline" type="text" value="{LANDLINE}" class="required "/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="mobile">{HMOBILE}</label>

				<div class="controls">
					<input id="mobile" name="mobile" type="text" value="{MOBILE}" class="required "/>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="email">{HEMAIL}</label>

				<div class="controls">
					<input id="email" name="email" type="email" value="{EMAIL}" class="required "/>
				</div>
			</div>
			
			<div class="control-group">
				<label class="control-label" for="vat_number">{_JOMRES_COM_YOURBUSINESS_VATNO}</label>
				<div class="controls">
					<input id="vat_number" name="vat_number" type="text" value="{VAT_NUMBER}"/>
					<patTemplate:tmpl name="validation" type="simpleCondition" requiredVars="validation_class">
					<span class="help-block">
						<div class="alert {VALIDATION_CLASS}">
							{VAT_NUMBER_VALIDATION_STATUS}
						</div>
					</span>
					</patTemplate:tmpl>
				</div>
			</div>

			<p class="help-block">{GUEST_PROFILE_OPTIONAL}</p>
			<div class="control-group">
				<label class="control-label" for="drivers_license">{GUEST_PROFILE_DRIVING_LICENSE}</label>
				<div class="controls">
					<input id="text" name="drivers_license" type="drivers_license" value="{DRIVERS_LICENSE}" class=" form-control" placeholder=""/>
				</div>
			</div>

			<div class="control-group">
				<label class="control-label" for="passport_number">{GUEST_PROFILE_PASSPORT_NUMBER}</label>
				<div class="controls">
					<input id="text" name="passport_number" type="passport_number" value="{PASSPORT_NUMBER}" class=" form-control" placeholder=""/>
				</div>
			</div>
				
			<div class="control-group">
				<label class="control-label" for="iban">{GUEST_PROFILE_IBAN}</label>
				<div class="controls">
					<input id="text" name="iban" type="iban" value="{IBAN}" class=" form-control" placeholder=""/>
				</div>
			</div>

			<div class="control-group">
				<label class="control-label" for="preferences">{_JOMRES_COM_MR_EB_ROOM_BOOKINGSPECIALREQ}</label>
				<div class="controls">
					<input id="text" name="preferences" type="preferences" value="{PREFERENCES}" class=" form-control" placeholder=""/><p class="help-block">{GUEST_PROFILE_PREFERENCES}</p>
				</div>
			</div>
		</div>
	</fieldset>
	
	<div class="form-actions">
		<div class="span10 offset-2">
			<button type="submit" class="btn btn-primary"><i class="fa fa-check"></i> {COMMON_SUBMIT}</button>
			<a href="{JOMRES_SITEPAGE_URL}" class="btn btn-default"><i class="fa fa-times"></i> {COMMON_CANCEL}</a>
		</div>
	</div>
	<input type="hidden" name="no_html" value="1"/>
	<input type="hidden" name="return_url" value="{RETURN_URL}"/>
	<input type="hidden" name="task" value="save_my_account"/>
	{CSRF_TOKEN}
</form>
</patTemplate:tmpl>