
<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">
	<fieldset>
		
		<div class="control-group">
			<label class="control-label" for="xyz">{HCOUNTRY}</label><div id="tour_target_registration_1_country"></div>

			<div class="controls">
				{COUNTRIESDROPDOWN}
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="region">{HREGION}</label>

			<div class="controls">
				<div id="region_dropdown">{REGIONDROPDOWN}</div>
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label" for="propertyType">{HPROPERTY_TYPE}</label><div id="tour_target_registration_1_property_type"></div>
			<div class="controls">
				{PROPERTY_TYPE_DROPDOWN}
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label" for="property_name">{HNAME}</label>
			<div class="controls">
				<input id="property_name" name="property_name" type="text" value="{PROPERTY_NAME}" class="form-control" placeholder="{COMMON_PLACEHOLDER_PROPERTYNAME}"/>
			</div>
		</div>

		<div class="control-group">
			<label class="control-label" for="property_email">{HEMAIL}</label>
			<div class="controls">
				<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="">
				<a href="{JOMRES_SITEPAGE_URL}" class="btn"><i class="icon-remove"></i> {COMMON_CANCEL}</a>
				<button type="button" class="btn btn-primary" onclick="validatePropertyRegistration();">{COMMON_NEXT} <i class="icon-arrow-right icon-white"></i></button>
			</div>
		</div>
		<input type="hidden" name="task" value="save_new_property"/>
	</fieldset>
	{CSRF_TOKEN}
</form>
</patTemplate:tmpl>