<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">

	<div class="row">
		<div class="col-md-6 bg-success">
			<center><h3><i class="fa fa-users text-success" aria-hidden="true"></i></h3></center>
			<div class="form-group">
				<label class="col-md-2 control-label" for="firstname"> {HFIRSTNAME} </label>
				<div class="col-md-10">
					<input id="firstname" name="firstname" type="text" value="{FIRSTNAME}" class="required form-control" placeholder="{COMMON_PLACEHOLDER_FIRSTNAME}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label" for="surname"> {HSURNAME} </label>
				<div class="col-md-10">
					<input id="surname" name="surname" type="text" value="{SURNAME}" class="required form-control" placeholder="{COMMON_PLACEHOLDER_SURNAME}"/>
				</div>
			</div>

			<div class="form-group">
				<label class="col-md-2 control-label" for="country"> {HCOUNTRY} </label>
				<div class="col-md-10">
					{COUNTRY}
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label" for="region"> {HREGION} </label>
				<div class="col-md-10">
					<div id="guest_region_div">{REGION}</div>
				</div>
			</div>

			
			<div class="form-group">
				<label class="col-md-2 control-label" for="about_me">{GUEST_PROFILE_ABOUT_ME} </label>
				<div class="col-md-10">
					{ABOUT_ME} <p class="help-block">{GUEST_PROFILE_ABOUT_ME_HINTS}</p>{MARKDOWN_BUTTON}
				</div>
			</div>
			
			
			<div class="form-group">
				<label class="col-md-2 control-label" for="files">Image </label>
				<div class="col-md-10">
					{UPLOADINPUT}<span class="help-block"><img src="{IMAGE}" class="img-responsive"/></span><span class="help-block">{DELETELINK}</span>
				</div>
			</div>
		</div>
		
		
		<div class="col-md-6 bg-warning">
			<center><h3><i class="fa fa-user-secret text-warning" aria-hidden="true"></i></h3></center>
			<div class="form-group">
				<label class="col-md-2 control-label" for="house">{HHOUSE}</label>
				<div class="col-md-10">
					<input id="house" name="house" type="text" value="{HOUSE}" class="required form-control" placeholder="{COMMON_PLACEHOLDER_HOUSENUMBER}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label" for="street">{HSTREET}</label>
				<div class="col-md-10">
					<input id="street" name="street" type="text" value="{STREET}" class="required form-control" placeholder="{COMMON_PLACEHOLDER_STREET}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label" for="postcode">{HPOSTCODE}</label>
				<div class="col-md-10">
					<input id="postcode" name="postcode" type="text" value="{POSTCODE}" class="required form-control" placeholder="{COMMON_PLACEHOLDER_POSTCODE}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label" for="town">{HTOWN}</label>
				<div class="col-md-10">
					<input id="town" name="town" type="text" value="{TOWN}" class="required form-control" placeholder="{COMMON_PLACEHOLDER_TOWN}"/>
				</div>
			</div>

			<div class="form-group">
				<label class="col-md-2 control-label" for="landline">{HLANDLINE}</label>
				<div class="col-md-10">
					<input id="landline" name="landline" type="tel" value="{LANDLINE}" class="required form-control" placeholder="{COMMON_PLACEHOLDER_LANDLINE}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label" for="mobile">{HMOBILE}</label>
				<div class="col-md-10">
					<input id="mobile" name="mobile" type="tel" value="{MOBILE}" class="required form-control" placeholder="{COMMON_PLACEHOLDER_MOBILE}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label" for="email">{HEMAIL}</label>
				<div class="col-md-10">
					<input id="email" name="email" type="email" value="{EMAIL}" class="required form-control" placeholder="{COMMON_PLACEHOLDER_EMAIL}"/>
				</div>
			</div>
			
			<div class="form-group">
				<label class="col-md-2 control-label" for="vat_number">{_JOMRES_COM_YOURBUSINESS_VATNO}</label>
				<div class="col-md-10">
					<input id="vat_number" name="vat_number" type="text" value="{VAT_NUMBER}" class="form-control" placeholder="NNNNNNNNNN"/>
					<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>{GUEST_PROFILE_OPTIONAL}</p>
			<div class="form-group">
				<label class="col-md-2 control-label" for="drivers_license">{GUEST_PROFILE_DRIVING_LICENSE}</label>
				<div class="col-md-10">
					<input id="text" name="drivers_license" type="drivers_license" value="{DRIVERS_LICENSE}" class=" form-control" placeholder=""/>
				</div>
			</div>

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

			<div class="form-group">
				<label class="col-md-2 control-label" for="preferences">{_JOMRES_COM_MR_EB_ROOM_BOOKINGSPECIALREQ}</label>
				<div class="col-md-10">
					<input id="text" name="preferences" type="preferences" value="{PREFERENCES}" class=" form-control" placeholder=""/><p class="help-block">{GUEST_PROFILE_PREFERENCES}</p>
				</div>
			</div>
		</div>
	</div>
	
	<div class="form-actions">
		<div class="col-md-10 col-md-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>