<div class="clearfix"><!-- --></div>
								
							<style>
							  html[dir="ltr"] .form-check .form-check-label, html[dir="ltr"]  .form-radio .form-check-label{ 
		       padding-left: 21px;
    padding-right: 0px;
		   }
		   <?php
		   if(Yii::app()->isAppName('backend')){ ?> 
		   #abc_d_logo .col-sm-12{padding:0px !important;}
		   
		   .no-padding-left{ padding-left:15px !important;}
		   .select2-container {  width: 100% !important; }
		   .content_place_an_ad  h3 { margin-right: 15px; }
		   <?php } ?> 
							</style>	 
  
									<div class="form-group col-lg-12 no-padding-left">
									<div class="form-group col-lg-12">
									<?php echo $form->labelEx($model, 'ad_title');?> 
									<?php echo $form->textField($model, 'ad_title', $model->getHtmlOptions('ad_title')); ?>
									<?php echo $form->error($model, 'ad_title');?>
									</div>      
									  	<div class="">
									<div class="form-group col-lg-12">
									<?php echo $form->labelEx($model, 'ad_title_ar');?>
									<?php echo $form->textField($model, 'ad_title_ar', $model->getHtmlOptions('ad_title_ar',array('dir'=>'rtl'))); ?>
									<?php echo $form->error($model, 'ad_title_ar');?>
									</div>      
									 <div class="clearfix"><!-- --></div> 
									  <?php $this->renderPartial('root.apps.frontend.views.place_an_ad._image_upload',compact('form'));
									  
									  if(Yii::App()->isAppName('backend') and $model->isNewRecord and !Yii::app()->request->isPostRequest){
										  $model->mobile_number = Yii::App()->options->get('system.common.default_property_no','971501737273'); 
										  $model->user_id       = 115; 
										  
									  }
									  
									  ?> 
	
									 <div class="clearfix"><!-- --></div> 
									  <div class="clearfix"></div> 
									 <div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'mobile_number');?>
										<?php echo $form->textField($model, 'mobile_number', $model->getHtmlOptions('mobile_number')); ?>
										<?php echo $form->error($model, 'mobile_number');?>
										</div> 
										<div class="clearfix"><!-- --></div> 
										<div class="form-group col-lg-<?php echo  $model->section_id==$model::RENT_ID ? '4':'4';?>">
										<?php echo $form->labelEx($model, 'price');?>
											 
 
									 
										<label class="pull-right">[<?php echo $model->currencyTitle;?>]</label>
										<div class="clearfix"><!-- --></div> 
										<?php echo $form->textField($model, 'price', $model->getHtmlOptions('price')); ?>
										<?php echo $form->error($model, 'price');?>
										</div>
										 <?php
										if($model->section_id==$model::RENT_ID){
										 ?>
										<div class="col-lg-4">
										<?php echo $form->labelEx($model, 'rent_paid');?>
										<?php echo $form->dropDownList($model, 'rent_paid', array("monthly"=>"Monthly","yearly"=>"Yearly")   , $model->getHtmlOptions('rent_paid',array('class'=>'form-control selectt2')) ); ?>
										<?php echo $form->error($model, 'rent_paid');?>
										</div>
										 <? }  ?>
								 
									<div class="col-lg-4 ask-price">
										<style>
									 
										.ask-price .mlist{
									display: inline-flex;
									/* align-items: center; */
									margin: 0px 17px;
									color: #333;align-items:center;justify-contetn:center; 
									font-weight: 400; padding:0px 10px ;border-radius:4px;
									border:1px solid #ccc; line-height:32px;background-color:#fafafa;
									 }
										</style>
										<label style="display:block;">&nbsp;</label>
									<label class="mlist" for="<?php echo $model->modelName;?>_p_o_r" style=""><?php echo $form->checkbox($model, 'p_o_r', $model->getHtmlOptions('p_o_r',array('style'=>'width:auto;height:auto;margin:0;'))); ?>&nbsp;<span><?php echo $this->tag->getTag('ask_for_price','Ask for Price');?></span></label>

									</div>
									<div class="clearfix"><!-- --></div> 
									 <div class="clearfix"><!-- --></div> 
									 	<?php
								    if($model->checkFieldsShow('expiry_date')){ ?> 
									<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'expiry_date');?>

										<?php
										echo  $this->widget('zii.widgets.jui.CJuiDatePicker',array(
										'model' => $model,
										'attribute' => 'expiry_date',
										'cssFile'   => null,
										'options'   => array(
										'showAnim'   => 'fold',
										'dateFormat' =>  'dd-mm-yy',
										),
										'htmlOptions'=>array('class' => 'form-control filterInput','placeholder'=>'From Date','id'=>'from_date','autocomplete'=>'off', 'style'=>'width:100%;'),
										), true) 
										;?> 
										 <?php echo $form->error($model, 'expiry_date');?>
									</div>        
									<?php } ?> 
									 <div class="clearfix"><!-- --></div> 
									 <?php
									 if(Yii::app()->isAppName('frontend')){
									   ?>
									   <style>.cke_button__image { display:none !important;}</style>
									   <?php
									 }
									 ?>
									<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'ad_description');?> 
										<?php echo $form->textArea($model, 'ad_description', array_replace($model->getHtmlOptions('ad_description'),array("rows"=>"10"))); ?>
										<?php echo $form->error($model, 'ad_description');?>
									</div>
									<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'ad_description_ar');?> 
										<?php echo $form->textArea($model, 'ad_description_ar', array_replace($model->getHtmlOptions('ad_description_ar'),array("rows"=>"10","dir"=>"rtl"))); ?>
										<?php echo $form->error($model, 'ad_description_ar');?>
									</div>  
									<?php 
										if($model->section_id=='3'){ ?> 
											<div class="form-group col-lg-12"> 
										<?php echo $form->labelEx($model, 'construction_status');?>
										<?php echo $form->dropDownList($model, 'construction_status',$model->constructionArray(), $model->getHtmlOptions('construction_status',array('class'=>'form-control selectt2'))); ?>
										<?php echo $form->error($model, 'construction_status');?>
										</div> 	
											 <div class="clearfix"><!-- --></div>
									 <div class="form-group col-lg-12">
									    <?php echo $form->labelEx($model, 'c1');?>
										<?php echo $form->dropDownList($model, 'c1',Chtml::listData(CompleteionYear::model()->listData(),'master_id','name'),$model->getHtmlOptions('c1',array('empty'=>'Please Select'))); ?>
								 
										<?php echo $form->error($model, 'c1');?>
										
									</div>   
									<?php } ?>
										
									<?php
									if($model->section_id=='3'){
										?>
											<div class="form-group col-lg-12 hide">
										<?php echo $form->labelEx($model, 'offering');?>
										<?php echo $form->textArea($model, 'offering', array_replace($model->getHtmlOptions('offering'),array("rows"=>"10"))); ?>
										<?php echo $form->error($model, 'offering');?>
									</div>
										<?
									}
										
									if($model->checkFieldsShow('builtup_area')){ ?> 
									<div class="clearfix"><!-- --></div> 
									<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'builtup_area');?><span class="pull-right">Square Feet</span>
										<div class="clearfix"></div>
										<?php echo $form->textField($model, 'builtup_area', $model->getHtmlOptions('builtup_area')); ?>
										<?php echo $form->error($model, 'builtup_area');?>
									</div> 
									<?php } ?> 
								   <?php
								   if($model->checkFieldsShow('plot_area')){ ?>  
								   <div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'plot_area');?>
										<?php echo $form->textField($model, 'plot_area', $model->getHtmlOptions('plot_area')); ?>
										<?php echo $form->error($model, 'plot_area');?>
									</div>       
									<?php } ?> 
								 <div class="clearfix"><!-- --></div> 
									 <?php
								    if($model->checkFieldsShow('bathrooms')){ ?>
									<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'bathrooms');?>
										<?php $mer =  array_merge($model->getHtmlOptions('bathrooms'),array('empty'=>$this->tag->gettag('select_bathrooms',"Select bathrooms"),'class'=>'form-control selectt2')); ?>
										<?php echo $form->dropDownList($model, 'bathrooms',  $model->bathrooms() , $mer ); ?>
										<?php echo $form->error($model, 'bathrooms');?>
									</div>  
									<?php } ?>
									<?php
								    if($model->checkFieldsShow('bedrooms')){ ?> 
									<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'bedrooms');?>
										<?php $mer =  array_merge($model->getHtmlOptions('bedrooms'),array('empty'=>$this->tag->gettag('select_bedrooms',"Select bedrooms"),'class'=>'form-control selectt2')); ?>
										<?php echo $form->dropDownList($model, 'bedrooms',  $model->bedrooms() , $mer ); ?>
										<?php echo $form->error($model, 'bedrooms');?>
									</div> 
									<?php } ?>
															<?php
									if($model->listing_type=='118' &&  $model->section_id=='2'){
									    ?>
									    	<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'p_allowed');?>
										<?php $mer =  array_merge($model->getHtmlOptions('p_allowed'),array('empty'=>$this->tag->gettag('p_allowed',"Please Select"),'class'=>'form-control selectt2')); ?>
										<?php echo $form->dropDownList($model, 'p_allowed', array('1'=>'Yes','2'=>'No') , $mer ); ?>
										<?php echo $form->error($model, 'p_allowed');?>
									</div> 
									    <?php
									} 
								    if($model->checkFieldsShow('car_parking')){ ?> 
									<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'car_parking');?>
										<?php $mer =  array_merge($model->getHtmlOptions('car_parking'),array('empty'=>$this->tag->gettag('select_parkings',"Select parkings"),'class'=>'form-control selectt2')); ?>
										<?php echo $form->dropDownList($model, 'car_parking',  $model->parking() , $mer ); ?>
										<?php echo $form->error($model, 'car_parking');?>
									</div> 
									<?php } ?>
																											<?php
								    if($model->checkFieldsShow('kitchen')){ ?> 
									<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'kitchen');?>
										<?php $mer =  array_merge($model->getHtmlOptions('kitchen'),array('empty'=>$this->tag->gettag('select_kitchens',"Select kitchens"),'class'=>'form-control selectt2')); ?>
										<?php echo $form->dropDownList($model, 'kitchen',  $model->kitchen() , $mer ); ?>
										<?php echo $form->error($model, 'kitchen');?>
									</div> 
									<?php } ?>
																		<?php
								    if($model->checkFieldsShow('pantry')){ ?> 
									<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'pantry');?>
										<?php $mer =  array_merge($model->getHtmlOptions('pantry'),array('empty'=>$this->tag->gettag('select_pantry',"Select pantry"),'class'=>'form-control selectt2')); ?>
										<?php echo $form->dropDownList($model, 'pantry',  $model->pantry() , $mer ); ?>
										<?php echo $form->error($model, 'pantry');?>
									</div> 
									<?php } ?>
										<?php
								    if($model->checkFieldsShow('no_of_units')){ ?> 
									<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'no_of_units');?>
										<?php echo $form->textField($model, 'no_of_units', array_replace($model->getHtmlOptions('no_of_units'))); ?>
										<?php echo $form->error($model, 'no_of_units');?>
									</div>     
									
									<?php } ?>
											<?php
								    if($model->checkFieldsShow('no_of_stories')){ ?> 
									<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'no_of_stories');?>
										<?php echo $form->textField($model, 'no_of_stories', array_replace($model->getHtmlOptions('no_of_stories'))); ?>
										<?php echo $form->error($model, 'no_of_stories');?>
									</div>     
									
									<?php } ?>
										<?php
								    if($model->checkFieldsShow('mandate') or $model->section_id=='3'){ ?> 
								    <?php
									if($model->section_id=='3'){
									    ?>			<div class="clearfix"></div>
									    	<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'no_of_units');?>
										<?php echo $form->textField($model, 'no_of_units', array_replace($model->getHtmlOptions('no_of_units'))); ?>
										<?php echo $form->error($model, 'no_of_units');?>
									</div>  
									<div class="clearfix"></div>
								    	<h3 class="subheading_font">Team behind</h3></div>
								        <?php } ?> 
									<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'developer_id');?>
										<?php echo $form->dropDownList($model, 'developer_id',CHtml::listData(Developers::model()->listData(),'developer_id','developer_name'),  $model->getHtmlOptions('developer_id',array('empty'=>$this->tag->gettag('select_developer','Select Developer'),'class'=>'form-control selectt2'))); ?>
										<?php echo $form->error($model, 'developer_id');?>
									</div>     
									<?php
									if($model->section_id=='3'){
									    ?>
									    
									    <div   id="manual_entry">
	 
		<?php 
										$fileField = 'd_logo';
										$title_text = 'Upload Logo';
										$types = '.png,.jpg,.jpeg';
										$maxFiles = '1';
										$maxFilesize = '1';
										$this->renderPartial('root.apps.frontend.theme-2022.views.detail._file_field_browse_developer',compact('form','fileField','maxFilesize','types','maxFiles','model','title_text'));
										
		  
		 
		 ?>
		 <div class="">
		<div class="form-group col-lg-12">
		<span class="strLabel"><label for="<?php echo $model->modelName;?>_d_name" class="required"><?php echo $model->getAttributeLabel('d_name');?></label></span>
		<?php echo $form->textField($model, 'd_name', $model->getHtmlOptions('d_name',array('placeholder'=>$model->getAttributeLabel('d_name')))); ?>
 
		<?php echo $form->error($model, 'd_name');?>
		</div>      
		<div class="form-group col-lg-12">
										 <span class="strLabel"><label for="<?php echo $model->modelName;?>_d_description" class=""><?php echo $model->getAttributeLabel('d_description');?></label></span>
											<?php echo $form->textArea($model, 'd_description',  $model->getHtmlOptions('d_description',array('placeholder'=>$model->getAttributeLabel('d_description'),'rows'=>5)) ); ?>
								 
									
										<?php echo $form->error($model, 'd_description');?>
									</div>  
								
			<div class="form-group col-lg-6">
<span class="strLabel"><?php echo $form->labelEx($model, 'contractor');?></span>
<?php echo $form->textField($model, 'contractor', $model->getHtmlOptions('contractor',array('placeholder'=>$model->getAttributeLabel('contractor')))); ?>

<?php echo $form->error($model, 'contractor');?>
</div>      
<div class="form-group col-lg-6">
<span class="strLabel"><?php echo $form->labelEx($model, 'architect');?></span>
<?php echo $form->textField($model, 'architect', $model->getHtmlOptions('architect',array('placeholder'=>$model->getAttributeLabel('architect')))); ?>

<?php echo $form->error($model, 'architect');?>
</div>  

<div class="form-group col-lg-6">
<span class="strLabel"><?php echo $form->labelEx($model, 'l_architect');?></span>
<?php echo $form->textField($model, 'l_architect', $model->getHtmlOptions('l_architect',array('placeholder'=>$model->getAttributeLabel('l_architect')))); ?>

<?php echo $form->error($model, 'l_architect');?>
</div>  
</div>
		  <script>
		  function acttiveThisList(k){
			 if( $(k).is(':checked') ){
				 $('#NewDevelopment_d_type').val('L');
					$('#list_entry').removeClass('hide');
					$('#manual_entry').addClass('hide');
					$(k).prop('checked',false)
				  } 
		  }
		  function acttiveThisList2(k){
			 if( $(k).is(':checked') ){
				  $('#NewDevelopment_d_type').val('M');
					$('#manual_entry').removeClass('hide');
					$('#list_entry').addClass('hide');$(k).prop('checked',false);
				  } 
		  }
		  </script>
	
									<div class="clearfix"></div> 
							
								 
									</div>     
								
									    
									    
									    <?php
									    
									}
									?>
									
									
									
									
									<div class="form-group col-lg-12 hidden">
										<?php echo $form->labelEx($model, 'mandate');?>
										<?php echo $form->textField($model, 'mandate', array_replace($model->getHtmlOptions('mandate'))); ?>
										<?php echo $form->error($model, 'mandate');?>
									</div>     
									
									<?php } ?>
									 		<?php
								    if($model->checkFieldsShow('balconies')){ ?> 
									<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'balconies');?>
										<?php $mer =  array_merge($model->getHtmlOptions('balconies'),array( 'class'=>'form-control selectt2')); ?>
										<?php echo $form->dropDownList($model, 'balconies',  $model->balconiesArray() , $mer ); ?>
										<?php echo $form->error($model, 'balconies');?>
									</div> 
									<?php } ?>
									 <?php
								    if($model->checkFieldsShow('FloorNo')){ ?> 
									 	<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'FloorNo');?>
										<?php echo $form->dropDownList($model, 'FloorNo',$model->FloorNoArray(),$model->getHtmlOptions('FloorNo',array('class'=>'form-control selectt2'))); ?>
									    <?php echo $form->error($model, 'FloorNo');?>
									</div> 
								    <?php } ?> 
								    	 <?php
								    if($model->checkFieldsShow('total_floor')){ ?> 
									 	<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'total_floor');?>
										<?php echo $form->dropDownList($model, 'total_floor',$model->TotalFloorArray(),$model->getHtmlOptions('total_floor',array('class'=>'form-control selectt2'))); ?>
										<?php echo $form->error($model, 'total_floor');?>
									</div> 
								    <?php } ?>
								     <?php
								    if($model->checkFieldsShow('parking')){ ?> 
									<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'parking');?>
										<?php echo $form->dropDownList($model, 'parking',$model->parkingArray(),$model->getHtmlOptions('parking',array('class'=>'form-control selectt2'))); ?>
										<?php echo $form->error($model, 'parking');?>
									</div> 
									<?php } ?> 
									  
									<div class="clearfix"><!-- --></div>
									  <?php /*
									 <?php if(in_array("property_name",$fields)){?>
									<div class="form-group col-lg-6">
										<?php echo $form->labelEx($model, 'property_name');?>
										<?php echo $form->textField($model, 'property_name',$model->getHtmlOptions('property_name')); ?>
										<?php echo $form->error($model, 'property_name');?>
									</div> 
									 <?php }  ?>        
									 <?php if(in_array("PrimaryUnitView",$fields)){?>
									<div class="form-group col-lg-6">
										<?php echo $form->labelEx($model, 'PrimaryUnitView');?>
										<?php echo $form->textField($model, 'PrimaryUnitView',$model->getHtmlOptions('PrimaryUnitView')); ?>
										<?php echo $form->error($model, 'PrimaryUnitView');?>
									</div> 
									 <?php }  ?>        
							      */?>
								 
									  
											<div class="clearfix"></div> 
										<?php
										
										 
										if($model->checkFieldsShow('construction_status')){
											if($model->isNewRecord and empty($model->construction_status) and $model->section_id=='3'){
										        $model->construction_status = 'N';
									    	}
										
										?> 	
									
										<div class="form-group col-lg-12"> 
										<?php echo $form->labelEx($model, 'construction_status');?>
										<?php echo $form->dropDownList($model, 'construction_status',$model->constructionArray(), $model->getHtmlOptions('construction_status',array('empty'=>$this->tag->gettag('select','Select'),'class'=>'form-control selectt2'))); ?>
										<?php echo $form->error($model, 'construction_status');?>
										</div> 	
										<?php } ?> 
										
										
									 	
										<?php
										if($model->checkFieldsShow('transaction_type')){ 
											if($model->isNewRecord and empty($model->transaction_type) and $model->section_id=='3'){
										        $model->transaction_type = 'N';
									    	}
										
										?>
										<div class="form-group col-lg-6">
										<?php echo $form->labelEx($model, 'transaction_type');?>
										<?php echo $form->dropDownList($model, 'transaction_type',$model->TransactionType(), $model->getHtmlOptions('transaction_type',array('empty'=>'Select','class'=>'form-control selectt2'))); ?>
										<?php echo $form->error($model, 'transaction_type');?>
										</div> 	
										<?php } ?>
											 	<?php
										if($model->checkFieldsShow('year_built')){ ?> 
									 <div class="form-group col-lg-6">
										<?php echo $form->labelEx($model, 'year_built');?>
										<?php $mer =  array_merge($model->getHtmlOptions('year_built'),array('empty'=>$this->tag->gettag('select_year',"Select Year"),'class'=>'form-control selectt2')); ?>
										<?php echo $form->dropDownList($model, 'year_built',  $model->year() , $mer ); ?>
										<?php echo $form->error($model, 'year_built');?>
									</div>  
									<?php } ?> 
										<?php
										if($model->checkFieldsShow('rera_no')){ ?> 
										<div class="form-group col-lg-6 hide">
										<?php echo $form->labelEx($model, 'rera_no');?>
										<?php echo $form->textField($model, 'rera_no',$model->getHtmlOptions('rera_no')); ?>
										<small>(Required for Dubai UAE Listings Only)</small>
										<div class="clearfix"></div> 	
										<?php echo $form->error($model, 'rera_no');?>
										</div> 
										<?php } ?> 
										<div class="clearfix"></div> 		
										<?php
										if(Yii::app()->isAppName('frontend')){ $pad_left = ''; }else{  $pad_left ='padding-left:0px;'; }
										if($model->checkFieldsShow('furnished')){ ?> 
										 <div class="col-lg-6">
									<?php echo $form->labelEx($model, 'furnished');?>
									<div class="form-group">
									<?php
									$user_type_array = $model->YesNoArray2();
									foreach( $user_type_array as $k=>$v){
									$checked =  $k==$model->furnished ? true :false ; 
									echo '<div class="form-radio " style="width:56px;float:left;margin:0px;"><label class="form-check-label" style="'.$pad_left.';" >'.$form->radioButton($model, 'furnished',$model->getHtmlOptions('furnished',array('class'=>'form-check-input', 'uncheckValue'=>null,'value'=>$k,'checked'=>$checked,'style'=>''))).'&nbsp;'.$v.'&nbsp;&nbsp;<i class="input-helper"></i></label></div>';
									}
									?>

									</div>
									
									<div class="clearfix"></div> 
									<?php echo $form->error($model, 'furnished');?>
									 </div>
									 <?php } ?> 
									 	<?php
										if($model->checkFieldsShow('maid_room')){ ?> 
								 <div class="col-lg-6">
									<?php echo $form->labelEx($model, 'maid_room');?>
									<div class="form-group">
									<?php
									$user_type_array = $model->YesNoArray2();
									foreach( $user_type_array as $k=>$v){
									$checked =  $k==$model->maid_room ? true :false ; 
									echo '<div class="form-radio " style="width:56px;float:left;margin:0px;"><label class="form-check-label"  style="'.$pad_left.';">'.$form->radioButton($model, 'maid_room',$model->getHtmlOptions('furnished',array('class'=>'form-check-input', 'uncheckValue'=>null,'value'=>$k,'checked'=>$checked,'style'=>''))).'&nbsp;'.$v.'&nbsp;&nbsp;<i class="input-helper"></i></label></div>';
									}
									?>

									</div>
									<div class="clearfix"></div> 
									<?php echo $form->error($model, 'maid_room');?>
									 </div>	
									 <?php } ?> 
									 
									  <div class="clearfix"></div> 
						 
                       
									  		        
										       <div class="clearfix"><!-- --></div>
									            <?php
								    if($model->checkFieldsShow('PrimaryUnitView')){ ?> 
									        	<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'PrimaryUnitView');?>
										<?php echo $form->textField($model, 'PrimaryUnitView',$model->getHtmlOptions('PrimaryUnitView',array('placeholder'=>'e.g. Full sea view, Marina View, etc...'))); ?>
										<?php echo $form->error($model, 'PrimaryUnitView');?>
										
									</div>  
									<?php } ?> 
									  <?php /* 
										<div class="clearfix"></div> 
										<div class="form-group col-lg-6">
										<?php echo $form->labelEx($model, 'community_id');?>
										<?php echo $form->dropDownList($model, 'community_id', CHtml::listData( Community::model()->findAllByAttributes(array('community_id'=>$model->community_id)) ,'community_id','community_name')    , $model->getHtmlOptions('community_id' ,array('empty'=>"Select Communtiy", "onChange"=>"getSubCommunity(this)",'class'=>'autoSelect_community form-control') )); ?>
										<?php echo $form->error($model, 'community_id');?>
										</div> 
										<div class="form-group col-lg-6">		
										<?php echo $form->labelEx($model, 'sub_community_id');?>
										
										<?php echo $form->dropDownList($model, 'sub_community_id',  CHtml::listData( SubCommunity::model()->findAllByAttributes(array('sub_community_id'=>$model->sub_community_id)) ,'sub_community_id','sub_community_name')   ,$model->getHtmlOptions('sub_community_id',array('empty'=>"Select SubCommunity" , 'class'=>'autoSelect_sub_community form-control' ) )); ?>
										<?php echo $form->error($model, 'sub_community_id');?>
										</div>	
										* */
										?>
										 
										<div class="clearfix"></div> 
														        
</div>
<style>div.property_img_box div.property_img {
    width: 100px !important;}</style>
 
	 <?php
	 if($model->checkFieldsShow('floor_plan') or $model->section_id == '3'){ ?>
	 <div class="clearfix"></div>
	 <h3 class=" "><?php echo $this->tag->getTag('floor_plan','Floor Plan');?></h3>
		<?php $this->renderPartial('root.apps.frontend.views.place_an_ad._floor_upload',compact('form'));?>
		<div style="margin-top:10px"></div>
	 <?php 
	     
	            
								$fileField = 'floor_pdf';
								$title_text = 'Upload PDF';
								$types = '.pdf';
								$maxFiles = '1';
								$maxFilesize = '100';
								$this->renderPartial('root.apps.frontend.views.place_an_ad._file_field_browse_single',compact('form','fileField','maxFilesize','types','maxFiles','model','title_text'));
									 
	     
	 } 
	 if($model->section_id == '3'){
		 ?>
		 <style>
		.content_place_an_ad  h3 {
    background: rgba(0,0,0,0.6);
    padding: 7px 15px;
    font-size: 16px;
    color: #fff;
}
				.tabler {
				margin-top:  0px;
				margin-bottom: 10px;
				border-collapse: collapse;
				border-spacing: 0;
				width: 100%;
				}

				.tabler,
				.tabler th,

				.tabler td {
				border: none;
				text-align: center;
				padding: 8px;font-size: 13px;
				}.tabler td { border:1px solid #eee; } 
				.tabler td b{ font-size:16px; color: #0074E4; }
				.tabler th{ font-size: 18px; }
				.tabler tbody tr:nth-child(even) {
				background-color: #f2f2f2
				}
		 </style>
		 <div style="margin-top:10px"></div>
		 	 <h3>Payment Plan</h3>
		 <?
		 $this->renderPartial('root.apps.frontend.views.place_an_ad._payment_plan',compact('form'));
		  echo'<table style="width:100%" >';
		   $list =  unserialize($model->payment_plan);
			$html ='';
		  if(!empty($model->payment_plan) and is_array($list)){
			  
			  
			 foreach( $list as $m=>$n){
		 
					$html.= '<tr id="row_'.$m.'"><td colspan="100%" class="eac_row">
									<table class="" style="width:100%;">
									<tr><td colspan="100%"><table class="tabler" ><tr><th colspan="100%"  style="background-color:#4CAF50;color:white;">'.$n['title'].' <a href="javascript:void(0)" onclick="removeThisRowTable(this)" class="pull-right" style="color:white;">Remove</a> <a href="javascript:void(0)" data-id="row_'.$m.'"  onclick="editThisRowTable(this)" class="pull-right" style="color:white;margin-right:5px;">Edit</a></td></tr>';
									$html.='<tr class="fetures">'; 
									$html.='<input type="hidden" id="f_plan_title" name="PlaceAnAd[payment_plan]['.$m.'][title]" value="'.$n['title'].'"> ';
									$html.='<input type="hidden" id="f_plan_title_ar"  name="PlaceAnAd[payment_plan]['.$m.'][title_ar]" dir="rtl" value="'.@$n['title_ar'].'"> ';
												foreach($n['percentage'] as $m2=>$n2){
												$html.='<td><b>'.$n2.'</b><br />'.$n['description'][$m2];
												$html.=' <input type="hidden" name="PlaceAnAd[payment_plan]['.$m.'][percentage][]" id="per"  value="'.$n2.'"> ';
												$html.=' <input type="hidden" name="PlaceAnAd[payment_plan]['.$m.'][description][]" id="desc"  value="'.$n['description'][$m2].'"> ';
												$html.=' <input type="hidden" name="PlaceAnAd[payment_plan]['.$m.'][description_Ar][]" id="desca" value="'.@$n['description_Ar'][$m2].'"  dir="rtl"> ';
												$html.='</td>';
												}
									$html.='</tr></table></td></tr></table></tr>';
									};
									
				 
			 
			 echo  $html;
		  }
		  
		  echo '<tr id="paln_details" class="hide"><td></td></tr></table>';
		  ?>
		  <div style="margin-top:10px"></div>
		  <?php
		  		  	$fileField = 'payment_pdf';
										$title_text = 'Upload PDF';
										$types = '.pdf';
										$maxFiles = '1';
										$maxFilesize = '100';
										$this->renderPartial('root.apps.frontend.views.place_an_ad._file_field_browse_single',compact('form','fileField','maxFilesize','types','maxFiles','model','title_text'));
					
		  
		  ?>
		    <div>
	         <script language="javascript">
        function checkFileExtension(fileName) {
            fileName = fileName;
            extension = fileName.split('.').pop(); 
            return extension
        };
    </script>
	         
            <?php 
                    $this->renderPartial('root.apps.frontend.views.place_an_ad.add_property_types');
                    $fileField = 'types_pdf';
                    $title_text = 'Upload PDF';
                    $types = '.pdf';
                    $maxFiles = '1';
                    $maxFilesize = '100';
                    $this->renderPartial('root.apps.frontend.views.place_an_ad._file_field_browse_single',compact('form','fileField','maxFilesize','types','maxFiles','model','title_text'));

                    
            ?>
	         
	     </div>
		  
		  	  <h3 class="subheading_font">Upload Brochure </h3>
	  <div class="row form-group col-sm-12">
									   
	  <div class="  dev_inf    ">
		<?php 
										$fileField = 'broucher';
										$title_text = 'Upload Brochure';
										$types = '.pdf,.png,.jpg,.jpeg';
										$maxFiles = '1';
										$maxFilesize = '100';
										$this->renderPartial('root.apps.frontend.views.place_an_ad._file_field_browse_single',compact('form','fileField','maxFilesize','types','maxFiles','model','title_text'));
										
		  
		 
		 ?>
		 </div>
	
									</div>    
	 <div class="clearfix"><!-- --></div>
		  <div style="margin-top:10px"></div>
		  	  <h3 class="subheading_font">Youtube Video Link</h3>
		  			<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'youtube_url');?>
										<?php echo $form->textField($model, 'youtube_url',  $model->getHtmlOptions('youtube_url')); ?>
										<?php echo $form->error($model, 'youtube_url');?>
										</div> 	
										
											 <div class="clearfix"><!-- --></div>	
	 				
			 	<div class="col-md-12 col-sm-12">
			 	     
							 <?php  
						 
							 $fileField = 'faq';
							 $title_text = '<i class="fa fa-plus"></i> Add FAQ';
							 $types = '.png,.jpg,.jpeg';
							 $maxFiles = '1';
							 $maxFilesize = '1';
				 
							  $this->renderPartial('root.apps.frontend.views.place_an_ad._add_faq',compact('form','fileField','maxFilesize','types','maxFiles','model','title_text')); ?>
			                	
						</div>  
	 <div class="clearfix"><!-- --></div>
										
		  <?
				
		
	 }
	 
 
	  if($model->section_id != '3'){
	 ?>  

 <h3 class="subheading_font">Youtube Video Link</h3>
		  			<div class="form-group col-lg-12">
										<?php echo $form->labelEx($model, 'youtube_url');?>
										<?php echo $form->textField($model, 'youtube_url',  $model->getHtmlOptions('youtube_url')); ?>
										<?php echo $form->error($model, 'youtube_url');?>
										</div> 	
				
<?php } ?>
