<style>
.bottom-h1 {
    background-color: #0b1e40;
    color: #fff;
    text-align: center;
    padding: 24px 15px;
    font-size: 18px;
    font-weight: 700;
    margin-left: -15px;
    margin-right: -15px;
    margin-top: -16px;
    overflow: hidden;
    width: calc(100% + 32px);
} .aqwreq {
    font-size: 23px;
}#signUpForm2 .form-control {
    background: #fff;
}#signUpForm2 select {
    height: 50px;
    padding-top: 0px;
    padding-bottom: 0px;
    text-indent: 7px;
    border-radius: 12px;
    padding-left: 37px;    border: 1px solid #ced4da;
    width: 100%;
    padding-right: 10px;
}#signUpForm2 label {
    display: inline-block;
    line-height: 1.5rem;
    font-weight: 500;
}
#signUpForm2 .item label{ font-weight:normal;}#signUpForm2 input{ padding-left:15px;}#signUpForm2 select{ padding-left:15px;}
html input.form-control1[type="checkbox"] ,html input.form-control1[type="radio"] {
    width: 20px !important;
    height: 20px!important;
    min-height: 20px;
}
.f-container {    background-color: #EDEEF3;
    padding: 80px 15px 80px 15px;padding-bottom:0px;}
    
 
 .bottom_leadContact {
    margin: 0 auto;
    max-width: 757px;
}
h3.aqwreq {
    font-weight: normal;
    margin-bottom: 40px;
    /* margin: 6rem auto 3rem; */
    text-align: center;
    font-size: 2.3rem;
    color: #000;
}#signUpForm2 .form-control {
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.2);
    border-radius: 0px;padding-left:0px;
    text-indent:0px;
}
.step1 .col-sm-6 {
    width: 50%;
    padding-left: 25px;
    padding-right: 25px;
}
.ui-datepicker .ui-datepicker-next, .ui-datepicker .ui-datepicker-prev {
    position: absolute;
    background: #fff;
}.ui-datepicker .ui-datepicker-next span, .ui-datepicker .ui-datepicker-prev span {
    background-image: url(https://code.jquery.com/ui/1.9.2/themes/base/images/ui-icons_222222_256x240.png);
  
}.errorMessage {
    color: var(--color-orange);
    font-weight: normal;
    font-style: italic;
    color: orange;
}#signUpForm2 #bb3 {
    background: #102448;
    color: #fff;
    font-weight: 900;
}h3.aqwreq { 
    text-transform: uppercase;
}
</style>
<?php $bg = !empty($contact_img) ? $contact_img[0] : ''; 

$step1 = 'Book Now';
?> 
<div id="cnt-btm-sect" style="position: relative;background: #fff;padding: 50px;z-index: 111;" class="mb-1 mt-5 ">

<div class="row  " id="contact-form">
<div class="container" >
    <div cla=" " class="p-3 f-container">
        
  
<script>
var success_message = '<?php echo trim($this->renderPartial('detail/success_message_popup',array(),true,false));?>';

 function closejs(){ $('.ja_close').click(); }
function 	reloadForm2() {
    var $ = jQuery.noConflict();
    $('#signUpForm2').find('#ProjectEnquiry_name').val('');
     $('#signUpForm2').find('#ProjectEnquiry_email').val('');
    onRecaptchaLoadCallback2();
}
                    function  ajaxSubmitHappen31New(form, data, hasError,saveUrl)
{
    var $ = jQuery.noConflict();
    if(!hasError)
{

                                 $.ajax({

                                    "type":"POST",
                                    "url":saveUrl,
                                    "data":form.serialize(),
                                    "success":function(data){
										var data = JSON.parse(data);
										if(data.status=='1'){
										         
												form.find("#bb3").html("Book Now");
												var msg_new = success_message;
												if(data.name != undefined){
												    successAlert('&nbsp; ',msg_new.replace("{name}", data.name)); 
												     
												}else{
												     successAlert('&nbsp; ',msg_new.replace("{name}", ''));
												      
												}
									 
												  
                                               $('#signUpForm2').find('#ProjectEnquiry_name').val('');
     $('#signUpForm2').find('#ProjectEnquiry_email').val('');
    onRecaptchaLoadCallback21();
											 
										}
										else{
											$("#msg_alert3").html(data.msg).show();
												form.find("#bb3").html("Book Now");
											setTimeout(function() {
										        $("#msg_alert3").hide()
											
											}, 3000);
										}
										 
                                     },

                                  });
     }
      else
    { 
       alert('error');
     }
 }
                    
                </script>
                  <h3 class="mb-2 mt-4 aqwreq">Register Your Interest</h3>
    
                 <?php
			
			
				$enquiry1 = new ProjectEnquiry();
				if(!empty($model)){ 
				$enquiry1->ad_id = $model->id ;
				}
				if(!empty($user_id)){ 
				 
				$enquiry1->user_id = $user_id ;
				}
				$form = $this->beginWidget('CActiveForm', array(
				    'id' =>'signUpForm2',
				'action'=>Yii::app()->createUrl($this->id.'/validateprojectenquiry'),
				'enableAjaxValidation'=>true,
				'clientOptions'=>array(
				'validateOnSubmit'=>true,
				'validateOnChange'=>false,
				'beforeValidate' => 'js:function(form) {

								form.find("#bb3,#bb4").html("'. 'Validating...' .'");
								return true;
								}',
				'afterValidate' => 'js:function(form, data, hasError) { 
				if(hasError) {
				form.find("#bb3").html("'. 'Book Now'  .'");
				 
				return false;
				}
				else
				{
				 
			 
				form.find("#bb3").html("'. 'please wait..' .'");
				ajaxSubmitHappen31New(form, data, hasError,"'.Yii::app()->createUrl($this->id.'/sendprojectenquiry').'"); 
				}
				}',
				),
				'htmlOptions'=>array('class'=>'form bottom_leadContact leadContact phs','style'=>'margin-top: 5px;' ),
				));
				?>
				<div class="step1"  id="step11">

 
 
   
   <div class="row">
       
       <div class="col-sm-6">
 	<div class="form-group">
 	       
						<?php echo $form->textField($enquiry1, 'name',$enquiry1->getHtmlOptions('name',array('class'=>'form-control ','placehoder'=>'Full Name *'))); ?>
			  <?php echo $form->hiddenField($enquiry1, 'ad_id'); ?>
						<?php echo $form->error($enquiry1, 'name');?>
						
						</div>		
			 
     	</div>
     	<div class="col-sm-6">
						<div class="form-group">
						   
						<?php echo $form->textField($enquiry1, 'email',$enquiry1->getHtmlOptions('email',array('class'=>'form-control ','placehoder'=>'Email Address *'))); ?>
				 
						<?php echo $form->error($enquiry1, 'email');?>
						</div>
	 	</div>
	</div>
	 <div class="row">
		<div class="col-sm-6">
      <div class="form-group"> 
					<?php echo $form->textField($enquiry1, 'phone_false',$enquiry1->getHtmlOptions('phone_false',array( 'oninput'=>"this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');"))); ?>
					 
					 <?php echo $form->error($enquiry1, 'phone_false');?>
				</div>
			</div>
				<div class="col-sm-6">
						<div class="form-group"> 
				 	<?php
										echo  $this->widget('zii.widgets.jui.CJuiDatePicker',array(
										'model' => $enquiry1,
										'attribute' => 'visit',
										'cssFile'   => null,
										'options'   => array(
										'showAnim'   => 'fold',
										'dateFormat' =>  'dd-mm-yy',
										),
										'htmlOptions'=>array('class' => 'form-control filterInput','placeholder'=>'Visit Date' ,'autocomplete'=>'off', 'style'=>'width:100%;'),
										), true) 
										;?> 
				 	   <?php echo $form->error($enquiry1, 'visit');?>
						</div>
		</div>		
				
	 
		 	<div class="clear clearfix"></div>
		 	
		  
		 	
		 	<div class="col-sm-12">
		 	    <div style="width:350px;max-width:90%;margin:auto;">
		 	        
		 	        
		
			
       <div class="" style="margin-top:20px;"><div class=""><button class="sc-19jf86-16 bSLYHQ submit" id="bb3" type="submit"  style="line-height:1;cursor:pointer" data-text="<?php echo $step1 ;?>" ><?php echo $step1 ;?></button></div></div>     <p class="text-center mt-3">
    	    </div>
    </div>
    </div>
    </div>
 	 	        
		 		  <div id="msg_alert3"></div>
		  <div class="clearfix"></div><div id="inline-badge2"></div>
		    	<div class="pop_boxone">
		    	    
						<?php
						$min_error_count  = 1 ; 
					  
									$min_error_count  = 2 ; 
									?> 
									<div class="f ">
									 
									<script src="https://www.google.com/recaptcha/api.js?render=explicit&onload=onRecaptchaLoadCallback2"1></script>
									<div class="clearfix"></div>
									
								 
					
					<script>
    function onRecaptchaLoadCallback21() { 
         var $ = jQuery.noConflict();
        var clientId = grecaptcha.render('inline-badge2', {
            'sitekey': '<?php echo Yii::app()->options->get('system.common.recaptcha_site_key','6LeJ_cwUAAAAACKW5kuLAV7SLdIZ9l5R4tTjQ1E7');?>',
            'badge': 'bottomleft',
            'size': 'invisible'
        });

        grecaptcha.ready(function() {
            var $ = jQuery.noConflict();
            grecaptcha.execute(clientId, {
                    action: 'action_name'
                })
                .then(function(token) {
                    $('#signUpForm2').prepend('<input type="hidden" name="g-recaptcha-response" value="' + token + '">');
                    // Verify the token on the server.
                });
        });
    }
</script>			   
									<div class="clearfix"></div>
									<?php 
								 
									echo $form->hiddenField($enquiry1, '_recaptcha'); ?>
									<?php echo $form->error($enquiry1, '_recaptcha',array('style'=>'top:0px !important;'));?>
									
									<div class="clearfix"></div>
					            	</div>
					  
						<div class="clear_div"></div>
						</div>
                <style>
                 .b-name {
    font-weight: 600;
}
       .contact-bar {
    border-bottom: 0px !important;
    display: flex;
    border: 1px solid #e9e6e3;
    padding: 4px 10px;
    margin: 50px auto 0px;
    border-radius: 25px;
    max-width: 600px;
    background: #fff;
    align-items: center;
    position: relative;
    bottom: -1px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
}
                    .whatsap-quick a ,.call-quick a {      font-size: 14px;display:flex;flex-direction:column;flex-direction: column;
    align-items: center;}
                     .contact-bar img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 50%;border:1px solid #eee;
}.whatsap-quick, .call-quick {
    max-width: 100px;    width: 100px;
    flex: 1;
} .call-quick a i,.whatsap-quick a i{  font-size: 30px;
    margin-bottom: 5px;}
    .whatsap-quick a i{
    color: #2db742;
   
}.whatsap-quick::before {
    content: '';
    border: 1px solid #eee;
    height: 89%;
    position: absolute;
    display: inline-block;
    width: 1px;
    right: 0;
    top: 5%;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.whatsap-quick::before{ content:'';width:1px solid #eee;}
.contact-bar li { flex:1; position:relative;}
.whatsap-quick:hover i ,.call-quick:hover i{
    animation: icnHeartBeatAnim2 0.5s ease-in-out;
    animation-iteration-count: 1;
    animation-iteration-count: 1;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
}
                </style>
		 	    <ul class="contact-bar">
		 	        <li class="" style="    display: flex;    align-items: center;">
		 	            <img src="<?php echo !empty($model->agent_logo) ? $this->app->apps->getBaseUrl('uploads/ads/'.$model->agent_logo) :  $this->app->apps->getBaseUrl('assets/img/user.png');?>" /> <span class="b-name"><?php echo $model->agent_name;?></span>
		 	        </li>
		 	         <li class="whatsap-quick">
		 	             
		 	            
		 	            <a target="_blank"  href="<?php echo  Yii::t('app','https://wa.me/{number}?text={text}',array('{number}'=>Yii::t('app',$model->mobile_number,array('+'=>'',' '=>'')) ,'{text}'=> 'I would like to inquire about your project   - '.$model->ReferenceNumberTitle.'. Please contact me at your earliest convenience. %0aProperty Link %0a' . ' ' .   urlencode($model->detailUrlAbsolute) ));	?>"><i class="bi bi-whatsapp"></i><span>WhatsApp</span></a>
		 	        </li>
		 	        <li class="call-quick">
		 	            <a  target="_blank" href="tel:<?php echo Yii::t('app',$model->mobile_number,array(' '=>''));?>"><i class="bi bi-telephone-outbound"></i><span>Call</span></a>
		 	        </li>
		 	    </ul>
		 	    
		 	</div>
		 	
		 	</div>	  

      
		    <?php $this->endWidget();?>
		    
		    
		    	<script>
    var input = document.querySelector("#<?php echo $enquiry1->modelName;?>_phone_false");
    window.intlTelInput(input, {
       
        hiddenInput: "phone",
       initialCountry: "ae",
      // localizedCountries: { 'de': 'Deutschland' },
      // nationalMode: false,
      // onlyCountries: ['us', 'gb', 'ch', 'ca', 'do'],
       placeholderNumberType: "MOBILE",
      // preferredCountries: ['cn', 'jp'],
        separateDialCode: true,
      utilsScript: "<?php echo Yii::app()->apps->getBaseUrl('assets/js/build/js/utils.js');?>",
    });
  </script>
  </div>
</div> 
 
</div>
</div>
