From 06b9e28e36161d311f56656b8853312544d0a941 Mon Sep 17 00:00:00 2001 From: Leeza Baidar Date: Fri, 1 Sep 2023 17:52:07 +0545 Subject: [PATCH] mobile number length fixation --- .../CustomerRegistration/Manage.aspx | 153 +++++++++--------- .../CustomerRegistration/Manage.aspx.cs | 10 +- .../Manage.aspx.designer.cs | 9 -- .../CustomerRegistration/Manage.aspx | 42 +++-- .../CustomerRegistration/Manage.aspx.cs | 6 +- .../Manage.aspx.designer.cs | 18 --- 6 files changed, 99 insertions(+), 139 deletions(-) diff --git a/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx b/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx index 560c5f0..93baa38 100644 --- a/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx +++ b/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx @@ -306,14 +306,7 @@ var countryCode = $('.dial-code').text(); var mobileNo = input.val(); var maxLength = input.attr('maxLength'); - if (mobileNo.length > 10) { - alert('Mobile No. Can allow input maximum 10 digit only'); - return false; - } - - if (mobileNo.indexOf(countryCode) < 0) { - mobileNo = countryCode + mobileNo; - } + if (mobileNo.length > 13) { alert('Mobile No. Can allow input maximum ' + maxLength + ' digit only'); return $(this).val(''); @@ -325,8 +318,8 @@ $('#<%=countryList.ClientID%>').on('change', function () { $("#<%=mobile.ClientID%>").val(''); var country = $("#<%=countryList.ClientID%> option:selected").text(); - if (country.toLowerCase() == 'japan') { - $("#<%=mobile.ClientID%>").intlTelInput('setCountry', 'jp'); + if (country.toLowerCase() == 'united kingdom') { + $("#<%=mobile.ClientID%>").intlTelInput('setCountry', 'gb'); } }); @@ -366,7 +359,7 @@ $('input[name=agreement]').prop("checked", true); $('#<%=register.ClientID%>').removeAttr('disabled'); }); - CustomerSignatureFromAdmin(); + //CustomerSignatureFromAdmin(); }); @@ -588,10 +581,10 @@ $('#<%=txtRegistrationNo.ClientID%>').val(dr[0].registerationNo); $('#<%=txtDateOfIncorporation.ClientID%>').val(dr[0].dateofIncorporation); $('#<%=txtNameofAuthoPerson.ClientID%>').val(dr[0].nameOfAuthorizedPerson); - //$('#<%=txtStreet.ClientID%>').val(dr[0].street); + <%--$('#<%=txtStreet.ClientID%>').val(dr[0].street);--%> $('#<%=txtAdditionalAddress.ClientID%>').val(dr[0].additionalAddress); $('#<%=txtsenderCityjapan.ClientID%>').val(dr[0].cityUnicode); - $('#<%=txtstreetJapanese.ClientID%>').val(dr[0].streetUnicode); + <%--$('#<%=txtstreetJapanese.ClientID%>').val(dr[0].streetUnicode);--%> $('#<%=txtNameofEmployeer.ClientID%>').val(dr[0].nameOfEmployeer); $('#<%=rbRemitanceAllowed.ClientID%> input[value=' + (dr[0].remittanceAllowed == true ? "Enabled" : "Disabled") + ']').attr('checked', 'checked'); @@ -657,6 +650,7 @@ } function CheckFormValidation() { + debugger var reqField = ""; var val = $("#<% =hdnCustomerId.ClientID%>").val(); var customerType = $("#<% =ddlCustomerType.ClientID%>").val(); @@ -666,9 +660,6 @@ var countryCode = $('.dial-code').text(); var maxLength = input.attr('maxLength'); - if (mobileNo.indexOf(countryCode) < 0) { - mobileNo = countryCode + mobileNo; - } if (mobileNo.length > 13) { alert('Mobile No. Can allow input maximum ' + maxLength + ' digit only'); return $(this).val(''); @@ -873,68 +864,68 @@ }); }--%> - function PopulateAreaDDL(data, selectedValue) { - var option, selValue = ''; - var editable = false; - - if (selectedValue) { - selValue = selectedValue; - } - - if (editable) { - - $(".es-list").empty(); - if (data.length > 1) { - $(".es-list").append('
  • Select Area
  • '); - } - - for (var i = 0; i < data.length; i++) { - if (data[i].SELECTED === 'Y') { - option = '
  • ' + data[i].STREET_NAME + '
  • '; - } - else - option = '
  • ' + data[i].STREET_NAME + '
  • '; - - try { - $(".es-list").append(option); - } - catch (e) { - alert(e); - } - } - } - else { - var ddl = document.getElementById("ContentPlaceHolder1_txtStreet"); - $(ddl).empty(); - if (data.length > 1) { - option = document.createElement("option"); - option.text = 'Select Area'; - option.value = ''; - ddl.options.add(option); - } - - for (var i = 0; i < data.length; i++) { - option = document.createElement("option"); - option.text = data[i].STREET_NAME; - option.value = data[i].ROW_ID; - - if (data[i].SELECTED === 'Y') { - $('#ContentPlaceHolder1_hf_editable_townArea').val(data[i].STREET_NAME); - option.classList.add("selected"); - option.selected = true; - } - else if (data.length == 1) { - $('#ContentPlaceHolder1_hf_editable_townArea').val(data[i].STREET_NAME); - } - try { - ddl.options.add(option); - } - catch (e) { - alert(e); - } - } - } - } + //function PopulateAreaDDL(data, selectedValue) { + // var option, selValue = ''; + // var editable = false; + + // if (selectedValue) { + // selValue = selectedValue; + // } + + // if (editable) { + + // $(".es-list").empty(); + // if (data.length > 1) { + // $(".es-list").append('
  • Select Area
  • '); + // } + + // for (var i = 0; i < data.length; i++) { + // if (data[i].SELECTED === 'Y') { + // option = '
  • ' + data[i].STREET_NAME + '
  • '; + // } + // else + // option = '
  • ' + data[i].STREET_NAME + '
  • '; + + // try { + // $(".es-list").append(option); + // } + // catch (e) { + // alert(e); + // } + // } + // } + // else { + // var ddl = document.getElementById("ContentPlaceHolder1_txtStreet"); + // $(ddl).empty(); + // if (data.length > 1) { + // option = document.createElement("option"); + // option.text = 'Select Area'; + // option.value = ''; + // ddl.options.add(option); + // } + + // for (var i = 0; i < data.length; i++) { + // option = document.createElement("option"); + // option.text = data[i].STREET_NAME; + // option.value = data[i].ROW_ID; + + // if (data[i].SELECTED === 'Y') { + // $('#ContentPlaceHolder1_hf_editable_townArea').val(data[i].STREET_NAME); + // option.classList.add("selected"); + // option.selected = true; + // } + // else if (data.length == 1) { + // $('#ContentPlaceHolder1_hf_editable_townArea').val(data[i].STREET_NAME); + // } + // try { + // ddl.options.add(option); + // } + // catch (e) { + // alert(e); + // } + // } + // } + //} function CheckRequiredOrNot() { var previousVerificationId = $("#<%=hddVerificationTypeNo.ClientID%>").val().toLowerCase(); @@ -1165,12 +1156,12 @@ - --%>
    @@ -1358,7 +1349,7 @@
    - +
    diff --git a/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.cs b/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.cs index 64c5c44..b526f52 100644 --- a/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.cs +++ b/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.cs @@ -140,10 +140,10 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration txtRegistrationNo.Text = dr["registerationNo"].ToString(); txtDateOfIncorporation.Text = dr["dateofIncorporation"].ToString(); txtNameofAuthoPerson.Text = dr["nameOfAuthorizedPerson"].ToString(); - txtStreet.Text = dr["street"].ToString(); + //txtStreet.Text = dr["street"].ToString(); txtAdditionalAddress.Text = dr["additionalAddress"].ToString(); txtsenderCityjapan.Text = dr["cityUnicode"].ToString(); - txtstreetJapanese.Text = dr["streetUnicode"].ToString(); + //txtstreetJapanese.Text = dr["streetUnicode"].ToString(); txtNameofEmployeer.Text = dr["nameOfEmployeer"].ToString(); rbRemitanceAllowed.SelectedValue = (dr["remittanceAllowed"].ToString().ToLower() == "true" ? "Enabled" : "Disabled"); rbOnlineLogin.SelectedValue = (dr["onlineUser"].ToString() == "Y" ? "Enabled" : "Disabled"); @@ -271,7 +271,7 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration string trimmedlastName = lastName.Text.Trim() == "" ? null : lastName.Text.Trim(); string occupationVal = occupationHidden.Value; - string street = Request.Form["ctl00$ContentPlaceHolder1$txtStreet"]; + //string street = Request.Form["ctl00$ContentPlaceHolder1$txtStreet"]; OnlineCustomerModel customerModel = new OnlineCustomerModel() { @@ -284,8 +284,8 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration country = countryList.Text, address = addressLine1.Text, zipCode = zipCode.Text, - streetJapanese = hf_editable_townArea.Value, - street = Request.Form["ctl00$ContentPlaceHolder1$txtStreet"], + //streetJapanese = hf_editable_townArea.Value, + //street = Request.Form["ctl00$ContentPlaceHolder1$txtStreet"], AdditionalAddress = txtAdditionalAddress.Text, city = cityHidden.Value, state = ddlStateHidden.Value, diff --git a/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.designer.cs b/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.designer.cs index cd82182..f84480d 100644 --- a/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.designer.cs +++ b/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.designer.cs @@ -365,15 +365,6 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration /// protected global::System.Web.UI.WebControls.DropDownList ddlState; - /// - /// txtstreetJapanese control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox txtstreetJapanese; - /// /// city control. /// diff --git a/Swift.web/Remit/Administration/CustomerRegistration/Manage.aspx b/Swift.web/Remit/Administration/CustomerRegistration/Manage.aspx index 13148af..d2bc474 100644 --- a/Swift.web/Remit/Administration/CustomerRegistration/Manage.aspx +++ b/Swift.web/Remit/Administration/CustomerRegistration/Manage.aspx @@ -325,13 +325,13 @@ var countryCode = $('.dial-code').text(); var mobileNo = input.val(); var maxLength = input.attr('maxLength'); - if (mobileNo.length > 10) { - alert('Mobile No. Can allow input maximum 10 digit only'); - return $(this).val(''); - } - if (mobileNo.indexOf(countryCode) < 0) { - mobileNo = countryCode + mobileNo; - } + //if (mobileNo.length > 10) { + // alert('Mobile No. Can allow input maximum 10 digit only'); + // return $(this).val(''); + //} + //if (mobileNo.indexOf(countryCode) < 0) { + // mobileNo = countryCode + mobileNo; + //} if (mobileNo.length > 13) { alert('Mobile No. Can allow input maximum ' + maxLength + ' digit only'); return $(this).val(''); @@ -343,8 +343,8 @@ $('#<%=countryList.ClientID%>').on('change', function () { $("#<%=mobile.ClientID%>").val(''); var country = $("#<%=countryList.ClientID%> option:selected").text(); - if (country.toLowerCase() == 'japan') { - $("#<%=mobile.ClientID%>").intlTelInput('setCountry', 'jp'); + if (country.toLowerCase() == 'united kingdom') { + $("#<%=mobile.ClientID%>").intlTelInput('setCountry', 'gb'); } }); @@ -537,10 +537,10 @@ $('#<%=txtRegistrationNo.ClientID%>').val(dr[0].registerationNo); $('#<%=txtDateOfIncorporation.ClientID%>').val(dr[0].dateofIncorporation); $('#<%=txtNameofAuthoPerson.ClientID%>').val(dr[0].nameOfAuthorizedPerson); - //$('#<%=txtStreet.ClientID%>').val(dr[0].street); + <%--$('#<%=txtStreet.ClientID%>').val(dr[0].street);--%> $('#<%=txtAdditionalAddress.ClientID%>').val(dr[0].additionalAddress); $('#<%=txtsenderCityjapan.ClientID%>').val(dr[0].cityUnicode); - $('#<%=txtstreetJapanese.ClientID%>').val(dr[0].streetUnicode); + <%--$('#<%=txtstreetJapanese.ClientID%>').val(dr[0].streetUnicode);--%> $('#<%=txtNameofEmployeer.ClientID%>').val(dr[0].nameOfEmployeer); $('#<%=rbRemitanceAllowed.ClientID%> input[value=' + (dr[0].remittanceAllowed == true ? "Enabled" : "Disabled") + ']').attr('checked', 'checked'); @@ -617,6 +617,7 @@ } function CheckFormValidation() { + debugger var reqField = ""; if ($('#<%=occupation.ClientID%>').val() !== '11383') { reqField = reqField.replace(",<%=occupationText.ClientID%>,", ","); @@ -629,10 +630,6 @@ var countryCode = $('.dial-code').text(); var maxLength = input.attr('maxLength'); - - if (mobileNo.indexOf(countryCode) < 0) { - mobileNo = countryCode + mobileNo; - } if (mobileNo.length > 13) { alert('Mobile No. Can allow input maximum ' + maxLength + ' digit only'); return $(this).val(''); @@ -750,7 +747,7 @@ parent.AgreementModalPopup(); } - function PopulateAreaDDL(data, selectedValue) { + <%--function PopulateAreaDDL(data, selectedValue) { var option, selValue = ''; var editable = $("#<%=txtStreet.ClientID%>").next('ul').hasClass('es-list'); @@ -807,7 +804,7 @@ } } } - } + }--%> function CheckRequiredOrNot() { var previousVerificationId = $("#<%=hddVerificationTypeNo.ClientID%>").val().toLowerCase(); var currentVerificationId = $("#<%=verificationTypeNo.ClientID%>").val().toLowerCase(); @@ -1110,25 +1107,24 @@
    --%> - --%>
    - --%>