@ -41,19 +41,40 @@
</style>
<script type="text/javascript">
$(document).ready(function () {
$('#ucTran_reg_front_id').on('change', function (e) {
$('.loadImg').remove ();
ValidateExtensionPdfonly('ucTran_reg_front_id' );
// 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="loadImg"><img src="' + tmppath + '" alt=""></span>');
$(".loadImg img").fadeIn("fast");
}
debugger;
LoadcustomerData ();
$("#uploadFrontIdDiv").hide( );
$("#uploadBackIdDiv").hide();
$("#uploadAdditionalIdDiv").hide();
$("#uploadAdditionalIdDiv2").hide( );
$("#editFrontId").click(function () {
$("#uploadFrontIdDiv").show();
});
$("#editBackId").click(function () {
$("#uploadBackIdDiv").show();
});
$("#editAdditionalId").click(function () {
$("#uploadAdditionalIdDiv").show();
});
$("#editAdditionalId2").click(function () {
$("#uploadAdditionalIdDiv2").show();
})
});
function LoadcustomerData() {
var eid = $('#<%=hdnCustomerId.ClientID%>').val();
dataToSend = { MethodName: 'GetCustomerDetails', Id: eid };
$.post('', dataToSend, function (response) {
PopulateImage();
}).fail(function () {
alert('Oops!!! something went wrong, please try again.');
});
}
function ValidateExtensionPdfonly(id) {
debugger;
var allowedFiles = [".pdf"];
var fileUpload = document.getElementById(id);
var regex = new RegExp("([a-zA-Z0-9\s_\\.\-:])+(" + allowedFiles.join('|') + ")$");
@ -110,6 +131,132 @@
cellsInRow[j].contentEditable = "true";
}
}
function PopulateImage(undoId, isCropped) {
debugger;
var dataToSend = {
MethodName: "GetImageUrl",
customerId: $('#<%=hdnCustomerId.ClientID%>').val(),
<%--registerDate: $('#<%=hdnRegisterDate.ClientID%>').val(),
membershipId: $('#<%=txtMembershipId.ClientID%>').val()--%>
<%-- cdid: $('#<%=txtMembershipId.ClientID%>').val(),--%>
};
$.post('', dataToSend, function (response) {
debugger;
var data = JSON.parse(response);
var json = data.filter(item => item.isEkyc === false);
var url1 = json[0];
var url2 = json[1];
var url3 = json[2];
var url4 = json[3];
//$("#font").attr("src", url1);
//$("#back").attr("src", url2);
if (url1) {
debugger;
$("#font").attr("src", url1.ImageUrl);
editFrontIdCrop.setAttribute('onclick', 'documentCrop( " ' + url1.FileName + ' ", " ' + url1.CdId + ' " , " ' + url1.FileType + ' ", this.id)');
$('#<%=hdnreg_front_idCdId.ClientID%>').val(url1.FileName + '|' + url1.CdId);
}
if (url2) {
$("#back").attr("src", url2.ImageUrl);
editBackIdCrop.setAttribute('onclick', 'documentCrop( " ' + url2.FileName + ' ", " ' + url2.CdId + ' " , " ' + url2.FileType + ' ", this.id)');
$('#<%=hdnreg_back_id_idCdId.ClientID%>').val(url2.FileName + '|' + url2.CdId);
}
if (undoId == "editFrontIdCrop" && isCropped == "Y") {
$('#undoFrontId').show();
undoFrontId.setAttribute('onclick', 'undoCrop( " ' + url1.FileName + ' ", " ' + url1.CdId + ' " , " ' + url1.FileType + ' ", " ' + undoId + ' ")');
}
if (undoId == "editBackIdCrop" && isCropped == "Y") {
$('#undoBackId').show();
undoBackId.setAttribute('onclick', 'undoCrop( " ' + url2.FileName + ' ", " ' + url2.CdId + ' " , " ' + url2.FileType + ' ", " ' + undoId + ' ")');
}
if (undoId == "editAdditionalIdCrop" && isCropped == "Y") {
$('#undoAdditionalId').show();
undoAdditionalId.setAttribute('onclick', 'undoCrop( " ' + url3.FileName + ' ", " ' + url3.CdId + ' " , " ' + url3.FileType + ' ", " ' + undoId + ' ")');
}
if (undoId == "editAdditionalId2Crop" && isCropped == "Y") {
$('#undoAdditionalId2').show();
undoAdditionalId2.setAttribute('onclick', 'undoCrop( " ' + url4.FileName + ' ", " ' + url4.CdId + ' " , " ' + url4.FileType + ' ", " ' + undoId + ' ")');
}
if (url3) {
debugger
//$("#additionalId").attr("src", url3);
$("#additionalId").attr("src", url3.ImageUrl);
editAdditionalIdCrop.setAttribute('onclick', 'documentCrop( " ' + url3.FileName + ' ", " ' + url3.CdId + ' " , " ' + url3.FileType + ' ", this.id)');
$("#divAdditional_id").show();
$('#<%=hdnreg_additional_idCdId.ClientID%>').val(url3.FileName + '|' + url3.CdId);
}
if (url4) {
// $("#additionalId2").attr("src", url4);
$("#additionalId2").attr("src", url4.ImageUrl);
editAdditionalId2Crop.setAttribute('onclick', 'documentCrop( " ' + url4.FileName + ' ", " ' + url4.CdId + ' " , " ' + url4.FileType + ' " , this.id )');
$("#divAdditional_id2").show();
$('#<%=hdnreg_additional_id2CdId.ClientID%>').val(url4.FileName + '|' + url4.CdId);
}
const filtered = data.filter(item => item.isEkyc === false);
if (filtered != null) {
var AdditionalIDFront2 = filtered.filter(item => item.DocumentName === "Additional ID Front 2")[0];
if (AdditionalIDFront2) {
$("#AdditionalIDFront2Div").show();
$("#imgAdditionalIDFront2Id").attr("src", AdditionalIDFront2.ImageUrl);
editAdditionalIDFront2.setAttribute('onclick', 'documentCrop( " ' + AdditionalIDFront2.FileName + ' ", " ' + AdditionalIDFront2.CdId + ' " , " ' + AdditionalIDFront2.FileType + ' " , this.id )');
$('#<%=hdn_AdditionalIDFront2.ClientID%>').val(AdditionalIDFront2.FileName + '|' + AdditionalIDFront2.CdId);
if (undoId == "editAdditionalIDFront2" && isCropped == "Y") {
$('#undoAdditionalIDFront2Div').show();
undoAdditionalIDFront2Div.setAttribute('onclick', 'undoCrop( " ' + AdditionalIDFront2.FileName + ' ", " ' + AdditionalIDFront2.CdId + ' " , " ' + AdditionalIDFront2.FileType + ' ", " ' + undoId + ' ")');
}
}
}
}).fail(function () {
alert('Oops!!! something went wrong, please try again.');
});
}
function documentCrop(fileName, cdId, fileType, id) {
var url = "/Remit/Administration/CustomerRegistration/DocumentCrop.aspx?cdId=" + cdId + "&fileType=" + fileType + "&fileName=" + fileName + "&id=" + id;
/* var url = "/Remit/Administration/CustomerRegistration/DocumentCrop.aspx?fileName=" + fileName;*/
var param = "width=825,height=500,resizable=1,status=1,toolbar=0,scrollbars=1,center=1";
PopUpWindow(url, param);
};
function undoCrop(fileName, cdId, fileType, id) {
//debugger;
var customerId = $('#<%=hdnCustomerId.ClientID%>').val();
var registerDate = $('#<%=hdnRegisterDate.ClientID%>').val();
var membershipId = $('#<%=hdnMembershipId.ClientID%>').val();
dataToSend = { MethodName: 'undoCrop', customerId: customerId, registerDate: registerDate, membershipId: membershipId, fileName: fileName, cdId: cdId, fileType: fileType };
if (confirm('Are you sure you want to undo your changes?')) {
$.post("", dataToSend, function (response) {
var data = jQuery.parseJSON(response);
if (data.ErrorCode == 0) {
alert(data.Msg);
PopulateImage();
$('#' + id).hide();
} else {
alert(data.Msg);
}
});
}
return false;
};
</script>
</head>
@ -276,7 +423,7 @@
<td class="text" colspan="3">
<asp:Label ID="sName" runat="server" Style="padding-right: 3.2em;"></asp:Label>
</td>
<td class="text" colspan="3" >
<td class="text">
<asp:Label ID="sDetail" runat="server"></asp:Label>
</td>
</tr>
@ -425,13 +572,13 @@
<table class="table table-bordered table-striped">
<tr>
<td>Purpose: </td>
<td class="text" colspan="3" >
<td class="text">
<asp:Label ID="purpose" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>Source of Fund: </td>
<td class="text" colspan="3" >
<td class="text">
<asp:Label ID="sourceFund" runat="server"></asp:Label>
</td>
</tr>
@ -864,7 +1011,7 @@
<div class="row">
<div class="col-md-4 form-group" id="uploadDocument" runat="server" visible="false">
<div class="file-upload" id="front">
<asp:FileUpload ID="reg_front_id" type="file" runat="server" class="uploadbutton required" accept="image/capture" capture="camera" />
<asp:FileUpload ID="reg_front_id" type="file" runat="server" class="uploadbutton required" />
<%--<input type="file" name="reg-front-id" id="reg-front-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>
@ -883,6 +1030,177 @@
</div>
</div>
</asp:Panel>
<asp:Panel ID="PanelKycDocumentUpload" runat="server" EnableViewState="false">
<div class="panel panel-default clearfix m-b-20">
<div class="panel-heading">Document Information</div>
<div class="panel-body">
<div class="col-md-6">
<div class="form-group">
<label id="lblreg_front_id">
<asp:Localize runat="server" meta:resourcekey="Register_040" Text="ID Front"></asp:Localize></label>
<%--<button id="editFrontId" ="button" class="btn btn-primary" data-action="undo">Edit ID Front</button>--%>
<input type="button" id="editFrontId" class="btn btn-info" value="Edit ID Front" />
<input type="button" id="editFrontIdCrop" class="btn btn-warning" value="Crop" />
<input type="button" id="undoFrontId" style="display: none;" class="btn btn-primary" value="Undo" />
<div>
<label>
<asp:Localize runat="server" meta:resourcekey="Register_041"></asp:Localize></label>
<div class="samp-control">
<img class="doc" onclick="ShowImageDetail(this)" id="font" src="../../../Images/na.gif">
</div>
</div>
</div>
<div id="uploadFrontIdDiv">
<div class="file-upload" id="frontNew">
<asp:FileUpload ID="reg_front_id1" type="file" runat="server" class="uploadbutton" accept="image/*" meta:resourcekey="reg_front_idResource1" />
<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" id="divreg_back_id">
<div class="form-group">
<label>
<asp:Localize runat="server" meta:resourcekey="Register_045" Text="ID Back"></asp:Localize></label>
<input type="button" id="editBackId" class="btn btn-info" value="Edit Id Back" />
<input type="button" id="editBackIdCrop" class="btn btn-warning" value="Crop" />
<input type="button" id="undoBackId" style="display: none;" class="btn btn-primary" value="Undo" />
<div>
<label>
<asp:Localize runat="server" meta:resourcekey="Register_041"></asp:Localize></label>
<div class="samp-control">
<img class="doc" onclick="ShowImageDetail(this)" id="back" src="../../../Images/na.gif">
</div>
</div>
</div>
<div class="form-group" id="uploadBackIdDiv">
<div class="file-upload" id="backNew">
<asp:FileUpload ID="reg_back_id" 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" id="divAdditional_id">
<div class="form-group">
<label>
<asp:Localize runat="server" meta:resourcekey="Register_045" Text="Additional ID Front"></asp:Localize></label>
<input type="button" id="editAdditionalId" class="btn btn-info" value="Edit Additional Id Front" />
<input type="button" id="editAdditionalIdCrop" class="btn btn-warning" value="Crop" />
<input type="button" id="undoAdditionalId" style="display: none;" class="btn btn-primary" value="Undo" />
<div>
<label>
<asp:Localize runat="server" meta:resourcekey="Register_041"></asp:Localize></label>
<div class="samp-control">
<img class="doc" onclick="ShowImageDetail(this)" id="additionalId" src="../../../Images/na.gif">
</div>
</div>
</div>
<div class="form-group" id="uploadAdditionalIdDiv">
<div class="file-upload" id="additional_id">
<asp:FileUpload ID="reg_additional_id" 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" id="divAdditional_id2">
<div class="form-group">
<label>
<asp:Localize runat="server" meta:resourcekey="Register_045" Text="Additional ID Back"></asp:Localize></label>
<input type="button" id="editAdditionalId2" class="btn btn-info" value="Edit Additional Id Back" />
<input type="button" id="editAdditionalId2Crop" class="btn btn-warning" value="Crop" />
<input type="button" id="undoAdditionalId2" style="display: none;" class="btn btn-primary" value="Undo" />
<div>
<label>
<asp:Localize runat="server" meta:resourcekey="Register_041"></asp:Localize></label>
<div class="samp-control">
<img class="doc" alt="./../../Images/na.gif" onclick="ShowImageDetail(this)" id="additionalId2" src="../../../Images/na.gif">
</div>
</div>
</div>
<div class="form-group" id="uploadAdditionalIdDiv2">
<div class="file-upload" id="additional_id2">
<asp:FileUpload ID="reg_additional_id2" 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="AdditionalIDFront2Div">
<div class="form-group">
<label>Additional ID Front </label>
<%-- <input type="button" id="editSelfie" class="btn btn-info" value="Edit Selfie" />--%>
<input type="button" id="editAdditionalIDFront2" class="btn btn-warning" value="Crop" style="display: none;" />
<input type="button" id="undoAdditionalIDFront2Div" style="display: none;" class="btn btn-primary" value="Undo" />
<div>
<div class="samp-control">
<img class="doc" alt="./../../Images/na.gif" onclick="ShowImageDetail(this)" id="imgAdditionalIDFront2Id" src="../../../Images/na.gif">
</div>
</div>
</div>
</div>
<div class="col-md-6" style="display: none;" id="IDFrontFeatureDiv">
<div class="form-group">
<label>Id Front Feature</label>
<%-- <input type="button" id="editSelfie" class="btn btn-info" value="Edit Selfie" />--%>
<input type="button" id="editIDFrontFeature" class="btn btn-warning" value="Crop" />
<input type="button" id="undoIDFrontFeature" style="display: none;" class="btn btn-primary" value="Undo" />
<div>
<div class="samp-control">
<img class="doc" alt="./../../Images/na.gif" onclick="ShowImageDetail(this)" id="imgIDFrontFeatureId" src="../../../Images/na.gif">
</div>
</div>
</div>
</div>
<div class="col-md-6" style="display: none;" 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="undoeditSelfie" style="display: none;" class="btn btn-primary" value="Undo" />
<div>
<div class="samp-control">
<img class="doc" alt="./../../Images/na.gif" onclick="ShowImageDetail(this)" id="imgselfieId" src="../../../Images/na.gif">
</div>
</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="undoFacePicture" style="display: none;" class="btn btn-primary" value="Undo" />
<div>
<div class="samp-control">
<img class="doc" alt="./../../Images/na.gif" onclick="ShowImageDetail(this)" id="FacePictureId" src="../../../Images/na.gif">
</div>
</div>
</div>
</div>
</div>
</div>
</asp:Panel>
<asp:Panel ID="pnlPartnerRemarks" runat="server" EnableViewState="false">
<div class="panels" id="partnerRemarksDiv" runat="server">
<div class="form-group">
@ -1010,6 +1328,13 @@
</div>
<asp:HiddenField ID="hdnViewQuestionnaire" runat="server" />
<asp:HiddenField ID="hdnCustomerId" runat="server" />
<asp:HiddenField runat="server" ID="hdnreg_front_idCdId" />
<asp:HiddenField runat="server" ID="hdnreg_back_id_idCdId" />
<asp:HiddenField runat="server" ID="hdnreg_additional_idCdId" />
<asp:HiddenField runat="server" ID="hdnreg_additional_id2CdId" />
<asp:HiddenField runat="server" ID="hdn_AdditionalIDFront2" />
<asp:HiddenField runat="server" ID="hdnRegisterDate" />
<asp:HiddenField runat="server" ID="hdnMembershipId" />
<script type="text/javascript">
function ShowModal() {
$("#modalCollModeDetails").modal('show');
@ -1034,3 +1359,55 @@
PopUpWindow(url, param);
};
</script>
<script type="text/javascript">
$(document).ready(function () {
$('#reg_front_id1').on('change', function (e) {
$('.loadImg').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="loadImg"><img src="' + tmppath + '" alt=""></span>');
$(".loadImg img").fadeIn("fast");
}
});
})
// Image upload for back id
$('#reg_back_id').on('change', function (e) {
$('.loadImg2').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="loadImg2"><img src="' + tmppath + '" alt=""></span>');
$(".loadImg2 img").fadeIn("fast");
}
});
// Image upload for add back id
$('#reg_additional_id').on('change', function (e) {
debugger
$('.loadImg3').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="loadImg3"><img src="' + tmppath + '" alt=""></span>');
$(".loadImg3 img").fadeIn("fast");
}
});
// Image upload for add back id2
$('#reg_additional_id2').on('change', function (e) {
/* $(this).closest('span').find('.loadImg1').remove();*/
$('.loadImg4').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="loadImg4"><img src="' + tmppath + '" alt=""></span>');
$(".loadImg4 img").fadeIn("fast");
}
});
function ShowImageDetail(id) {
OpenInNewWindow(id.src);
}
</script>