
<patTemplate:tmpl name="pageoutput" unusedvars="strip">
<script language="javascript">
	<!--
	function validatePropertyRegistration() {
		valid = true;
			
		if(jomresJquery('#property_name').val()) 
			{
			jomresJquery('#property_name').closest(".form-group").removeClass("has-error").addClass("has-warning");
			}
		else {
			jomresJquery('#property_name').closest(".form-group").removeClass("has-warning").addClass("has-error");
			jomresJquery('#property_name').focus();
			valid = false;
			}
			
		if( jomresJquery('#property_email').val() && echeck(jomresJquery('#property_email').val())) 
			{
			jomresJquery('#property_email').closest(".form-group").removeClass("has-error").addClass("has-warning");
			}
		else {
			jomresJquery('#property_email').closest(".form-group").removeClass("has-warning").addClass("has-error");
			jomresJquery('#property_email').focus();
			valid = false;
			}

		if (valid) {
			document.regForm.action = "{JOMRES_SITEPAGE_URL_NOSEF}&task=save_new_property"
			document.regForm.submit();
		}
		else {
			alert("{_JOMRES_FIELDS_HIGHLIGHTED_ARE_REQUIRED}");
		}
	}
	
	jomresJquery(document).ready(function(){
		jomresJquery("#new_property_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("region_dropdown",data);
				});
			});
		});
	//-->
</script>

<div id="tour_target_registration_1"></div>

<h2 class="page-header">{PAGETITLE}</h2>

<p>
{JOMRES_PROPERTY_REGISTRATION_INSTRUCTIONS_TITLE}
</p>

<ul>
	<li>
	{JOMRES_PROPERTY_REGISTRATION_INSTRUCTIONS_NOTE1}
	</li>
	<li>
	{JOMRES_PROPERTY_REGISTRATION_INSTRUCTIONS_NOTE2}
	</li>
</ul>

<form action="{JOMRES_SITEPAGE_URL_NOSEF}&task=save_new_property" method="post" name="regForm" class="form-horizontal" role="form">
	<div class="form-group">
		<label class="col-md-2 control-label" for="new_property_country">{HCOUNTRY}</label>
		<div class="col-md-10">
			{COUNTRIESDROPDOWN}
		</div>
	</div>
	<div class="form-group">
		<label class="col-md-2 control-label" for="region">{HREGION}</label>
		<div class="col-md-10">
			<div id="region_dropdown">{REGIONDROPDOWN}</div>
		</div>
	</div>
	
	<div class="form-group">
		<label class="col-md-2 control-label" for="propertyType">{HPROPERTY_TYPE}</label>
		<div class="col-md-10">
			{PROPERTY_TYPE_DROPDOWN}
		</div>
	</div>
	
	<div class="form-group has-warning">
		<label class="col-md-2 control-label" for="property_name">{HNAME}</label><div id="tour_target_registration_2_name_address"></div>
		<div class="col-md-10">
			<input id="property_name" name="property_name" type="text" value="{PROPERTY_NAME}" class="form-control" placeholder="{COMMON_PLACEHOLDER_PROPERTYNAME}"/>
		</div>
	</div>

	<div class="form-group has-warning">
		<label class="col-md-2 control-label" for="property_email">{HEMAIL}</label>
		<div class="col-md-10">
			<input id="property_email" name="property_email" type="email" value="{PROPERTY_EMAIL}" class="form-control" placeholder="{COMMON_PLACEHOLDER_EMAIL}"/>
		</div>
	</div>

	<div class="form-actions">
		<div class="col-md-10 col-md-offset-2">
			<button type="button" class="btn btn-primary" onclick="validatePropertyRegistration();"><i class="fa fa-arrow-right"></i> {COMMON_NEXT}</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="task" value="save_new_property"/>
	{CSRF_TOKEN}
</form>
</patTemplate:tmpl>