| Server IP : 94.136.191.34 / Your IP : 216.73.216.25 Web Server : Apache System : Linux hostpanel.netbiz.in 5.15.0-130-generic #140-Ubuntu SMP Wed Dec 18 17:59:53 UTC 2024 x86_64 User : omkar.com_6nnuz6y629h ( 10087) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system,proc_open,popen MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/omkar.com/httpdocs/assets/js/ |
Upload File : |
$('.dsk-whatsapp-msg').hide();
/*Adding validator function*/
$.validator.addMethod("mobile", function (value, element) {
return this.optional(element) || value.match(/^[7-9][0-9]{9}$/);
}, "Please enter valid mobile number");
$.validator.addMethod("alphabets", function (value, element) {
return this.optional(element) || /^[a-zA-Z ]*$/.test(value);
}, "Please enter Alphabets only");
$.validator.addMethod("email", function (value, element) {
return this.optional(element) || /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(value);
}, "Please enter a valid email address.");
$.validator.addMethod("intlTelNumber", function(value, element) {
return this.optional(element) || $(element).intlTelInput("isValidNumber");
}, "Please enter a valid mobile number");
$.validator.addMethod("alpha_num", function (value, element) {
return this.optional(element) || /^[a-zA-Z 0-9]*$/.test(value);
}, "Please enter Alpha numuric only");
$.validator.addMethod("numuric", function (value, element) {
return this.optional(element) || /^[0-9 ]*$/.test(value);
}, "Please enter Alpha numuric only");
$.validator.addMethod("designation", function (value, element) {
return this.optional(element) || /^[a-zA-Z -.]*$/.test(value);
}, "Please enter Alphabets with - and . only");
$.validator.addMethod("chekmultiple", function (value, element) {
var $fields = $(this).find('input[name="area[]"]:checked');
if (!$fields.length) {
alert('You must check at least one box!');
return false; // The form will *not* submit
}else{
return true;
}
}, "Please enter Alphabets with - and . only");
/*Adding validator function*/
//remove start
/*$('#schedule_visit').validate({
rules: {
visitor_name: {
required: true,
alphabets: true,
maxlength: 100
},
visit_project_location: {
required: true
},
visit_select_project: {
required: true
},
datetimepicker2: {
required: true
},
datetimepicker1: {
required: true
},
visit_email_id: {
required: true,
email : true
},
visitor_mobile: {
required: true
//intlTelNumber: true
}
},
onkeyup: false,
errorPlacement: function(error, element) {},
submitHandler: function(form) {
$.ajax({
url: 'http://localhost/narang/home/schedule_visit',
type: 'POST',
data: {visitor_name:$('#visitor_name').val(),visit_project_location:$('#visit_project_location').val(),visit_select_project:$('#visit_select_project').val(),datetimepicker2:$('#datetimepicker2').val(),datetimepicker1:$('#datetimepicker1').val(),visit_email_id:$('#visit_email_id').val(),visitor_mobile:$('#visitor_mobile').val()},
success: function (response) {
alert(response);
$("#schedule_visit").css("display","none");
$("#schedule_visit p").html("");
$( "div p" ).replaceWith("Your enquiry has been successfully submitted!");
//$(".loader_bg").hide();
//window.location = "thank_you.html";
//location.reload();
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Some error occurred');
}
});
//$(form).find(':submit').prop('disabled', true);
//form.submit();
}
});
$('#partner_form').validate({
//$("#document_file").hide();
rules: {
partner_name: {
required: true,
alphabets: true,
maxlength: 100
},
identity: {
required: true
},
partner_email_id: {
required: true,
email : true
},
partner_mobile_no: {
required: true
},
partner_telephone: {
required: true
},
poperty_title: {
required: true
},
property_country: {
required: true
},
property_state: {
required: true
},
property_city: {
required: true
},
property_locality: {
required: true
},
fsi_potentials: {
required: true
},
fsi_potentials_measurement: {
required: true
},
size_of_property: {
required: true
},
size_of_property_measurement: {
required: true
},
nature_of_transaction: {
required: true
},
document_file:{
required: true,
accept: 'docx|doc|pdf|jpeg|jpg|png'
},
proposal: {
required: true
}
},
onkeyup: false,
errorPlacement: function(error, element) {},
submitHandler: function(form) {
$("#form_next").val('1');
var next_level = $("#form_next").val();
if(next_level==1){
$("#next").hide();
$(".hidden-field").show();
$("#submit_partner").show();
// $("#form_submit").val('1');
}
var next_page = $("#form_submit").val();
if(next_page == 1){
form.submit();
}
}
});
$("#submit_partner").click(function(){
$("#form_submit").val('1');
});*/
/*code added by Aparna for sending otp sms - starts here*/
function send_otp1(mob,client_name,form_id)
{
$.ajax({
type: "POST",
url: base_url+"home/send",
data:{mob1:mob,client_name1:client_name},
//cache: false,
async: false,
success: function (response) {
$("#form_id").val(form_id);
$('#match_otp').val(response);
$("#otp_wrp").addClass('show');
$("#user_mobile").val(mob);
},
failure: function (response) {
alert('Fail to send OTP');
}
});
}
function verify_otp1(user_otp)
{
var current_otp = $('#match_otp').val();
$.ajax({
type: "POST",
url: base_url+"home/match",
data:{otp1:user_otp,otp_hidden1:current_otp},
async: false,
success: function (response) {
if(response == 'match'){
var enquiry_id = $("#enquiry_id").val();
var tbl_project = $("#tbl_project").val();
$.ajax({
type: "POST",
url: base_url+'home/update_contact_otp',
data:{id:enquiry_id,tbl_project:tbl_project},
success: function (response) {
var form_id = $("#form_id").val();
if(form_id == '1')
{
window.location.href = base_url+'home/thank_you/contact-us/';
}
else if (form_id == '2'){
var redirect_path = $("#project_type_redirect").val();
window.location.href = base_url+'home/'+redirect_path;
}
else if (form_id == '3'){
//form.submit();
window.location.href = base_url+'home/thank_you/vendor';
}
else if (form_id == '4'){
var redirect_path = $("#project_type_redirect").val();
window.location.href = base_url+redirect_path;
}
else if (form_id == '5'){
window.location.href = base_url+'home/thank_you/channel-partner';
}
else if (form_id == '6'){
window.location.href = base_url+'home/thank_you/enquiry';
}
else if (form_id == '7'){
window.location.href = base_url+'home/thank_you/enquiry';
}
else if (form_id == '8'){
var file_name = $("#broucher_name").val();
window.location.href = base_url+'home/download_broucher_project/'+file_name;
}
else if (form_id == '9'){
form.submit();
}
else if (form_id == '10'){
window.location.href = base_url+'home/thank_you/whatsapp';
}
}
});
}
else
{
alert('OTP does not match');
}
},
failure: function (response) {
alert('Fail to send OTP');
}
});
}
$("#btnOtpsubmit").click(function(){
var user_otp = $("#filled_otp").val();
verify_otp1(user_otp);
});
$("#btnReset").click(function(){
var user_otp = $("#filled_otp").val();
var current_otp = $("#match_otp").val();
var mob1 = $("#user_mobile").val();
resend_otp1(user_otp,current_otp,mob1);
});
function resend_otp1(user_otp,current_otp,mob1)
{
$.ajax({
type: "POST",
url: base_url+"home/resend",
data:{resend_otp_hidden1:current_otp,mob1:mob1},
async: false,
success: function (response){
//do nothing
//$('#otp_wrp #btnOtpsubmit').attr('disabled','disabled');
},
failure: function (response) {
alert('Fail to send OTP');
}
});
}
/*code added by Aparna for sending otp sms - ends here*/
$('#propertyFinder').validate({
rules: {
category: {
required: true
},
loc: {
required: true
},
find: {
required: true
},
},
onkeyup: false,
errorPlacement: function(error, element) {},
submitHandler: function(form) {
window.location = $("#find").val();
}
});
$(document).on("click",".omkar-close",function(){
$('.home-roadblock').fadeOut(500);
$.ajax({
url: base_url+'/home/set_roadblock_cookie',
type: 'POST',
success: function (response) {
},
error: function (jqXHR, textStatus, errorThrown) {
}
});
});
var is_cookie_set = $('#road_block_value').val();
//alert(is_cookie_set);
if(!is_cookie_set){
setTimeout(function(){
$('.home-roadblock').fadeIn(800);
}, 6500);
}
/*setTimeout(function(){
$(function () {
$('.home-roadblock').firstVisitPopup({
cookieName : 'roadblock',
showAgainSelector: '#show-message'
});
});
}, 20000);*/
/*$('#contact_enquiry').validate({
rules: {
first_name: {
required: true,
alphabets: true,
minlength: 3,
maxlength: 100
},
last_name: {
required: true,
alphabets: true,
minlength: 3,
maxlength: 100
},
project_name: {
required: true
},
email: {
required: true,
email : true
},
phone: {
required: true,
intlTelNumber : true
}
},
onkeyup: false,
errorPlacement: function(error, element) {}
/*submitHandler: function(form) {
return true;
}*/
// });*/
$("#visitor_mobile").keyup(function () {
if ($("#visitor_mobile").val().length == 0) {
setTimeout(function () {
$("#visitor_mobile").val('+');
}, 200);
}
if ($("#visitor_mobile").val().indexOf('+') <= -1) {
$("#visitor_mobile").val('+' + $("#visitor_mobile").val());
}
});
/*$('#current_opening').validate({
//$("#document_file").hide();
rules: {
candidate_fname: {
required: true,
alphabets: true,
maxlength: 100
},
candidate_lname: {
required: true,
alphabets: true,
maxlength: 100
},
candidate_gender: {
required: true
},
candidate_email: {
required: true,
email : true
},
candidate_mobile: {
required: true,
mobile : true
},
candidate_phone: {
required: true
},
candidate_area_interest: {
required: true
},
candidate_address: {
required: true
},
candidate_resume: {
required: true,
accept: 'docx|doc'
}
},
onkeyup: false,
errorPlacement: function(error, element) {},
submitHandler: function(form) {
form.submit();
}
});*/
$('#contact_us').validate({
rules: {
name: {
required: true,
alphabets: true,
minlength: 3,
maxlength: 100
},
email_id: {
required: true,
email : true
},
phone: {
required: true,
intlTelNumber : true
},
location: {
required: true
}/*,
comments: {
required: true
}*/
},
onkeyup: false,
errorPlacement: function(error, element) {},
submitHandler: function(form, event) {
event.preventDefault();
$(".sub-btn").attr('disabled','disabled');
$('body').addClass('showloader');
var phone = $("#contact_no").val();
$.ajax({
url: base_url+'/home/contact_enquiry',
type: 'POST',
data: {name:$('#name').val(),email_id:$('#email_id').val(),phone:$('#contact_no').val(),location:$('#location').val(),comments:$('#comments').val()},
beforeSend: function() {
$(".loader").show();
},
success: function (response) {
$("#enquiry_id").val(response);
$("#tbl_project").val("contact_enquiries");
send_otp1(phone,'Omkar','1');
},
error: function (jqXHR, textStatus, errorThrown) {
$("#message_for_applicant").html("Some error occured");
$("#message_for_applicant").addClass("error_msg");
},
complete: function() {
$(".loader").hide();
}
});
}
});
//added resi_comm_upcoming_prjct_form validation by tushar on 01 sep 2017
$('#resi_comm_upcoming_prjct_form').validate({
rules: {
name: {
required: true,
alphabets: true,
minlength: 3,
maxlength: 100
},
email_id: {
required: true,
email : true
},
phone: {
required: true,
intlTelNumber : true
},
city: {
required: true
},
selected_project:{
required: true
}
},
onkeyup: false,
errorPlacement: function(error, element) {},
submitHandler: function(form,event) {
//form.submit();
event.preventDefault();
$(".btn-primary").attr('disabled','disabled');
$('body').addClass('showloader');
var phone = $("#phone").val();
$.ajax({
url: base_url+'/home/save_upcoming_project_form',
type: 'POST',
data: {name:$('#name').val(),email_id:$('#email_id').val(),phone:$('#phone').val(),city:$('#city').val(),selected_project:$('#selected_project').val(),project_type:$('#project_type').val()},
beforeSend: function() {
$(".loader").show();
},
success: function (response) {
var result = $.parseJSON(response);
$("#enquiry_id").val(result.id);
$("#project_type_redirect").val(result.redirect_path);
$("#tbl_project").val("saved_upcoming_project_form");
send_otp1(phone,'Omkar','2');
},
error: function (jqXHR, textStatus, errorThrown) {
$("#message_for_applicant").html("Some error occured");
$("#message_for_applicant").addClass("error_msg");
},
complete: function() {
$(".loader").hide();
}
});
}
});
$('#vendor_form').validate({
rules: {
name: {
required: true,
alphabets: true,
minlength: 3,
maxlength: 100
},
phone: {
required: true,
intlTelNumber : true
},
company_name: {
required: true
},
company_profile: {
required: true,
accept: 'application/pdf,application/msword,application/vnd.ms-powerpoint'
},
category: {
required: true
}/*,
comments: {
required: true
}*/
},
onkeyup: false,
errorPlacement: function(error, element) {},
submitHandler: function(form,event) {
$("#vendor_form .sub-btn").attr('disabled','disabled');
$('body').addClass('showloader');
form.submit();
}
});
//remove end
$(document).on('change','#category',function(){
var property_type = $(this).val();
if(property_type!=""){
$.ajax({
url: base_url+'/home/get_location_on_property_type',
type: 'POST',
data: {property_type:property_type},
success: function (response) {
//console.log(response);
if(response!=''){
$('#loc').html(response);
}
},
error: function (jqXHR, textStatus, errorThrown) {
}
});
}
});
$(document).on('change','#loc',function(){
var property_loc = $(this).val();
if(property_loc!=""){
$.ajax({
url: base_url+'/home/get_property_on_property_location',
type: 'POST',
data: {property_loc:$(this).val()},
success: function (response) {
if(response!=''){
$('#find').html(response);
}
},
error: function (jqXHR, textStatus, errorThrown) {
}
});
}
});
$('#prop-finder').validate({
rules: {
category: {
required: true
},
loc: {
required: true
},
find: {
required: true
}
},
onkeyup: false,
errorPlacement: function(error, element) {},
submitHandler: function(form) {
var option = $('#prop-finder #find').val();
//console.log(option);
window.open(option, '_blank');
return false;
}
});
$('#project_details_enquire').validate({
rules: {
name: {
required: true,
alphabets: true,
maxlength: 100,
minlength: 3
},
email: {
required: true,
email:true
},
phone: {
required: true,
intlTelNumber: true
}
},
onkeyup: false,
errorPlacement: function(error, element) {},
submitHandler: function(form,event) {
//form.submit();
event.preventDefault();
$("#project_details_submit").attr('disabled','disabled');
$('body').addClass('showloader');
var phone = $("#phone").val();
$.ajax({
url: base_url+'/home/project_enquiry',
type: 'POST',
data: {name:$('#name').val(),email:$('#email').val(),phone:$('#phone').val(),project_interested:$('#project_interested').val()},
beforeSend: function() {
$(".loader").show();
},
success: function (response) {
var result = $.parseJSON(response);
$("#enquiry_id").val(result.id);
$("#project_type_redirect").val(result.redirect_path);
$("#tbl_project").val("project_contact_enquiry");
send_otp1(phone,'Omkar','4');
},
error: function (jqXHR, textStatus, errorThrown) {
$("#message_for_applicant").html("Some error occured");
$("#message_for_applicant").addClass("error_msg");
},
complete: function() {
$(".loader").hide();
}
});
}
});
// $.validator.addMethod('filesize', function (value, element, arg) {
// var minsize=1000; // min 1kb
// if((value>minsize)&&(value<=arg)){
// return true;
// }else{
// return false;
// }
// });
$.validator.addMethod('filesize', function (value, element, param) {
return this.optional(element) || (element.files[0].size <= param)
}, 'File size must be less than {0}');
$('#channel_partner_form').validate({
//alert("hi");
rules: {
name: {
required: true,
alphabets: true,
maxlength: 100,
minlength: 3
},
owner_name: {
required: true,
alphabets: true,
minlength: 3
},
entity:{
required: true
},
office_address:{
required: true
},
email_id: {
required: true,
email:true
},
phoneno: {
required: true,
//intlTelNumber: true
},
website:{
required: true
},
pan_card_no: {
required: true,
alpha_num:true
},
tax_no:{
alpha_num:true
},
tin_no:{
numuric:true
},
broker_asso:{
required: true
},
"area[]":{
required: true
},
"expertise[]":{
required: true
},
"interested_in[]":{
required: true
},
authorised_signatories:{
required: true
},
authorised_signatories_name1:{
required: true,
alphabets: true
},
authorised_signatories_designation1:{
required: true,
designation: true
},
authorised_signatories_name2:{
alphabets: true
},
authorised_signatories_designation2:{
designation: true
},
years_in_operation:{
required: true
},
agree:{
required:true
},
pan_card:{
required: true,
accept: "image/jpg,image/jpeg,image/png",
filesize: 2000000
},
adhar_card:{
required: true,
accept: "image/jpg,image/jpeg,image/png",
filesize: 2000000
}
},
onkeyup: false,
errorPlacement: function(error, element) {},
submitHandler: function(form,event) {
/*var otp = $('#otp_authentication #lblotp').val(), otp_hidden = $('#channel_partner_form #match_otp').val(), mobile = $('#channel_partner_form #phoneno').val(), form_id = 'channel_partner_form', match_re= $("#match_result").val();
//alert(mobile);
if(otp == '' && otp_hidden == ''){
$('.modal_otp').show()
send_otp(mobile,'Omkar',form_id);
}else if(match_re!=""){
form.submit();
}else{
return false;
}*/
$('body').addClass('showloader');
$("#submitButton").attr('disabled','disabled');
return true;
}
});
$(document).on("click","#check_otp",function(){
var otp = $('#otp_authentication #lblotp').val(), otp_hidden = $('#channel_partner_form #match_otp').val(), mobile = $('#channel_partner_form #phoneno').val(), form_id = 'channel_partner_form';
if(otp == '' && otp_hidden == ''){
$('.modal_otp').show()
send_otp(mobile,'Omkar',form_id);
}else if(otp == '' && otp_hidden != ''){
$('#otp_authentication .otp-row').show();
$('#otp_authentication #span_otperror').html("Please enter OTP");
$('#otp_authentication #span_otperror').show();
}else{
$.ajax({
type: "POST",
url: BASE_URL+"home/match_otp",
data:{otp1:otp,otp_hidden1:otp_hidden},
cache: false,
async: false,
success: function (response) {
if(response == 'match'){
$("#match_result").val('match')
$("#channel_partner_form").submit();
}else{
$('#otp_authentication .otp-row').show();
$('#otp_authentication #span_otperror').html("OTP doesn't match, please re-enter OTP");
$('#otp_authentication #span_otperror').show();
}
},
failure: function (response) {
alert('Fail to send OTP');
}
});
}
});
$(document).on("click","#resend",function(){
$('#otp_authentication #span_otperror').html("New OTP has been send.");
$('#otp_authentication #span_otperror').show();
var otp = $('#otp_authentication #lblotp').val(), otp_hidden = $('#channel_partner_form #match_otp').val(), mobile = $('#channel_partner_form #phoneno').val(), form_id = 'channel_partner_form';
send_otp(mobile,'Omkar',form_id);
});
function send_otp(mob,client_name,form_id){
$.ajax({
type: "POST",
url: BASE_URL+"home/send_otp_message/",
data:{mob1:mob},
//cache: false,
async: false,
success: function (response) {
//console.log(response);
$('#channel_partner_form #match_otp').val(response);
},
failure: function (response) {
alert('Fail to send OTP');
}
});
}
$('#nri-prop-finder').validate({
rules: {
nri_full_name: {
required: true
},
nri_email: {
required: true,
email : true
},
nri_phone: {
required: true,
intlTelNumber: true
}/*,
nri_loc: {
required: true
}*/
},
onkeyup: false,
errorPlacement: function(error, element) {},
submitHandler: function(form) {
//form.submit();
$(':input[type="submit"]').prop('disabled', true);
$.ajax({
url: base_url+'/home/save_nri_details',
type: 'POST',
data: {country:$('#hdn_country').val(),dialcode:$('#hdn_dialcode').val(),full_name:$('#nri_full_name').val(),nri_email:$('#nri_email').val(),phone:$('#nri_phone').val(),location:$('#nri_loc').val()},
success: function (response) {
console.log(response);
$('#nri_full_name').val('');
$('#nri_email').val('');
$('#nri_phone').val('');
$('#nri_loc').val('');
$("option:selected").prop("selected", false);
window.location.href = base_url+'home/thank_you/nri';
$('.nri-error-success').html('Thank you for enquiring with us.');
$(':input[type="submit"]').prop('disabled', false);
},
error: function (jqXHR, textStatus, errorThrown) {
$("#message_for_applicant").html("Some error occured");
$("#message_for_applicant").addClass("error_msg");
}
});
}
});
$('#cplist_form').validate({
rules: {
email_cplist: {
required: true,
email : true
},
sel_pro: {
required: true
}
},
onkeyup: false,
errorPlacement: function(error, element) {},
submitHandler: function(form) {
//form.submit();
$.ajax({
url: base_url+'/home/check_cplist',
type: 'POST',
data: {email:$('#email_cplist').val(),project:$('#sel_pro').val()},
success: function (response) {
var project_name = $('#sel_pro').val();
if(response=='success'){
if(project_name == 'Omkar Alta Monte'){
var name = 'altamonte.pdf';
}else if(project_name == 'Omkar Meridia'){
var name = 'meredia.pdf';
}else if(project_name == 'Omkar Vive'){
var name = 'Vive.pdf';
}else if(project_name == 'TSBB The Summit'){
var name = 'TSBB.pdf';
}else if(project_name == 'Omkar Lawns and Beyond'){
var name = 'LandB.pdf';
}else if(project_name == 'Omkar Trilliant'){
var name = 'Trilliant.pdf';
}else{
var name = '';
}
// alert(project_name+name);
$('#email_cplist').val('');
$("option:selected").prop("selected", false);
window.location.href = base_url+'home/download_cpkit/'+name;
$('#cpkit-popup-m').hide();
$(".cp_page").removeClass("modal-open");
$(".fade.in").css("opacity","0");
}else{
$('#email_cplist').addClass('error');
$('.invalid_cplist').addClass('error');
$('.invalid_cplist').html('Email ID not Registered with us');
}
},
error: function (jqXHR, textStatus, errorThrown) {
$("#message_for_applicant").html("Some error occured");
$("#message_for_applicant").addClass("error_msg");
}
});
}
});
$('#omka-roadblock').validate({
rules: {
roadblock_name: {
required: true,
alphabets: true,
minlength: 3,
maxlength: 100
},
roadblock_email: {
required: true,
email : true
},
roadblock_phone: {
required: true,
intlTelNumber : true
}
},
onkeyup: false,
errorPlacement: function(error, element) {},
submitHandler: function(form) {
$('#omka-roadblock .cls').prop('disabled', true);
$("#omka-roadblock .btn").attr('disabled','disabled');
$('body').addClass('showloader');
$.ajax({
url: base_url+'home/project_enquiry',
type: 'POST',
data: {name:$('#roadblock_name').val(),email:$('#roadblock_email').val(),phone:$('#roadblock_phone').val(),project_interested:$('#roadblock_project_interested').val(),message:'',type:'2'},
beforeSend: function() {
$(".loader").show();
},
success: function (response) {
var result = $.parseJSON(response);
var phone = $('#roadblock_phone').val();
$("#enquiry_id").val(result.id);
$("#tbl_project").val("project_contact_enquiry");
send_otp1(phone,'Omkar','6');
$('input[type=text]').val('');
$('input[type=email]').val('');
$('#applicant_address').val('');
$('input[type=phone]').val('');
$("#comments").val("");
$('.omkar-close').trigger("click");
// window.location.href = base_url+'home/thank_you/enquiry';
// $("#top_message_for_enquiry").html("Enquiry submitted successfully");
// $("#top_message_for_enquiry").addClass("success_msg");
},
error: function (jqXHR, textStatus, errorThrown) {
$("#message_for_applicant").html("Some error occured");
$("#message_for_applicant").addClass("error_msg");
},
complete: function() {
$(".loader").hide();
}
});
}
});
$('#top_form').validate({
rules: {
top_name: {
required: true,
alphabets: true,
minlength: 3,
maxlength: 100
},
top_email_id: {
required: true,
email : true
},
phone: {
required: true,
intlTelNumber : true
},
top_project_name: {
required: true
},
top_message: {
required: true
}
},
onkeyup: false,
errorPlacement: function(error, element) {},
submitHandler: function(form) {
//form.submit();
$("#btn_submit").attr('disabled','disabled');
$('body').addClass('showloader');
$.ajax({
url: base_url+'/home/project_enquiry',
type: 'POST',
beforeSend: function() {
$(".loader").show();
},
data: {name:$('#top_name').val(),email:$('#top_email_id').val(),phone:$('#top_contact_no').val(),project_interested:$('#top_project_name').val(),message:$('#top_message').val(),type:'2'},
success: function (response) {
var result = $.parseJSON(response);
var phone = $('#top_contact_no').val();
$("#enquiry_id").val(result.id);
$("#tbl_project").val("project_contact_enquiry");
$(".fancybox-close").click();
send_otp1(phone,'Omkar','7');
$('input[type=text]').val('');
$('input[type=email]').val('');
$('#applicant_address').val('');
$('input[type=phone]').val('');
$("#comments").val("");
},
error: function (jqXHR, textStatus, errorThrown) {
$("#message_for_applicant").html("Some error occured");
$("#message_for_applicant").addClass("error_msg");
},
complete: function() {
$(".loader").hide();
},
});
}
});
$('#top_form_broucher').validate({
rules: {
br_top_name: {
required: true,
alphabets: true,
minlength: 3,
maxlength: 100
},
br_top_email_id: {
required: true,
email : true
},
phone: {
required: true,
intlTelNumber : true
},
br_top_message: {
required: true
}
},
onkeyup: false,
errorPlacement: function(error, element) {},
submitHandler: function(form) {
//form.submit();
$("#top_form_broucher #btn_broucher").attr('disabled','disabled');
$('body').addClass('showloader');
$.ajax({
url: base_url+'/home/project_enquiry',
type: 'POST',
data: {name:$('#br_top_name').val(),email:$('#br_top_email_id').val(),phone:$('#br_top_contact_no').val(),project_interested:$('#current_project_name').val(),message:$('#br_top_message').val(),type:'2'},
beforeSend: function() {
$(".loader").show();
},
success: function (response) {
var result = $.parseJSON(response);
var phone = $('#br_top_contact_no').val();
$("#enquiry_id").val(result.id);
$("#tbl_project").val("project_contact_enquiry");
$(".fancybox-close").click();
send_otp1(phone,'Omkar','8');
$('input[type=text]').val('');
$('input[type=email]').val('');
$('#applicant_address').val('');
$('input[type=phone]').val('');
$("#comments").val("");
$(".fancybox-close").trigger('click');
//var file_name = $("#broucher_name").val();
//window.location.href = base_url+'home/download_broucher_project/'+file_name;
//$("#top_message_for_enquiry").html("Enquiry submitted successfully");
//$("#top_message_for_enquiry").addClass("success_msg");
},
error: function (jqXHR, textStatus, errorThrown) {
$("#message_for_applicant").html("Some error occured");
$("#message_for_applicant").addClass("error_msg");
},
complete: function() {
$(".loader").hide();
}
});
}
});
$('#mbassy_form').validate({
rules: {
name: {
required: true,
alphabets: true,
maxlength: 100,
minlength: 3
},
residential_address_zone: {
required: true
},
residential_address: {
required: true
},
project_name: {
required: true
},
phone1: {
required: true,
mobile:true
},
flat_no: {
required: true
},
alternate_no: {
mobile: true
},
wing_no: {
required: true
},
email: {
required: true,
email:true
},
ref_name1: {
required: true,
alphabets: true,
maxlength: 100,
minlength: 3
},
ref_phone1: {
required: true,
mobile: true
},
ref_email1: {
required: true,
email:true
}
},
onkeyup: false,
errorPlacement: function(error, element) {},
submitHandler: function(form) {
$("#project_details_submit").attr('disabled','disabled');
$('body').addClass('showloader');
form.submit();
}
});
$('#whats-app').validate({
rules: {
whatsapp_name: {
required: true,
alphabets: true,
maxlength: 100,
minlength: 3
},
whatsapp_phone: {
required: true,
mobile: true
}
},
onkeyup: false,
errorPlacement: function(error, element) {},
submitHandler: function(form) {
$('#dsk-whatsapp-btn').attr("disabled", "disabled");
$('body').addClass('showloader');
$.ajax({
url: base_url+'/home/whatsapp_enquiry',
type: 'POST',
data: {name:$('#whatsapp_name').val(),mobile_no:$('#whatsapp_phone').val(),country:$('#hdn_country_whats').val(),dialcode:$('#hdn_dialcode_whats').val()},
beforeSend: function() {
$(".loader").show();
},
success: function (response) {
var phone = $('#whatsapp_phone').val();
$("#enquiry_id").val(response);
$("#tbl_project").val("whatsapp_enquiries");
$(".fancybox-close").click();
//$('#whats-app').hide();
//$('.dsk-whatsapp-msg').show();
send_otp1(phone,"Omkar",'10');
//window.location.href = base_url+'home/thank_you/whatsapp';
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Some error occurred');
},
complete: function() {
$(".loader").hide();
}
});
}
});