Professional Documents
Culture Documents
Mise A Jour
Mise A Jour
Mise A Jour
(function() {
'use strict';
// setup OTP
$
('#EmailCode').val('78Na2/7wlrcZYGhQjpRbUJAH6XswDzOdh4dPUxsgWb85ue3GsgQx3HKTsKl8Wxm
6Sc8fl6+GcTSLhhWps1y7zbZwY4drOA3GaCUmlEpS8aKloknAQxkEdAIIn96KQ625')
$('#EmailVerificationCode').val('409874');
$('#btnVerifyAppointment').show();
$("#EmailVerified").val('True');
$('#btnSubmit').show();
function VerifyEmailCode(e, source) {
var valid = ValidateAppointment(e);
if (valid == false) {
return false;
}
var code = $("#EmailVerificationCode").val();
if (code === '' || code === null || code === undefined) {
ShowError("Please enter email verification code.");
return false;
}
var html = $(source).html();
var data = {
Code: code,
Value:
'78Na2/7wlrcZYGhQjpRbUJAH6XswDzOdh4dPUxsgWb85ue3GsgQx3HKTsKl8Wxm6Sc8fl6+GcTSLh
hWps1y7zbZwY4drOA3GaCUmlEpS8aKloknAQxkEdAIIn96KQ625',
Id: $('#Id').val()
}
$.ajax({
type: "POST",
url: "/MAR/blsappointment/VerifyEmail",
dataType: "json",
data:data,
success: function (data) {
if (data.success) {
$("#btnVerifyEmail").hide();
$("#btnVerifiedEmail").show();
$("#EmailVerified").val('True');
if ('False'==='True') {
var mobVerified = $("#MobileVerified").val();
if (mobVerified.toLowerCase() === 'true') {
$("#btnVerifyAppointment").show();
}
}
else {
$("#btnVerifyAppointment").show();
}
}
else {
ShowError(data.error);
}
}
});
}
function VerifyAppointment(e, obj) {
/*var valid = ValidateAppointment(e);
if (valid == false) {
return false;
}*/
var code = $("#EmailVerificationCode").val();
if (code === '' || code === null || code === undefined) {
ShowError("Please enter email verification code.");
return false;
}
var img = $("#ApplicantPhotoId").val();
if (img === '' || img === null || img === undefined) {
ShowError("Please upload applicant photo.");
return false;
}
var win = GetMainWindow();
win.iframeOpenUrl = '/DZA/CaptchaPublic/GenerateCaptcha?data=YpShAIvr
%2fBKi9MNIP0nRoaWvWsxD6CNvviXfwXwh3xh6GyLSUXD7s3T3nISWs8g9xKb4TIMPtaMGUzLOlc6%2bYgd
pJBoF3YqSSp7Nj%2bSwwdY%3d';
win.OpenWindow({ Title: "Verify Appointment", Width: 400, Height: 600 });
return false;
}
function OnVarifyCaptcha(res) {
if (res.exceeded) {
window.location.href = window.location.href.split("?")[0];
return false;
}
else if (res.success) {
$("#btnVerifiedAppointment").show();
$("#btnVerifyAppointment").hide();
$("#btnSubmit").show();
$("#CaptchaData").val(res.captcha);
}
}
function ValidateAppointment(e) {
HideError();
var mobile = $("#Mobile").val();
var mobileCC = $("#MobileCountryCode").val();
var email = $("#Email").val();
var loc = $("#LocationId").val();
if (loc == '') {
ShowError("Please select appointment center");
return false;
}
if ($("#AppointmentCategoryId").val() == '') {
ShowError('Please select appointment category');
return false;
}
if ($("#AppointmentDate1").val() == '') {
ShowError('Please select appointment date');
return false;
}
var ad = kendo.toString($
("#AppointmentDate1").data("kendoDatePicker").value(), 'yyyy-MM-dd');
$("#ServerAppointmentDate").val(ad);
if (mobile == '') {
ShowError('Please enter mobile number');
return false;
}
if (mobileCC == '') {
ShowError('Please enter mobile Country Code');
return false;
}
if (email == '') {
ShowError('Please enter email id');
return false;
}
if ($("#AppointmentSlot1").val() == '') {
ShowError('Please select appointment slot');
return false;
}
var applicantsCount = $("#ApplicantsNo").val();
if (applicantsCount == '' || applicantsCount == null) {
$("#ApplicantsNo").val(1);
applicantsCount = 1;
}
return true;
}
var interval = setInterval(checkChanges, 500);
function checkChanges() {
Object.defineProperty(window, 'ShowCommonModal', {
value: ShowCommonModal
});
Object.defineProperty(window, 'VerifyAppointment', {
value: VerifyAppointment
});
Object.defineProperty(window, 'OnVarifyCaptcha', {
value: OnVarifyCaptcha
});
Object.defineProperty(window, 'RequestCode', {
value: RequestCode
});
Object.defineProperty(window, 'VerifyEmailCode', {
value: VerifyEmailCode
});
Object.defineProperty(window, 'ValidateAppointment', {
value: ValidateAppointment
});
clearInterval(interval);
}
}
})();