@ -65,11 +65,10 @@
$("#divreg_back_id").show();
$("#divAdditional_id").show();
$("#divAdditional_id2").show();
$("#uploadFrontIdDiv").hide();
$("#uploadBackIdDiv").hide();
$("#uploadAdditionalIdDiv").hide();
$("#uploadAdditionalId Div2").hide();
$("#uploadcustomerSelfie Div2").hide();
$("#editFrontId").click(function () {
$("#uploadFrontIdDiv").show();
@ -80,9 +79,11 @@
$("#editAdditionalId").click(function () {
$("#uploadAdditionalIdDiv").show();
});
$("#editAdditionalId2 ").click(function () {
$("#uploadAdditionalId Div2").show();
$("#editSelfie ").click(function () {
$("#uploadcustomerSelfie Div2").show();
})
/* $("#" + mId + "occupation").change(function () {*/
$("#occupation").change(function () {
$("#divOccupation").hide();
@ -319,7 +320,6 @@
}
function LoadcustomerData() {
debugger
var eid = $('#<%=hdnCustomerId.ClientID%>').val();
dataToSend = { MethodName: 'GetCustomerDetails', Id: eid };
$.post('', dataToSend, function (response) {
@ -335,7 +335,7 @@
}
function PopulateImage(undoId, isCropped) {
debugger;
// debugger;
var dataToSend = {
MethodName: "GetImageUrl",
customerId: $('#<%=hdnCustomerId.ClientID%>').val(),
@ -393,8 +393,8 @@
$('#<%=hdnreg_additional_idCdId.ClientID%>').val(url3.FileName + '|' + url3.CdId);
}
else
$("#divAdditional_id").hide();
// else
// $("#divAdditional_id").hide();
if (url4) {
// $("#additionalId2").attr("src", url4);
@ -404,7 +404,7 @@
$('#<%=hdnreg_additional_id2CdId.ClientID%>').val(url4.FileName + '|' + url4.CdId);
}
else
$("#divAdditional_id2").hide();
$("#divAdditional_id2").hide();
debugger;
const filtered = data.filter(item => item.isEkyc === true);
@ -412,10 +412,10 @@
if (filtered != null) {
var selfie = filtered.filter(item => item.DocumentName === "Customer Selfie")[0];
if (selfie) {
$("#customerSelfieDiv").show();
/* $("#customerSelfieDiv").show();*/
$("#imgselfieId").attr("src", selfie.ImageUrl);
editSelfieCrop.setAttribute('onclick', 'documentCrop( " ' + selfie.FileName + ' ", " ' + selfie.CdId + ' " , " ' + filtered.FileType + ' " , this.id )');
@ -427,18 +427,20 @@
undoeditSelfie.setAttribute('onclick', 'undoCrop( " ' + selfie.FileName + ' ", " ' + selfie.CdId + ' " , " ' + selfie.FileType + ' ", " ' + undoId + ' ")');
}
}
else
/*$("#customerSelfieDiv").hide();*/
var facePicture = filtered.filter(item => item.DocumentName === "Face Picture")[0];
if (facePicture) {
$("#FacePictureDiv").show();
$("#FacePictureId").attr("src", facePicture.ImageUrl);
editFacePicture.setAttribute('onclick', 'documentCrop( " ' + facePicture.FileName + ' ", " ' + facePicture.CdId + ' " , " ' + facePicture.FileType + ' " , this.id )');
editFacePictureCrop .setAttribute('onclick', 'documentCrop( " ' + facePicture.FileName + ' ", " ' + facePicture.CdId + ' " , " ' + facePicture.FileType + ' " , this.id )');
$('#<%=hdn_FacePicture.ClientID%>').val(facePicture.FileName + '|' + facePicture.CdId);
if (undoId == "editFacePicture" && isCropped == "Y") {
if (undoId == "editFacePictureCrop" && isCropped == "Y") {
$('#undoFacePicture').show();
undoFacePicture.setAttribute('onclick', 'undoCrop( " ' + facePicture.FileName + ' ", " ' + facePicture.CdId + ' " , " ' + facePicture.FileType + ' ", " ' + undoId + ' ")');
}
@ -476,8 +478,8 @@
}
}
else {
$("#customerSelfieDiv").hide();
$("#FacePictureDiv").hide();
// $("#customerSelfieDiv").hide();
// $("#FacePictureDiv").hide();
$("#AdditionalIDFront2Div").hide();
$("#IDFrontFeatureDiv").hide();
}
@ -503,6 +505,16 @@
});
}
function ParseCustomerData(response) {
var dr = jQuery.parseJSON(response);
if (dr != null) {
@ -944,8 +956,6 @@
});
}
//function PopulateAreaDDL(data, selectedValue) {
// //debugger;
// var ddl = document.getElementById("txtStreet");
@ -1632,12 +1642,12 @@
</div>
</div>
</div>
<div class="col-md-6" style="display: none;" id="customerSelfieDiv">
<div class="col-md-6" id="customerSelfieDiv">
<div class="form-group">
<label>Customer Selfie</label>
<%-- < input type="button" id="editSelfie" class="btn btn-info" value="Edit Selfie" />--%>
<input type="button" id="editSelfieCrop" class="btn btn-warning" value="Crop" />
<input type="button" id="editSelfie" class="btn btn-info" value="Edit Selfie" />
<input type="button" id="editSelfieCrop" class="btn btn-warning" tyle="display: none;" value="Crop" />
<input type="button" id="undoeditSelfie" style="display: none;" class="btn btn-primary" value="Undo" />
<div>
@ -1646,12 +1656,23 @@
</div>
</div>
</div>
<div class="form-group" id="uploadcustomerSelfieDiv2">
<div class="file-upload" id="facePictureId">
<asp:FileUpload ID="reg_customerSelfie" type="file" runat="server" class="uploadbutton" accept="image/*" meta:resourcekey="reg_back_idResource1" />
<%--<input type="file" name="reg-back-id" id="reg-back-id" required="required" class="uploadbutton" accept="image/*" />--%>
<span>
<asp:Localize runat="server" meta:resourcekey="Register_042" Text="Drag and drop your file here or "></asp:Localize><span class="primary-c"><asp:Localize runat="server" meta:resourcekey="Register_043" Text="Browse"></asp:Localize></span><asp:Localize runat="server" meta:resourcekey="Register_044" Text=" for a document to upload"></asp:Localize></span>
</div>
</div>
</div>
<div class="col-md-6" style="display: none;" id="FacePictureDiv">
<div class="form-group">
<label>Customer Face Picture</label>
<input type="button" id="editFacePicture" class="btn btn-warning" value="Crop" />
<input type="button" id="editFacePicture" style="display: none;" class="btn btn-info" value="Edit Face Picture" />
<input type="button" id="editFacePictureCrop " class="btn btn-warning" value="Crop" />
<input type="button" id="undoFacePicture" style="display: none;" class="btn btn-primary" value="Undo" />
<div>
@ -1660,7 +1681,10 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default clearfix m-b-20">
@ -1957,6 +1981,20 @@
$(".loadImg4 img").fadeIn("fast");
}
});
// Image upload for add back id2
$('#reg_customerSelfie').on('change', function (e) {
/* $(this).closest('span').find('.loadImg1').remove();*/
$('.loadImg5').remove();
// console.log(e.target, 'e')
for (var i = 0; i < e.target.files.length; i++) {
var tmppath = URL.createObjectURL(e.target.files[i]);
$(this).after('<span class="loadImg5"><img src="' + tmppath + '" alt=""></span>');
$(".loadImg5 img").fadeIn("fast");
}
});
function ShowImageDetail(id) {
OpenInNewWindow(id.src);
}