Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RegisterCustomerPanel.html::::
- ________________________________
- <html
- xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
- <head>
- <wicket:head>
- <script src="scripts/jquery/jquery-ui-1.8.17.custom.min.js"></script>
- <script src="scripts/jquery/jquery.min.js"></script>
- <script src="scripts/jquery/jquery-ui.min.js"></script>
- <script src="scripts/jquery/jquery.maskedinput.js"></script>
- <script>
- jQuery(function($){
- $("#identityValue").mask("99999-9999999-9");
- $("#cnicBeneficial").mask("99999-9999999-9");
- $("#msisdn").mask("03999999999");
- });
- </script>
- <script src="scripts/jquery/customization.js">function();</script>
- </wicket:head>
- </head>
- <body>
- <wicket:panel>
- <form wicket:id="registerCustomerForm">
- <div wicket:id="errorMessages"></div>
- <div class="column">
- <div wicket:id="businessDetailDiv">
- <h2 class="section personal">
- <wicket:message key="businessDetail.headLine" />
- </h2>
- <div class="input" wicket:id="businessNameDiv"
- style="width: 1000px">
- <label for="businessName"> <wicket:message
- key="customer.businessName" /> <span class="required">*</span>
- </label> <input tabindex="1" type="text" style="width: 533px"
- wicket:id="customer.businessName" id="businessName" size="80" />
- </div>
- <div class="input" wicket:id="ntnNumberDiv">
- <label for="ntnNumber"> <wicket:message key="ntnNumber" />
- <!-- <span
- class="required">*</span> -->
- </label> <input tabindex="2" type="text" wicket:id="customer.ntnNumber"
- id="ntnNumber" size="40" />
- </div>
- </div>
- </div>
- <div class="column">
- <h2 class="section personal">
- <wicket:message key="generalInfo.headLine" />
- </h2>
- <!-- For L2 Individual start style="padding-left: 6px"-->
- <div class="column" style="padding-left: 6px">
- <div class="input" style="width: 1000px">
- <label for="nameAsPerCNIC"> <wicket:message
- key="nameAsPerCNIC" /> <span class="required">*</span>
- </label> <input tabindex="3" type="text" style="width: 533px"
- wicket:id="customer.address.nameAsPerCNIC" id="nameAsPerCNIC"
- size="40" />
- </div>
- </div>
- <!-- For L2 Individual end -->
- <div class="column twoColumn">
- <div class="input" wicket:id="fatherHusbandNameDiv">
- <label for="fatherHusbandName"><wicket:message
- key="fatherHusbandName" /><span class="required">*</span></label> <input
- tabindex="4" type="text" wicket:id="customer.fatherHusbandName"
- id="fatherHusbandName" size="20" />
- </div>
- <div class="input" wicket:id="genderDiv">
- <label for="kvGender"><wicket:message key="gender" /><span
- class="required">*</span></label> <select tabindex="5"
- wicket:id="customer.address.kvGender" id="kvGender">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" wicket:id="birthDateDiv">
- <label for="birthDate"><wicket:message key="birthDate" /><span class="required">*</span></label>
- <input readonly="readonly" tabindex="6" type="text" size="10" wicket:id="birthDateField" id="birthDate"
- style="width: 150px;" />
- </div>
- </div>
- <div class="column twoColumn">
- <div class="input" wicket:id="motherNameDiv">
- <label for="motherName"><wicket:message key="motherName" /><span
- class="required">*</span></label> <input tabindex="7" type="text"
- wicket:id="customer.motherName" id="motherName" size="20" />
- </div>
- <div class="input" wicket:id="placeOfBirthDiv">
- <label for="placeOfBirth"><wicket:message
- key="placeOfBirth" /><span class="required">*</span></label> <input
- tabindex="8" type="text"
- wicket:id="customer.address.placeOfBirth" id="placeOfBirth"
- size="20" />
- </div>
- <div class="input" wicket:id="customerTypeDiv">
- <label for="customerTypeId"> <wicket:message
- key="customerType" /> <span class="required">*</span>
- </label> <select tabindex="9" wicket:id="customer.customerTypeId"
- id="customerTypeId">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" wicket:id="titleDiv">
- <label for="title"> <wicket:message key="title" />
- </label> <input tabindex="10" type="text"
- wicket:id="customer.address.title" id="title" size="20" />
- </div>
- <!-- This is the section for merchant kyc -->
- </div>
- <div class="column buffer"></div>
- <h2 class="section house">
- <wicket:message key="addressInfo.headLine" />
- </h2>
- <div class="column" style="padding-left: 6px">
- <div class="input" wicket:id="permanentAddressDiv"
- style="width: 1000px">
- <label for="permanentAddress"> <wicket:message
- key="permanentAddress" /><span class="required">*</span></label> <input
- tabindex="11" type="text" style="width: 533px"
- wicket:id="customer.address.permanentAddress"
- id="permanentAddress" />
- </div>
- <div class="input" wicket:id="mailingAddressDiv"
- style="width: 1000px">
- <label for="mailingAddress"><wicket:message
- key="mailingAddress" /><span class="required">*</span></label> <input
- tabindex="12" type="text" style="width: 533px"
- wicket:id="customer.address.mailingAddress" id="mailingAddress"
- size="40" />
- </div>
- <div class="input" wicket:id="businessAddressDiv"
- style="width: 1000px">
- <label for="businessAddress"><wicket:message
- key="businessAddress" /><span class="required">*</span></label> <input
- tabindex="13" type="text" style="width: 533px"
- wicket:id="customer.address.businessAddress" id="businessAddress"
- size="40" />
- </div>
- </div>
- <div class="column twoColumn">
- <div class="input">
- <label for="state"><wicket:message key="state" /><span
- class="required">*</span></label> <select tabindex="14"
- wicket:id="customer.address.state" id="state">
- <option>dummy</option>
- </select>
- </div>
- </div>
- <div class="column twoColumn">
- <div class="input">
- <label for="city"><wicket:message key="city" /><span
- class="required">*</span></label> <input tabindex="15" type="text"
- wicket:id="customer.address.city" id="city" />
- </div>
- </div>
- <div class="column buffer"></div>
- <h2 class="section phone">
- <wicket:message key="contactInfo.headLine" />
- </h2>
- <div class="column twoColumn">
- <div class="input" wicket:id="msisdnDiv">
- <label for="msisdn"><wicket:message key="msisdn" /><span
- class="required">*</span></label> <input tabindex="16" type="text"
- wicket:id="customer.msisdn" id="msisdn" size="20" />
- </div>
- <div class="input" wicket:id="emailDiv">
- <label for="email"><wicket:message key="email" /><span
- class="required">*</span></label> <input tabindex="20" type="text"
- wicket:id="customer.address.email" id="email" size="50" />
- </div>
- <div class="input" wicket:id="rolesAndPrivilegesDiv">
- <label for="roles"><wicket:message key="roles" /><span
- class="required">*</span></label> <select tabindex="5"
- wicket:id="customer.roles" id="roles">
- <option>dummy</option>
- </select>
- </div>
- </div>
- <div class="column twoColumn">
- <div wicket:id="infoModeDiv">
- <div class="input" wicket:id="kvInfoModeDiv">
- <label for="kvInfoMode"><wicket:message key="infoMode" /><span
- class="required">*</span></label> <select tabindex="21"
- wicket:id="customer.kvInfoMode" id="kvInfoMode">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" wicket:id="landLineDiv">
- <label for="landLine"><wicket:message key="landLine" />
- </label> <input tabindex="16" type="text"
- wicket:id="customer.address.landLine" id="landLine" size="20" />
- </div>
- <div class="input" wicket:id="networkProviderDiv">
- <label for="networkProvider"><wicket:message
- key="Network Provider" /><span class="required">*</span></label> <select
- tabindex="22" wicket:id="customer.networkProvider"
- id="networkProvider">
- <option>dummy</option>
- </select>
- </div>
- </div>
- </div>
- <div class="column buffer"></div>
- <div wicket:id="identityInfoDiv">
- <h2 class="section person" wicket:id="identityInfoTitleDiv">
- <wicket:message key="identityInfo.headLine" />
- </h2>
- <div class="column twoColumn">
- <div class="input" wicket:id="kvIdentityTypeDiv" style="width: 565px;">
- <label for="kvIdentityType"><wicket:message
- key="identityType" /><span class="required"
- wicket:id="requiredIdentityType"></span></label> <select tabindex="23"
- wicket:id="customer.kvIdentityType" id="kvIdentityType">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" wicket:id="cnicExpiryDateDiv">
- <label for="cnicExpiryDate"><wicket:message
- key="cnicExpiryDate" /><span class="required">*</span></label> <input
- readonly="readonly" tabindex="24" type="text" size="10"
- wicket:id="cnicExpiryDateField" id="cnicExpiryDate"
- style="width: 150px;" />
- </div>
- </div>
- <div class="column twoColumn">
- <div class="input" wicket:id="kvIdentityValueDiv">
- <label for="identityValue"> <wicket:message
- key="identityValue" /> <span class="required">*</span>
- </label> <input tabindex="25" type="text"
- wicket:id="customer.identityValue" id="identityValue" />
- </div>
- </div>
- </div>
- <!-- Customization for Merchant Account Profile start-->
- <div class="column buffer"></div>
- <div wicket:id="accountProfileMerchantDiv">
- <h2 class="section person">
- <wicket:message key="accountProfile.headLine" />
- </h2>
- <div class="column twoColumn">
- <div class="input" wicket:id="monthlyExpectedDepositDiv">
- <label for="monthlyExpectedDeposit"> <wicket:message
- key="monthlyExpectedDeposit" /> <span class="required"
- wicket:id="requiredMonthlyExpectedDeposit"></span>
- </label> <input tabindex="26" type="text"
- wicket:id="customer.kycDetailsBean.monthlyExpectedDeposit"
- id="monthlyExpectedDeposit" size="20" />
- </div>
- <div class="input" wicket:id="monthlyExpectedWithdrawalDiv">
- <label for="monthlyExpectedWithdrawal"> <wicket:message
- key="monthlyExpectedWithdrawal" /> <span class="required"
- wicket:id="requiredMonthlyExpectedWithdrawal"></span>
- </label> <input tabindex="27" type="text"
- wicket:id="customer.kycDetailsBean.monthlyExpectedWithdrawal"
- id="monthlyExpectedWithdrawal" size="20" />
- </div>
- <div class="input" wicket:id="expectedAvgBalanceDiv">
- <label for="expectedAvgBalance"> <wicket:message
- key="expectedAvgBalance" /> <span class="required"
- wicket:id="requiredExpectedAvgBalance"></span>
- </label> <input tabindex="28" type="text"
- wicket:id="customer.kycDetailsBean.expectedAvgBalance"
- id="expectedAvgBalance" size="20" />
- </div>
- </div>
- <div class="column twoColumn">
- <div class="input" wicket:id="annualTurnoverDiv">
- <label for="annualTurnover"> <wicket:message
- key="annualTurnover" /> <span class="required"
- wicket:id="requiredAnnualTurnover"></span>
- </label> <input tabindex="29" type="text"
- wicket:id="customer.kycDetailsBean.annualTurnover"
- id="annualTurnover" size="20" />
- </div>
- <div class="input" wicket:id="expectedMonthlyCreditSalesDiv">
- <label for="expectedMonthlyCreditSales"> <wicket:message
- key="expectedMonthlyCreditSales" /> <span class="required"
- wicket:id="requiredExpectedMonthlyCreditSales"></span>
- </label> <input tabindex="30" type="text"
- wicket:id="customer.kycDetailsBean.expectedMonthlyCreditSales"
- id="expectedMonthlyCreditSales" size="20" />
- </div>
- </div>
- </div>
- <!-- Customization for Merchant Account Profile end-->
- <!-- Customization for Individual Account Profile start-->
- <div wicket:id="accountProfileDiv">
- <h2 class="section person">
- <wicket:message key="accountProfile.headLine" />
- </h2>
- <div class="column twoColumn">
- <div class="input" wicket:id="averageMonthlyInflowDiv">
- <label for="averageMonthlyInflow"> <wicket:message
- key="averageMonthlyInflow" /> <span class="required"
- wicket:id="requiredAverageMonthlyInflow"></span>
- </label> <input tabindex="31" type="text"
- wicket:id="customer.kycDetailsBean.averageMonthlyInflow"
- id="averageMonthlyInflow" size="20" />
- </div>
- <div class="input" wicket:id="avergaeYearlyIncomeDiv">
- <label for="avergaeYearlyIncome"> <wicket:message
- key="avergaeYearlyIncome" /> <span class="required"
- wicket:id="requiredAvergaeYearlyIncome"></span>
- </label> <input tabindex="32" type="text"
- wicket:id="customer.kycDetailsBean.avergaeYearlyIncome"
- id="avergaeYearlyIncome" size="20" />
- </div>
- </div>
- <div class="column twoColumn">
- <div class="input" wicket:id="averageMonthlyOutflowDiv">
- <label for="averageMonthlyOutflow"> <wicket:message
- key="averageMonthlyOutflow" /> <span class="required"
- wicket:id="requiredAverageMonthlyOutflow"></span>
- </label> <input tabindex="33" type="text"
- wicket:id="customer.kycDetailsBean.averageMonthlyOutflow"
- id="averageMonthlyOutflow" size="20" />
- </div>
- <div class="input" wicket:id="averageYearlySalesDiv">
- <label for="averageYearlySales"> <wicket:message
- key="averageYearlySales" /> <span class="required"
- wicket:id="requiredAverageYearlySales"></span>
- </label> <input tabindex="34" type="text"
- wicket:id="customer.kycDetailsBean.averageYearlySales"
- id="averageYearlySales" size="20" />
- </div>
- </div>
- </div>
- <!-- Customization for Individual Account Profile end-->
- <div class="column buffer"></div>
- <!-- This is the section for KYC -->
- <div wicket:id="kycDiv">
- <h2 class="section person">
- <wicket:message key="kycInfo.headLine" />
- </h2>
- <div class="column twoColumn">
- <div class="input" wicket:id="typeOfCustomer_NotCustomerTypeDiv"
- style="width: 565px;">
- <label for="typeOfCustomer_NotCustomerType"> <wicket:message
- key="typeOfCustomer_NotCustomerType" /> <span class="required"
- wicket:id="requiredTypeOfCustomer_NotCustomerType"></span>
- </label> <select tabindex="35"
- wicket:id="customer.kycDetailsBean.typeOfCustomer_NotCustomerType"
- id="typeOfCustomer_NotCustomerType">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" wicket:id="bankRecognitionMediumDiv"
- style="width: 565px;">
- <label for="bankRecognitionMedium"> <wicket:message
- key="bankRecognitionMedium" /> <span class="required"
- wicket:id="requiredBankRecognitionMedium"></span>
- </label> <select tabindex="36"
- wicket:id="customer.kycDetailsBean.bankRecognitionMedium"
- id="bankRecognitionMedium">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" style="width: 565px;">
- <label for="isBeneficialAccountOwner"> <wicket:message
- key="isBeneficialAccountOwner" /> <span class="required"
- wicket:id="requiredIsBeneficialAccountOwner"></span>
- </label> <select tabindex="37"
- wicket:id="customer.kycDetailsBean.isBeneficialAccountOwner"
- id="isBeneficialAccountOwner">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" wicket:id="accountTypeDiv">
- <label for="accountType"><wicket:message key="accountType" /><span
- class="required">*</span></label> <select tabindex="47"
- wicket:id="customer.kycDetailsBean.accountType" id="accountType">
- <option>dummy</option>
- </select>
- </div>
- </div>
- <div class="column twoColumn">
- <div class="input" wicket:id="purposeOfAccountDiv"
- style="width: 565px;">
- <label for="purposeOfAccount"> <wicket:message
- key="purposeOfAccount" /> <span class="required"
- wicket:id="requiredPurposeOfAccount"></span>
- </label> <select tabindex="38"
- wicket:id="customer.kycDetailsBean.purposeOfAccount"
- id="purposeOfAccount">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" wicket:id="modeOfTransactionDiv"
- style="width: 565px;">
- <label for="modeOfTransaction"> <wicket:message
- key="modeOfTransaction" /> <span class="required"
- wicket:id="requiredModeOfTransaction"></span>
- </label> <select tabindex="39"
- wicket:id="customer.kycDetailsBean.modeOfTransaction"
- id="modeOfTransaction">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" wicket:id="sourceOfIncomeDiv">
- <label for="sourceOfIncome"> <wicket:message
- key="sourceOfIncome" /> <span class="required"
- wicket:id="requiredSourceOfIncome"></span>
- </label> <input tabindex="40" type="text"
- wicket:id="customer.kycDetailsBean.sourceOfIncome"
- id="sourceOfIncome" size="20" />
- </div>
- </div>
- <!-- <div class="column buffer"></div> -->
- <!-- This is the section for beneficial account owner -->
- <div class="column buffer"></div>
- <div class="column twoColumn">
- <div class="input" wicket:id="salaryDiv">
- <label for="salary"> <wicket:message key="salary" />
- </label> <input tabindex="41" type="text"
- wicket:id="customer.kycDetailsBean.salary" id="salary" size="20" />
- </div>
- <div class="input" wicket:id="otherIncomeDiv">
- <label for="otherIncome"> <wicket:message key="otherIncome" />
- </label> <input tabindex="42" type="text"
- wicket:id="customer.kycDetailsBean.otherIncome" id="otherIncome"
- size="20" />
- </div>
- <div class="input" wicket:id="actualBeneficialOwnerDiv">
- <label for="actualBeneficialOwner"> <wicket:message
- key="actualBeneficialOwner" /> <span class="required"
- wicket:id="requiredActualBeneficialOwner"></span>
- </label> <input tabindex="43" type="text"
- wicket:id="customer.kycDetailsBean.actualBeneficialOwner"
- id="actualBeneficialOwner" size="20" />
- </div>
- <div class="input" wicket:id="cnicBeneficialDiv">
- <label for="cnicBeneficial"> <wicket:message
- key="cnicBeneficial" />
- </label> <input tabindex="44" type="text"
- wicket:id="customer.kycDetailsBean.cnicBeneficial"
- id="cnicBeneficial" size="20" maxlength="15" />
- </div>
- <div class="input" wicket:id="currentBusinessSinceDiv">
- <label for="currentBusinessSince"> <wicket:message
- key="currentBusinessSince" /> <span
- class="required" wicket:id="requiredCurrentBusinessSince"></span>
- </label> <input tabindex="45" type="text"
- wicket:id="customer.kycDetailsBean.currentBusinessSince"
- id="currentBusinessSince" size="20" />
- </div>
- </div>
- <div class="column twoColumn">
- <div class="input" wicket:id="typeOfTransactionDiv">
- <label for="typeOfTransaction"> <wicket:message
- key="typeOfTransaction" /> <span
- class="required" wicket:id="requiredTypeOfTransaction"></span>
- </label> <input tabindex="46" type="text"
- wicket:id="customer.kycDetailsBean.typeOfTransaction"
- id="typeOfTransaction" size="20" />
- </div>
- <div class="input" wicket:id="premisesDiv">
- <label for="premises"><wicket:message key="premises" /><span
- class="required">*</span></label> <select tabindex="47"
- wicket:id="customer.kycDetailsBean.premises" id="premises">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" wicket:id="relationWithApplicantDiv">
- <label for="relationWithApplicant"> <wicket:message
- key="relationWithApplicant" />
- </label> <input tabindex="48" type="text"
- wicket:id="customer.kycDetailsBean.relationWithApplicant"
- id="relationWithApplicant" size="20" />
- </div>
- </div>
- <div class="column buffer"></div>
- <!-- This is the section for Risk Rating -->
- <h2 class="section person">
- <wicket:message key="riskProfile.headLine" />
- </h2>
- <!-- <div class="column twoColumn"> -->
- <div class="column" style="padding-left: 6px">
- <div class="input" style="width: 1000px">
- <label for="accRelegiousOrgOrMadrassa" style="width: 515px">
- <wicket:message key="accRelegiousOrgOrMadrassa" /> <span
- class="required" wicket:id="requiredAccRelegiousOrgOrMadrassa"></span>
- </label> <select tabindex="49"
- wicket:id="customer.kycDetailsBean.accRelegiousOrgOrMadrassa"
- id="accRelegiousOrgOrMadrassa">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" style="width: 1000px">
- <label for="politicalyExposed " style="width: 515px"> <wicket:message
- key="politicalyExposed" /> <span class="required"
- wicket:id="requiredPoliticalyExposed"></span>
- </label> <select tabindex="50"
- wicket:id="customer.kycDetailsBean.politicalyExposed"
- id="politicalyExposed">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" style="width: 1000px">
- <label for="landLord" style="width: 515px"> <wicket:message
- key="landLord" /> <span class="required"
- wicket:id="requiredLandLord"></span>
- </label> <select tabindex="51"
- wicket:id="customer.kycDetailsBean.landLord" id="landLord">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" style="width: 1000px">
- <label for="refusedByOtherBank" style="width: 515px"> <wicket:message
- key="refusedByOtherBank" /> <span class="required"
- wicket:id="requiredRefusedByOtherBank"></span>
- </label> <select tabindex="52"
- wicket:id="customer.kycDetailsBean.refusedByOtherBank"
- id="refusedByOtherBank">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" style="width: 1000px">
- <label for="dealingWithHighLowRiskCountry" style="width: 515px">
- <wicket:message key="dealingWithHighLowRiskCountry" /> <span
- class="required"
- wicket:id="requiredDealingWithHighLowRiskCountry"></span>
- </label> <select tabindex="53"
- wicket:id="customer.kycDetailsBean.dealingWithHighLowRiskCountry"
- id="dealingWithHighLowRiskCountry">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" style="width: 1000px">
- <label for="customerResident" style="width: 515px"> <wicket:message
- key="customerResident" /> <span class="required"
- wicket:id="requiredCustomerResident"></span>
- </label> <select tabindex="54"
- wicket:id="customer.kycDetailsBean.customerResident"
- id="customerResident">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" style="width: 1000px">
- <label for="customerActualOwnerOfAcc" style="width: 515px">
- <wicket:message key="customerActualOwnerOfAcc" /> <span
- class="required" wicket:id="requiredCustomerActualOwnerOfAcc"></span>
- </label> <select tabindex="55"
- wicket:id="customer.kycDetailsBean.customerActualOwnerOfAcc"
- id="customerActualOwnerOfAcc">
- <option>dummy</option>
- </select>
- </div>
- </div>
- <div class="column buffer"></div>
- <!-- <div class="column twoColumn"> -->
- <div class="column" style="padding-left: 6px">
- <div class="input" style="width: 1000px">
- <label for="customerAsDirectorOrGovBody" style="width: 515px">
- <wicket:message key="customerAsDirectorOrGovBody" /> <span
- class="required"
- wicket:id="requiredCustomerAsDirectorOrGovBody"></span>
- </label> <select tabindex="57"
- wicket:id="customer.kycDetailsBean.customerAsDirectorOrGovBody"
- id="customerAsDirectorOrGovBody">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" style="width: 1000px">
- <label for="houseWife" style="width: 515px"> <wicket:message
- key="houseWife" /> <span class="required"
- wicket:id="requiredHouseWife"></span>
- </label> <select tabindex="58"
- wicket:id="customer.kycDetailsBean.houseWife" id="houseWife">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" style="width: 1000px">
- <label for="customerMinorAccount" style="width: 515px">
- <wicket:message key="customerMinorAccount" /> <span
- class="required" wicket:id="requiredCustomerMinorAccount"></span>
- </label> <select tabindex="59"
- wicket:id="customer.kycDetailsBean.customerMinorAccount"
- id="customerMinorAccount">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" style="width: 1000px">
- <label for="customerProfesion" style="width: 515px"> <wicket:message
- key="customerProfesion" /> <span class="required"
- wicket:id="requiredCustomerProfesion"></span>
- </label> <select tabindex="60"
- wicket:id="customer.kycDetailsBean.customerProfesion"
- id="customerProfesion">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" style="width: 1000px">
- <label for="productAndServiceMappingMatch" style="width: 515px">
- <wicket:message key="productAndServiceMappingMatch" /> <span
- class="required"
- wicket:id="requiredProductAndServiceMappingMatch"></span>
- </label> <select tabindex="61"
- wicket:id="customer.kycDetailsBean.productAndServiceMappingMatch"
- id="productAndServiceMappingMatch">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" style="width: 1000px">
- <label for="customerbusinessStructure" style="width: 515px">
- <wicket:message key="customerbusinessStructure" /> <span
- class="required" wicket:id="requiredCustomerbusinessStructure"></span>
- </label> <select tabindex="62"
- wicket:id="customer.kycDetailsBean.customerbusinessStructure"
- id="customerbusinessStructure">
- <option>dummy</option>
- </select>
- </div>
- <div class="input" style="width: 1000px">
- <label for="customerHoldMall" style="width: 515px"> <wicket:message
- key="customerHoldMall" /> <span class="required"
- wicket:id="requiredCustomerHoldMall"></span> <!-- <span class="required">*</span> -->
- </label> <select tabindex="63"
- wicket:id="customer.kycDetailsBean.customerHoldMall"
- id="customerHoldMall">
- <option>dummy</option>
- </select>
- </div>
- <div class="column buffer"></div>
- <div class="input" style="width: 1000px">
- <label for="riskRating" style="width: 515px"> <wicket:message
- key="riskRating" /> <span class="required"
- wicket:id="requiredRiskRating"></span>
- </label> <select tabindex="56"
- wicket:id="customer.kycDetailsBean.riskRating" id="riskRating">
- <option>dummy</option>
- </select>
- </div>
- </div>
- <div class="column buffer"></div>
- <!-- This is the section for Additional Comments -->
- <div class="column">
- <div class="input">
- <label for="textField"> <wicket:message key="textField" />
- </label>
- <textarea tabindex="64" class="text"
- wicket:id="customer.kycDetailsBean.textField" cols="120"
- rows="4" id="txnText"></textarea>
- </div>
- </div>
- </div>
- <div class="column buffer"></div>
- <div wicket:id="signUpDiv">
- <div class="module clear">
- <h2 class="section customerConfirm">
- <wicket:message key="index.headline.confirm" />
- </h2>
- <div class="column">
- <p>
- <wicket:message key="captcha.help" />
- </p>
- <div class="input"
- style="border: 1px #CCCCCC solid; width: 200px;">
- <a tabindex="65" wicket:id="captchLink" target="_blank"><img
- wicket:id="captchaImage" /></a>
- </div>
- <div class="input" style="width: 448px;">
- <label for="captcha"> <wicket:message key="captcha" />
- <span class="required">*</span>
- </label> <input tabindex="66" type="text" wicket:id="captcha"
- id="captcha" size="20" />
- </div>
- </div>
- </div>
- <div class="column buffer"></div>
- <div wicket:id="tncsDiv" class="module clear">
- <h2 class="section approval" style="margin-bottom: 5px">
- <wicket:message key="terms" />
- </h2>
- <div class="column">
- <ol class="tncsList">
- <li wicket:id="tncs">
- <div wicket:id="conditions" class="tncCondition"></div>
- <div class="acknowledgeDiv">
- <span wicket:id="asterik">*</span><input type="checkbox"
- wicket:id="selected" /><span class="acknowledgeText">By
- checking this box, you acknowledge accepting the above Terms
- and Conditions.</span>
- </div>
- </li>
- </ol>
- </div>
- </div>
- </div>
- </div>
- <div class="column buffer"></div>
- <div class="column">
- <div class="formAction">
- <div wicket:id="cstButtons">
- <input tabindex="67" type="submit"
- class="submitForm defaultAction" wicket:id="register"
- wicket:message="value:register" />
- </div>
- <div wicket:id="dppButtons">
- <input type="submit" tabindex="40"
- class="submitForm defaultAction" wicket:id="save"
- wicket:message="value:register" /> <input type="submit"
- tabindex="68" class="submitForm" wicket:id="cancel"
- wicket:message="value:Cancel" />
- </div>
- <div wicket:id="signupButtons">
- <input tabindex="69" type="submit"
- class="submitForm defaultAction" wicket:id="continue"
- wicket:message="value:Continue" /> <input tabindex="70"
- type="submit" class="submitForm" wicket:id="back"
- wicket:message="value:Back" /> <input tabindex="71"
- type="submit" class="submitForm" wicket:id="cancelSignup"
- wicket:message="value:Cancel" />
- </div>
- </div>
- </div>
- </form>
- </wicket:panel>
- </body>
- </html>
- RegisterCustomerPanel.java:::
- ________________________________
- package com.sybase365.mobiliser.web.common.panels;
- import java.util.ArrayList;
- import java.util.Calendar;
- import java.util.Date;
- import java.util.List;
- import org.apache.wicket.ajax.AjaxRequestTarget;
- import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
- import org.apache.wicket.ajax.markup.html.AjaxFallbackLink;
- import org.apache.wicket.ajax.markup.html.form.AjaxCheckBox;
- import org.apache.wicket.behavior.HeaderContributor;
- import org.apache.wicket.behavior.SimpleAttributeModifier;
- import org.apache.wicket.datetime.PatternDateConverter;
- import org.apache.wicket.datetime.markup.html.form.DateTextField;
- import org.apache.wicket.markup.ComponentTag;
- import org.apache.wicket.markup.html.IHeaderContributor;
- import org.apache.wicket.markup.html.IHeaderResponse;
- import org.apache.wicket.markup.html.WebMarkupContainer;
- import org.apache.wicket.markup.html.WebPage;
- import org.apache.wicket.markup.html.basic.Label;
- import org.apache.wicket.markup.html.form.Button;
- import org.apache.wicket.markup.html.form.Form;
- import org.apache.wicket.markup.html.form.RequiredTextField;
- import org.apache.wicket.markup.html.form.TextArea;
- import org.apache.wicket.markup.html.form.TextField;
- import org.apache.wicket.markup.html.image.NonCachingImage;
- import org.apache.wicket.markup.html.list.ListItem;
- import org.apache.wicket.markup.html.list.ListView;
- import org.apache.wicket.markup.html.panel.FeedbackPanel;
- import org.apache.wicket.markup.html.panel.Panel;
- import org.apache.wicket.model.CompoundPropertyModel;
- import org.apache.wicket.model.IModel;
- import org.apache.wicket.model.Model;
- import org.apache.wicket.model.PropertyModel;
- import org.apache.wicket.spring.injection.annot.SpringBean;
- import org.apache.wicket.validation.validator.EmailAddressValidator;
- import org.apache.wicket.validation.validator.PatternValidator;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- import com.sybase365.mobiliser.money.contract.v5_0.customer.beans.Attachment;
- import com.sybase365.mobiliser.money.contract.v5_0.customer.beans.Customer;
- import com.sybase365.mobiliser.money.contract.v5_0.svcpkg.spm.beans.TermAndCondition;
- import com.sybase365.mobiliser.util.contract.v5_0.messaging.beans.Map;
- import com.sybase365.mobiliser.util.contract.v5_0.messaging.beans.Map.Entry;
- import com.sybase365.mobiliser.util.tools.wicketutils.ErrorIndicator;
- import com.sybase365.mobiliser.web.application.clients.CustomClientLogic;
- import com.sybase365.mobiliser.web.application.clients.CustomerClientLogic;
- import com.sybase365.mobiliser.web.application.clients.CustomerSecurityClientLogic;
- import com.sybase365.mobiliser.web.application.clients.MBankingClientLogic;
- import com.sybase365.mobiliser.web.application.clients.MessageClientLogic;
- import com.sybase365.mobiliser.web.application.clients.ServicePackagesClientLogic;
- import com.sybase365.mobiliser.web.application.clients.WalletClientLogic;
- import com.sybase365.mobiliser.web.application.pages.MobiliserBasePage;
- import com.sybase365.mobiliser.web.beans.AddressBean;
- import com.sybase365.mobiliser.web.beans.CustomerBean;
- import com.sybase365.mobiliser.web.common.components.FocusOnLoadBehavior;
- import com.sybase365.mobiliser.web.common.components.FormModificationDetectorBehavior;
- import com.sybase365.mobiliser.web.common.components.LocalizableLookupDropDownChoice;
- import com.sybase365.mobiliser.web.common.components.RenderJavaScriptComponent;
- import com.sybase365.mobiliser.web.common.components.TooltipBehavior;
- import com.sybase365.mobiliser.web.consumer.pages.signup.CaptchaImage;
- import com.sybase365.mobiliser.web.consumer.pages.signup.CaptchaValidator;
- import com.sybase365.mobiliser.web.consumer.pages.signup.ConfirmDataPage;
- import com.sybase365.mobiliser.web.consumer.pages.signup.SignupCancelPage;
- import com.sybase365.mobiliser.web.consumer.pages.signup.SignupStartPage;
- import com.sybase365.mobiliser.web.consumer.pages.signup.TermsAndConditions_en;
- import com.sybase365.mobiliser.web.cst.pages.customercare.StandingDataPage;
- import com.sybase365.mobiliser.web.distributor.pages.customerservices.CustomerDetailsPage;
- import com.sybase365.mobiliser.web.distributor.pages.selfcare.SelfCareHomePage;
- import com.sybase365.mobiliser.web.util.ClientHelper;
- import com.sybase365.mobiliser.web.util.Configuration;
- import com.sybase365.mobiliser.web.util.Constants;
- import com.sybase365.mobiliser.web.util.Converter;
- import com.sybase365.mobiliser.web.util.PhoneNumber;
- import com.sybase365.mobiliser.web.util.PortalUtils;
- import com.sybase365.mobiliser.web.util.ValidationUtils;
- public class RegisterCustomerPanel extends Panel {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- private static final Logger LOG = LoggerFactory
- .getLogger(RegisterCustomerPanel.class);
- @SpringBean(name = "configuration")
- private Configuration configuration;
- protected MobiliserBasePage basePage;
- protected CustomerClientLogic selfCustomerClient;
- protected CustomerClientLogic systemCustomerClient;
- protected WalletClientLogic selfWalletClient;
- protected WalletClientLogic systemWalletClient;
- protected CustomClientLogic systemCustomClient;
- protected ServicePackagesClientLogic servicePackagesClientLogic;
- protected CustomerSecurityClientLogic systemCustomerSecurityClient;
- protected CustomerBean customer;
- protected String pinConfirmed;
- protected String passwordConfirmed;
- protected String captcha;
- protected AttachmentsPanel attachmentsPanel;
- protected NonCachingImage captchaImage;
- List<TermAndCondition> listTermAndCondition;
- @SuppressWarnings("rawtypes")
- protected RequiredTextField captchTextField;
- protected String conditions;
- protected boolean selected;
- List<TermAndCondition> selectedTermAndConditions = new ArrayList<TermAndCondition>();
- List<TermAndCondition> requiredTermAndConditions = new ArrayList<TermAndCondition>();
- protected String challengeId;
- @SpringBean(name = "systemAuthMBankingClientLogic")
- protected MBankingClientLogic clientLogic;
- private boolean returnPageStatus;
- protected MessageClientLogic systemMessageClient; // customization by Nouman Zaidi for Notifications
- public RegisterCustomerPanel(String id, MobiliserBasePage basePage,
- CustomerClientLogic selfCustomerClient,
- CustomerClientLogic systemCustomerClient,
- WalletClientLogic selfWalletClient,
- WalletClientLogic systemWalletClient,
- CustomClientLogic systemCustomClient,
- ServicePackagesClientLogic servicePackagesClientLogic,
- CustomerSecurityClientLogic systemCustomerSecurityClient,
- CustomerBean customer,
- MessageClientLogic systemMessageClient){// customization by Nouman Zaidi for Notifications
- this(id, basePage, selfCustomerClient, systemCustomerClient,
- selfWalletClient, systemWalletClient, systemCustomClient,
- servicePackagesClientLogic, systemCustomerSecurityClient, null,
- customer,systemMessageClient);// customization by Nouman Zaidi for Notifications
- }
- public RegisterCustomerPanel(String id, MobiliserBasePage basePage,
- CustomerClientLogic selfCustomerClient,
- CustomerClientLogic systemCustomerClient,
- WalletClientLogic selfWalletClient,
- WalletClientLogic systemWalletClient,
- CustomClientLogic systemCustomClient,
- ServicePackagesClientLogic servicePackagesClientLogic,
- CustomerSecurityClientLogic systemCustomerSecurityClient,
- AttachmentsPanel attachmentsPanel,
- CustomerBean customer,
- MessageClientLogic systemMessageClient) {// customization by Nouman Zaidi for Notifications
- super(id);
- this.basePage = basePage;
- this.attachmentsPanel = attachmentsPanel;
- this.customer = customer;
- this.selfCustomerClient = selfCustomerClient;
- this.systemCustomerClient = systemCustomerClient;
- this.selfWalletClient = selfWalletClient;
- this.systemWalletClient = systemWalletClient;
- this.systemCustomClient = systemCustomClient;
- this.servicePackagesClientLogic = servicePackagesClientLogic;
- this.systemCustomerSecurityClient = systemCustomerSecurityClient;
- this.systemMessageClient = systemMessageClient;// customization by Nouman Zaidi for Notifications
- LOG.debug("-----1-----New customer type -> {}", customer.getCustomerTypeId());
- LOG.debug("-----1-----New IdenID -> {}", customer.getIdentityId());
- LOG.debug("-----1-----New KvIdenType -> {}", customer.getKvIdentityType());
- final String chooseDtTxt = this.basePage.getLocalizer().getString(
- "datepicker.chooseDate", basePage);
- add(new HeaderContributor(new IHeaderContributor() {
- private static final long serialVersionUID = 1L;
- @Override
- public void renderHead(IHeaderResponse response) {
- captcha = "";
- // localize the jquery datepicker based on users locale setting
- // locale specific js includes for datepicker are available at
- // http://jquery-ui.googlecode.com/svn/trunk/ui/i18n/
- String localeLang = getLocale().getLanguage().toLowerCase();
- LOG.debug("Using DatePicker for locale language: {}",
- localeLang);
- response.renderJavascriptReference("scripts/jquery/i18n/jquery.ui.datepicker-en.js");
- response.renderJavascriptReference("scripts/jquery/jquery.min.js");
- response.renderJavascriptReference("scripts/jquery/jquery-ui.min.js");
- response.renderJavascriptReference("scripts/jquery/jquery.maskedinput.js");
- response.renderJavascriptReference("scripts/jquery/customization.js");
- RenderJavaScriptComponent renderJavaScriptComponent = new RenderJavaScriptComponent();
- renderJavaScriptComponent.renderDateComponent(response,
- "#birthDate", chooseDtTxt, true);
- renderJavaScriptComponent.renderDateComponent(response,
- "#cnicExpiryDate", chooseDtTxt, true, true);
- }
- }));
- if(PortalUtils.exists(attachmentsPanel)){
- LOG.info("Setting the Attachment Panel when it is not NULL");
- this.attachmentsPanel.setOutputMarkupPlaceholderTag(true);
- }
- AddressBean addBean = new AddressBean();
- this.customer.setAddress(addBean);
- constructPanel();
- }
- @SuppressWarnings("unchecked")
- protected void constructPanel() {
- @SuppressWarnings("rawtypes")
- final Form<?> form = new Form("registerCustomerForm",
- new CompoundPropertyModel<RegisterCustomerPanel>(this));
- form.add(new FeedbackPanel("errorMessages").setVisible(!PortalUtils
- .exists(attachmentsPanel)));
- form.setMultiPart(true);
- form.add(new FormModificationDetectorBehavior());
- RequiredTextField<String> nameAsPerCNIC = new RequiredTextField<String>(
- "customer.address.nameAsPerCNIC");
- nameAsPerCNIC.add(new FocusOnLoadBehavior());
- form.add(nameAsPerCNIC.setRequired(true)
- .add(new PatternValidator(Constants.REGEX_NAME_AS_PER_CNIC))
- .add(Constants.mediumStringValidator)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- final WebMarkupContainer fatherHusbandNameDiv = new WebMarkupContainer("fatherHusbandNameDiv");
- fatherHusbandNameDiv.add(new TextField<String>("customer.fatherHusbandName")
- .add(new PatternValidator(Constants.REGEX_COMMENTS))
- .add(Constants.mediumName30StringValidator)
- .setRequired(true)
- .add(Constants.mediumSimple30AttributeModifier)
- .add(new ErrorIndicator()));
- fatherHusbandNameDiv.setVisible(true);
- form.add(fatherHusbandNameDiv);
- fatherHusbandNameDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer genderDiv = new WebMarkupContainer("genderDiv");
- final LocalizableLookupDropDownChoice<Integer> gender = (LocalizableLookupDropDownChoice<Integer>)
- new LocalizableLookupDropDownChoice<Integer>(
- "customer.address.kvGender", Integer.class,
- Constants.RESOURCE_BUNDLE_GENDER, this, false, true,
- basePage.getMobiliserWebSession().getLocale())
- .setNullValid(false).setRequired(true)
- .add(new ErrorIndicator());
- genderDiv.add(gender);
- form.add(genderDiv);
- final WebMarkupContainer birthDateDiv = new WebMarkupContainer("birthDateDiv");
- DateTextField birthDateTextField = new DateTextField("birthDateField", new PropertyModel<Date>(
- this, "customer.birthDateString"), new PatternDateConverter(Constants.DATE_FORMAT_PATTERN_PARSE, false));
- birthDateDiv.add(birthDateTextField);
- birthDateDiv.setOutputMarkupPlaceholderTag(true);
- form.add(birthDateDiv);
- WebMarkupContainer customerTypeDiv = new WebMarkupContainer("customerTypeDiv");
- customerTypeDiv.setVisible(true);
- List<Integer> typeList = null;
- try {
- if(getBasePage().getMobiliserWebSession().getRoles().hasRole(Constants.PRIV_CST_LOGIN)){
- typeList = ClientHelper.getKeysFromPreferences("cstRegisterCustomerTypes", Integer.class, configuration);
- }else{
- if(getBasePage().getMobiliserWebSession().getRoles().hasRole(Constants.PRIV_HEAD_QUARTER_AGENT )){
- if(getBasePage().getMobiliserWebSession().getLoggedInCustomer().getCustomerId() == 500110750L){
- LOG.info("This is the case when FINCA Super Agent has logged in");
- typeList = ClientHelper.getKeysFromPreferences("dppHeadFINCACustomerType", Integer.class, configuration);
- } else{
- if(getBasePage().getMobiliserWebSession().getLoggedInCustomer().getCustomerId() == 500278623L){
- LOG.info("This is the case when FINJA Super Agent has logged in");
- typeList = ClientHelper.getKeysFromPreferences("dppHeadFINJACustomerType", Integer.class, configuration);
- } else{
- LOG.info("Invalid user has logged in, so need to return here.");
- return;
- }
- }
- }
- else{
- if(getBasePage().getMobiliserWebSession().getRoles().hasRole(Constants.PRIV_MERCHANT_LOGIN)){
- if(customer.isVerified()){
- //This means that the call is to create MERCHANT, get the MERCHANT customer Types
- typeList = ClientHelper.getKeysFromPreferences("dppRegisterDppCustomerTypes", Integer.class, configuration);
- }
- else{
- //This means that the call is to create CUSTOMER, get the CUSTOMER customer Types
- typeList = ClientHelper.getKeysFromPreferences("dppRegisterCustomerTypes", Integer.class, configuration);
- attachmentsPanel.setVisible(false);
- }
- }
- }
- }
- } catch (Exception ex) {
- LOG.warn("Error in loading cutomer type list from preferences.", ex);
- return;
- }
- final LocalizableLookupDropDownChoice<Integer> customertypes = (LocalizableLookupDropDownChoice<Integer>)
- new LocalizableLookupDropDownChoice<Integer>(
- "customer.customerTypeId", Integer.class,
- Constants.RESOURCE_BUNDLE_CUSTOMER_TYPE, this, false, true,
- typeList, basePage.getMobiliserWebSession().getLocale())
- .setNullValid(false).setRequired(true)
- .add(new ErrorIndicator());
- customerTypeDiv.add(customertypes);
- form.add(customerTypeDiv);
- final WebMarkupContainer motherNameDiv = new WebMarkupContainer("motherNameDiv");
- motherNameDiv.add(new TextField<String>("customer.motherName")
- .add(new PatternValidator(Constants.REGEX_COMMENTS))
- .add(Constants.mediumStringValidator)
- .setRequired(true)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- motherNameDiv.setVisible(true);
- form.add(motherNameDiv);
- motherNameDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer titleDiv = new WebMarkupContainer("titleDiv");
- titleDiv.add(new TextField<String>("customer.address.title")
- .add(new PatternValidator(Constants.REGEX_TITLE))
- .add(Constants.mediumStringValidator)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- titleDiv.setVisible(true);
- form.add(titleDiv);
- titleDiv.setOutputMarkupPlaceholderTag(true);
- List<String> languageList = new ArrayList<String>();
- languageList.add(configuration.getLanguage());
- //for individual kyc start
- final WebMarkupContainer placeOfBirthDiv = new WebMarkupContainer("placeOfBirthDiv");
- placeOfBirthDiv.add(new TextField<String>("customer.address.placeOfBirth")
- .add(new PatternValidator(Constants.REGEX_FIRSTNAME))
- .add(Constants.mediumName20StringValidator)
- .setRequired(true)
- .add(Constants.mediumSimple20AttributeModifier)
- .add(new ErrorIndicator()));
- form.add(placeOfBirthDiv);
- placeOfBirthDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer permanentAddressDiv = new WebMarkupContainer("permanentAddressDiv");
- permanentAddressDiv.add(new TextField<String>("customer.address.permanentAddress")
- .add(new PatternValidator(Constants.REGEX_STRING_ALPHA_NUM_SPACE_COMMA_SLASH_UNDERSCORE_ONLY))
- .add(Constants.mediumStringValidator)
- .setRequired(true)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- form.add(permanentAddressDiv);
- permanentAddressDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer mailingAddressDiv = new WebMarkupContainer("mailingAddressDiv");
- mailingAddressDiv.add(new TextField<String>("customer.address.mailingAddress")
- .add(new PatternValidator(Constants.REGEX_STRING_ALPHA_NUM_SPACE_COMMA_SLASH_UNDERSCORE_ONLY))
- .add(Constants.mediumStringValidator)
- .setRequired(true)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- form.add(mailingAddressDiv);
- mailingAddressDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer businessAddressDiv = new WebMarkupContainer("businessAddressDiv");
- businessAddressDiv.add(new TextField<String>("customer.address.businessAddress")
- .add(new PatternValidator(Constants.REGEX_STRING_ALPHA_NUM_SPACE_COMMA_SLASH_UNDERSCORE_ONLY))
- .add(Constants.mediumStringValidator)
- .setRequired(true)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- form.add(businessAddressDiv);
- businessAddressDiv.setOutputMarkupPlaceholderTag(true);
- //For merchant kyc Only start
- final WebMarkupContainer businessDetailDiv = new WebMarkupContainer(
- "businessDetailDiv");
- businessDetailDiv.setVisible(true);
- final WebMarkupContainer businessNameDiv = new WebMarkupContainer("businessNameDiv");
- businessNameDiv.add(new TextField<String>("customer.businessName")
- .add(new PatternValidator(Constants.REGEX_NAME_AS_PER_CNIC))
- .add(Constants.mediumStringValidator)
- .setRequired(true)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- businessDetailDiv.add(businessNameDiv);
- businessNameDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer ntnNumberDiv = new WebMarkupContainer("ntnNumberDiv");
- ntnNumberDiv.add(new TextField<String>("customer.ntnNumber")
- .add(new PatternValidator(Constants.REGEX_NTN))
- .add(Constants.mediumStringValidator)
- .setRequired(false)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- businessDetailDiv.add(ntnNumberDiv);
- ntnNumberDiv.setOutputMarkupPlaceholderTag(true);
- form.add(businessDetailDiv);
- businessDetailDiv.setOutputMarkupPlaceholderTag(true);
- //For merchant kyc end
- form.add(new LocalizableLookupDropDownChoice<String>(
- "customer.address.state", String.class,
- Constants.RESOURCE_BUNDLE_STATES_CODE, this, false, true,
- basePage.getMobiliserWebSession().getLocale())
- .setRequired(true)
- .add(new ErrorIndicator()));
- form.add(new TextField<String>("customer.address.city")
- .setRequired(true)
- .add(new PatternValidator(Constants.REGEX_CITY))
- .add(Constants.mediumStringValidator)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- final WebMarkupContainer msisdnDiv = new WebMarkupContainer("msisdnDiv");
- msisdnDiv.add(new TextField<String>("customer.msisdn")
- .add(new PatternValidator(Constants.REGEX_PHONE_NUMBER))
- .add(Constants.mediumStringValidator)
- .setRequired(true)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- msisdnDiv.setVisible(true);
- msisdnDiv.setOutputMarkupPlaceholderTag(true);
- form.add(msisdnDiv);
- final WebMarkupContainer emailDiv = new WebMarkupContainer("emailDiv");
- emailDiv.add(new TextField<String>("customer.address.email")
- .setRequired(true).add(EmailAddressValidator.getInstance())
- .add(Constants.mediumStringValidator)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- emailDiv.setVisible(true);
- form.add(emailDiv);
- emailDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer rolesAndPrivilegesDiv = new WebMarkupContainer("rolesAndPrivilegesDiv");
- final LocalizableLookupDropDownChoice<Integer> rolesTypes = (LocalizableLookupDropDownChoice<Integer>)
- new LocalizableLookupDropDownChoice<Integer>(
- "customer.roles", Integer.class,
- Constants.RESOURCE_BUNDLE_ROLES_FOR_CST_USERS, this, false, true,
- basePage.getMobiliserWebSession().getLocale())
- .setNullValid(false).setRequired(true)
- .add(new ErrorIndicator());
- rolesAndPrivilegesDiv.add(rolesTypes);
- rolesAndPrivilegesDiv.setOutputMarkupPlaceholderTag(true);
- form.add(rolesAndPrivilegesDiv);
- WebMarkupContainer infoModeDiv = new WebMarkupContainer("infoModeDiv");
- infoModeDiv.setVisible(true);
- final WebMarkupContainer kvInfoModeDiv = new WebMarkupContainer("kvInfoModeDiv");
- kvInfoModeDiv.setVisible(true);
- final LocalizableLookupDropDownChoice<Integer> infoModeSMSEmail = (LocalizableLookupDropDownChoice<Integer>)
- new LocalizableLookupDropDownChoice<Integer>(
- "customer.kvInfoMode", Integer.class,
- Constants.RESOURCE_BUNDLE_INFO_MODE, this, false, true,
- basePage.getMobiliserWebSession().getLocale())
- .setNullValid(false).setRequired(true)
- .add(new ErrorIndicator());
- kvInfoModeDiv.add(infoModeSMSEmail);
- kvInfoModeDiv.setOutputMarkupPlaceholderTag(true);
- infoModeDiv.add(kvInfoModeDiv);
- final WebMarkupContainer landLineDiv = new WebMarkupContainer("landLineDiv");
- landLineDiv.add(new TextField<String>("customer.address.landLine")
- .add(new PatternValidator(Constants.REGEX_PHONE_NUMBER))
- .add(Constants.mediumStringValidator)
- .setRequired(true)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- landLineDiv.setVisible(true);
- landLineDiv.setOutputMarkupPlaceholderTag(true);
- infoModeDiv.add(landLineDiv);
- final WebMarkupContainer networkProviderDiv = new WebMarkupContainer(
- "networkProviderDiv");
- networkProviderDiv.add(new LocalizableLookupDropDownChoice<String>(
- "customer.networkProvider", String.class, "networkproviders",
- this, false, true, basePage.getMobiliserWebSession()
- .getLocale()).setNullValid(false).setRequired(true)
- .add(new ErrorIndicator()));
- // network provider selection to be made only for mbanking customer
- // types
- if (customer.getCustomerTypeId() != null
- && customer.getCustomerTypeId().intValue() == Constants.MBANKING_CUSTOMER_TYPE) {
- networkProviderDiv.setVisible(true);
- } else {
- networkProviderDiv.setVisible(false);
- }
- infoModeDiv.add(networkProviderDiv);
- networkProviderDiv.setOutputMarkupPlaceholderTag(true);
- form.add(infoModeDiv);
- WebMarkupContainer identityInfoDiv = new WebMarkupContainer("identityInfoDiv");
- identityInfoDiv.setVisible(true);
- List<Integer> identityTypeList = null;
- try {
- if(getBasePage().getMobiliserWebSession().getRoles().hasRole(Constants.PRIV_CST_LOGIN)){
- identityTypeList = ClientHelper.getKeysFromPreferences("identityTypes", Integer.class, configuration);
- }else{
- if(getBasePage().getMobiliserWebSession().getRoles().hasRole(Constants.PRIV_HEAD_QUARTER_AGENT )){
- identityTypeList = ClientHelper.getKeysFromPreferences("identityTypes", Integer.class, configuration);
- }
- }
- } catch (Exception ex) {
- LOG.warn("Error in loading identity types list from preferences.", ex);
- return;
- }
- final WebMarkupContainer identityInfoTitleDiv = new WebMarkupContainer("identityInfoTitleDiv");
- identityInfoDiv.add(identityInfoTitleDiv);
- identityInfoTitleDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer kvIdentityTypeDiv = new WebMarkupContainer("kvIdentityTypeDiv");
- final LocalizableLookupDropDownChoice<Integer> identityTypeDropDown = (LocalizableLookupDropDownChoice<Integer>)
- new LocalizableLookupDropDownChoice<Integer>(
- "customer.kvIdentityType", Integer.class,
- Constants.RESOURCE_BUNDLE_IDENTITYTYPES, this, false, true,
- identityTypeList,
- basePage.getMobiliserWebSession().getLocale()).setNullValid(true).setRequired(true).add(new ErrorIndicator());
- kvIdentityTypeDiv.add(identityTypeDropDown);
- kvIdentityTypeDiv.setOutputMarkupPlaceholderTag(true);
- identityInfoDiv.add(kvIdentityTypeDiv);
- final WebMarkupContainer cnicExpiryDateDiv = new WebMarkupContainer("cnicExpiryDateDiv");
- cnicExpiryDateDiv.add(new DateTextField("cnicExpiryDateField", new PropertyModel<Date>(
- this, "customer.cnicExpiryDateString"), new PatternDateConverter(
- Constants.DATE_FORMAT_PATTERN_PARSE, false)).setRequired(true)
- .add(new ErrorIndicator()));
- cnicExpiryDateDiv.setOutputMarkupPlaceholderTag(true);
- identityInfoDiv.add(cnicExpiryDateDiv);
- final WebMarkupContainer kvIdentityValueDiv = new WebMarkupContainer("kvIdentityValueDiv");
- final TextField<String> identityValueField = new TextField<String>("customer.identityValue");
- identityInfoDiv.add(identityValueField
- .add(new PatternValidator(Constants.REGEX_CNIC))
- .setRequired(true).add(Constants.stringValidatorCNIC)
- .add(new ErrorIndicator()));
- kvIdentityValueDiv.add(identityValueField);
- identityInfoDiv.add(kvIdentityValueDiv);
- kvIdentityValueDiv.setOutputMarkupPlaceholderTag(true);
- form.add(identityInfoDiv);
- //customization for Merchant Account Profile start
- final WebMarkupContainer accountProfileMerchantDiv = new WebMarkupContainer(
- "accountProfileMerchantDiv");
- accountProfileMerchantDiv.setVisible(true);
- final WebMarkupContainer monthlyExpectedDepositDiv = new WebMarkupContainer("monthlyExpectedDepositDiv");
- monthlyExpectedDepositDiv.add(new TextField<String>("customer.kycDetailsBean.monthlyExpectedDeposit")
- .setRequired(true)
- .add(new PatternValidator(Constants.REGEX_AMOUNT_12_0))
- .add(Constants.mediumStringValidator)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- //monthlyExpectedDepositDiv.setVisible(false);
- accountProfileMerchantDiv.add(monthlyExpectedDepositDiv);
- monthlyExpectedDepositDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer monthlyExpectedWithdrawalDiv = new WebMarkupContainer("monthlyExpectedWithdrawalDiv");
- monthlyExpectedWithdrawalDiv.add(new TextField<String>("customer.kycDetailsBean.monthlyExpectedWithdrawal")
- .setRequired(true)
- .add(new PatternValidator(Constants.REGEX_AMOUNT_12_0))
- .add(Constants.mediumStringValidator)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- //monthlyExpectedWithdrawalDiv.setVisible(false);
- accountProfileMerchantDiv.add(monthlyExpectedWithdrawalDiv);
- monthlyExpectedWithdrawalDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer expectedAvgBalanceDiv = new WebMarkupContainer("expectedAvgBalanceDiv");
- expectedAvgBalanceDiv.add(new TextField<String>("customer.kycDetailsBean.expectedAvgBalance")
- .setRequired(true)
- .add(new PatternValidator(Constants.REGEX_AMOUNT_12_0))
- .add(Constants.mediumStringValidator)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- //expectedAvgBalanceDiv.setVisible(false);
- accountProfileMerchantDiv.add(expectedAvgBalanceDiv);
- expectedAvgBalanceDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer annualTurnoverDiv = new WebMarkupContainer("annualTurnoverDiv");
- annualTurnoverDiv.add(new TextField<String>("customer.kycDetailsBean.annualTurnover")
- .setRequired(true)
- .add(new PatternValidator(Constants.REGEX_AMOUNT_12_0))
- .add(Constants.mediumStringValidator)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- //annualTurnoverDiv.setVisible(false);
- accountProfileMerchantDiv.add(annualTurnoverDiv);
- annualTurnoverDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer expectedMonthlyCreditSalesDiv = new WebMarkupContainer("expectedMonthlyCreditSalesDiv");
- expectedMonthlyCreditSalesDiv.add(new TextField<String>("customer.kycDetailsBean.expectedMonthlyCreditSales")
- .setRequired(true)
- .add(new PatternValidator(Constants.REGEX_AMOUNT_12_0))
- .add(Constants.mediumStringValidator)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- //expectedMonthlyCreditSalesDiv.setVisible(false);
- accountProfileMerchantDiv.add(expectedMonthlyCreditSalesDiv);
- expectedMonthlyCreditSalesDiv.setOutputMarkupPlaceholderTag(true);
- monthlyExpectedDepositDiv.addOrReplace(new Label("requiredMonthlyExpectedDeposit", "*"));
- monthlyExpectedWithdrawalDiv.addOrReplace(new Label("requiredMonthlyExpectedWithdrawal", "*"));
- expectedAvgBalanceDiv.addOrReplace(new Label("requiredExpectedAvgBalance", "*"));
- annualTurnoverDiv.addOrReplace(new Label("requiredAnnualTurnover", "*"));
- expectedMonthlyCreditSalesDiv.addOrReplace(new Label("requiredExpectedMonthlyCreditSales", "*"));
- accountProfileMerchantDiv.add(monthlyExpectedDepositDiv);
- accountProfileMerchantDiv.add(monthlyExpectedWithdrawalDiv);
- accountProfileMerchantDiv.add(expectedAvgBalanceDiv);
- accountProfileMerchantDiv.add(annualTurnoverDiv);
- accountProfileMerchantDiv.add(expectedMonthlyCreditSalesDiv);
- form.add(accountProfileMerchantDiv);
- accountProfileMerchantDiv.setOutputMarkupPlaceholderTag(true);
- //customization for Merchant Account Profile end
- //customization for Individual Account Profile start
- final WebMarkupContainer accountProfileDiv = new WebMarkupContainer(
- "accountProfileDiv");
- accountProfileDiv.setVisible(true);
- final WebMarkupContainer averageMonthlyInflowDiv = new WebMarkupContainer("averageMonthlyInflowDiv");
- averageMonthlyInflowDiv.add(new TextField<String>("customer.kycDetailsBean.averageMonthlyInflow")
- .setRequired(true)
- .add(new PatternValidator(Constants.REGEX_AMOUNT_12_0))
- .add(Constants.mediumStringValidator)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- //actualBeneficialOwnerDiv.setVisible(false);
- accountProfileDiv.add(averageMonthlyInflowDiv);
- averageMonthlyInflowDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer avergaeYearlyIncomeDiv = new WebMarkupContainer("avergaeYearlyIncomeDiv");
- avergaeYearlyIncomeDiv.add(new TextField<String>("customer.kycDetailsBean.avergaeYearlyIncome")
- .setRequired(true)
- .add(new PatternValidator(Constants.REGEX_AMOUNT_12_0))
- .add(Constants.mediumStringValidator)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- //actualBeneficialOwnerDiv.setVisible(false);
- accountProfileDiv.add(avergaeYearlyIncomeDiv);
- avergaeYearlyIncomeDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer averageMonthlyOutflowDiv = new WebMarkupContainer("averageMonthlyOutflowDiv");
- averageMonthlyOutflowDiv.add(new TextField<String>("customer.kycDetailsBean.averageMonthlyOutflow")
- .setRequired(true)
- .add(new PatternValidator(Constants.REGEX_AMOUNT_12_0))
- .add(Constants.mediumStringValidator)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- //actualBeneficialOwnerDiv.setVisible(false);
- accountProfileDiv.add(averageMonthlyOutflowDiv);
- averageMonthlyOutflowDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer averageYearlySalesDiv = new WebMarkupContainer("averageYearlySalesDiv");
- averageYearlySalesDiv.add(new TextField<String>("customer.kycDetailsBean.averageYearlySales")
- .setRequired(true)
- .add(new PatternValidator(Constants.REGEX_AMOUNT_12_0))
- .add(Constants.mediumStringValidator)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- //actualBeneficialOwnerDiv.setVisible(false);
- accountProfileDiv.add(averageYearlySalesDiv);
- averageYearlySalesDiv.setOutputMarkupPlaceholderTag(true);
- form.add(accountProfileDiv);
- accountProfileDiv.setOutputMarkupPlaceholderTag(true);
- //customization for Individual Account Profile end
- final WebMarkupContainer kycDiv = new WebMarkupContainer("kycDiv");
- kycDiv.setVisible(true);
- final WebMarkupContainer typeOfCustomer_NotCustomerTypeDiv = new WebMarkupContainer("typeOfCustomer_NotCustomerTypeDiv");
- final LocalizableLookupDropDownChoice<Integer> typeOfCustomer_NotCustomerTypeDropDown = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.typeOfCustomer_NotCustomerType", Integer.class,
- Constants.RESOURCE_BUNDLE_TYPE_OF_CUSTOMER_DESC, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- typeOfCustomer_NotCustomerTypeDiv.add(typeOfCustomer_NotCustomerTypeDropDown.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- kycDiv.add(typeOfCustomer_NotCustomerTypeDiv);
- typeOfCustomer_NotCustomerTypeDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer bankRecognitionMediumDiv = new WebMarkupContainer("bankRecognitionMediumDiv");
- final LocalizableLookupDropDownChoice<Integer> bankRecognitionMedium = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.bankRecognitionMedium", Integer.class,
- Constants.RESOURCE_BUNDLE_HEARING_MEDIUM, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- bankRecognitionMediumDiv.add(bankRecognitionMedium.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- kycDiv.add(bankRecognitionMediumDiv);
- bankRecognitionMediumDiv.setOutputMarkupPlaceholderTag(true);
- final LocalizableLookupDropDownChoice<Integer> isBeneficialAccountOwner = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.isBeneficialAccountOwner", Integer.class,
- Constants.RESOURCE_BUNDLE_BINARY_DECISION, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- kycDiv.add(isBeneficialAccountOwner.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- final WebMarkupContainer purposeOfAccountDiv = new WebMarkupContainer("purposeOfAccountDiv");
- final LocalizableLookupDropDownChoice<Integer> purposeOfAccount = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.purposeOfAccount", Integer.class,
- Constants.RESOURCE_BUNDLE_PURPOSE_OF_ACCOUNT, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- purposeOfAccountDiv.add(purposeOfAccount.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- kycDiv.add(purposeOfAccountDiv);
- purposeOfAccountDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer modeOfTransactionDiv = new WebMarkupContainer("modeOfTransactionDiv");
- final LocalizableLookupDropDownChoice<Integer> modeOfTransaction = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.modeOfTransaction", Integer.class,
- Constants.RESOURCE_BUNDLE_TXN_MODE, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- modeOfTransactionDiv.add(modeOfTransaction.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- kycDiv.add(modeOfTransactionDiv);
- modeOfTransactionDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer actualBeneficialOwnerDiv = new WebMarkupContainer("actualBeneficialOwnerDiv");
- actualBeneficialOwnerDiv.add(new TextField<String>("customer.kycDetailsBean.actualBeneficialOwner")
- .setRequired(true)
- .add(new PatternValidator(Constants.REGEX_FIRSTNAME))
- .add(Constants.mediumStringValidator)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- actualBeneficialOwnerDiv.setVisible(false);
- kycDiv.add(actualBeneficialOwnerDiv);
- actualBeneficialOwnerDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer cnicBeneficialDiv = new WebMarkupContainer("cnicBeneficialDiv");
- cnicBeneficialDiv.add(new TextField<String>("customer.kycDetailsBean.cnicBeneficial")
- .setRequired(false)
- .add(new PatternValidator(Constants.REGEX_CNIC))
- .add(Constants.mediumStringValidator)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- actualBeneficialOwnerDiv.setVisible(false);
- kycDiv.add(cnicBeneficialDiv);
- cnicBeneficialDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer relationWithApplicantDiv = new WebMarkupContainer("relationWithApplicantDiv");
- relationWithApplicantDiv.add(new TextField<String>("customer.kycDetailsBean.relationWithApplicant")
- .setRequired(false)
- .add(new PatternValidator(Constants.REGEX_FIRSTNAME))
- .add(Constants.mediumStringValidator)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new ErrorIndicator()));
- actualBeneficialOwnerDiv.setVisible(false);
- kycDiv.add(relationWithApplicantDiv);
- relationWithApplicantDiv.setOutputMarkupPlaceholderTag(true);
- //customization
- final WebMarkupContainer sourceOfIncomeDiv = new WebMarkupContainer("sourceOfIncomeDiv");
- sourceOfIncomeDiv.add(new TextField<String>("customer.kycDetailsBean.sourceOfIncome")
- .add(new PatternValidator(Constants.REGEX_FIRSTNAME))
- .add(Constants.mediumName20StringValidator)
- .setRequired(true)
- .add(Constants.mediumSimple20AttributeModifier)
- .add(new ErrorIndicator()));
- actualBeneficialOwnerDiv.setVisible(false);
- kycDiv.add(sourceOfIncomeDiv);
- sourceOfIncomeDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer accountsDiv = new WebMarkupContainer("accountTypeDiv");
- final LocalizableLookupDropDownChoice<Integer> accountsTypes = (LocalizableLookupDropDownChoice<Integer>)
- new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.accountType", Integer.class,
- Constants.RESOURCE_BUNDLE_KYC_ACCOUNTS, this, false, true,
- basePage.getMobiliserWebSession().getLocale())
- .setNullValid(false).setRequired(true)
- .add(new ErrorIndicator());
- accountsDiv.add(accountsTypes);
- kycDiv.add(accountsDiv);
- accountsDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer salaryDiv = new WebMarkupContainer("salaryDiv");
- salaryDiv.add(new TextField<String>("customer.kycDetailsBean.salary")
- .add(new PatternValidator(Constants.REGEX_AMOUNT_12_0))
- .add(Constants.mediumName20StringValidator)
- .setRequired(false)
- .add(Constants.mediumSimple20AttributeModifier)
- .add(new ErrorIndicator()));
- //actualBeneficialOwnerDiv.setVisible(false);
- kycDiv.add(salaryDiv);
- salaryDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer otherIncomeDiv = new WebMarkupContainer("otherIncomeDiv");
- otherIncomeDiv.add(new TextField<String>("customer.kycDetailsBean.otherIncome")
- .add(new PatternValidator(Constants.REGEX_AMOUNT_12_0))
- .add(Constants.mediumName20StringValidator)
- .setRequired(false)
- .add(Constants.mediumSimple20AttributeModifier)
- .add(new ErrorIndicator()));
- //actualBeneficialOwnerDiv.setVisible(false);
- kycDiv.add(otherIncomeDiv);
- otherIncomeDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer typeOfTransactionDiv = new WebMarkupContainer("typeOfTransactionDiv");
- typeOfTransactionDiv.add(new TextField<String>("customer.kycDetailsBean.typeOfTransaction")
- .add(new PatternValidator(Constants.REGEX_STRING_ALPHA_NUM_SPACE_COMMA_SLASH_UNDERSCORE_ONLY))
- .add(Constants.mediumName20StringValidator)
- .setRequired(true)
- // .setRequired(false)
- .add(Constants.mediumSimple20AttributeModifier)
- .add(new ErrorIndicator()));
- //actualBeneficialOwnerDiv.setVisible(false);
- kycDiv.add(typeOfTransactionDiv);
- typeOfTransactionDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer currentBusinessSinceDiv = new WebMarkupContainer("currentBusinessSinceDiv");
- currentBusinessSinceDiv.add(new TextField<String>("customer.kycDetailsBean.currentBusinessSince")
- .add(new PatternValidator(Constants.REGEX_STRING_ALPHA_NUM_SPACE_ONLY))
- .add(Constants.mediumName20StringValidator)
- .setRequired(true)
- // .setRequired(false)
- .add(Constants.mediumSimple20AttributeModifier)
- .add(new ErrorIndicator()));
- //actualBeneficialOwnerDiv.setVisible(false);
- kycDiv.add(currentBusinessSinceDiv);
- currentBusinessSinceDiv.setOutputMarkupPlaceholderTag(true);
- final WebMarkupContainer premisesDiv = new WebMarkupContainer("premisesDiv");
- final LocalizableLookupDropDownChoice<Integer> premisesTypes = (LocalizableLookupDropDownChoice<Integer>)
- new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.premises", Integer.class,
- Constants.RESOURCE_BUNDLE_KYC_PREMISES, this, false, true,
- basePage.getMobiliserWebSession().getLocale())
- .setNullValid(false).setRequired(true)
- .add(new ErrorIndicator());
- premisesDiv.add(premisesTypes);
- kycDiv.add(premisesDiv);
- premisesDiv.setOutputMarkupPlaceholderTag(true);
- isBeneficialAccountOwner.add(new AjaxFormComponentUpdatingBehavior("onchange") {
- private static final long serialVersionUID = 1L;
- @Override
- protected void onUpdate(AjaxRequestTarget target) {
- if(customer != null){
- if(customer.getKycDetailsBean() != null){
- if (customer.getKycDetailsBean().getIsBeneficialAccountOwner() != null){
- switch(customer.getKycDetailsBean().getIsBeneficialAccountOwner().intValue()){
- case (Constants.BINARY_DECISION_YES):
- actualBeneficialOwnerDiv.setVisible(false);
- cnicBeneficialDiv.setVisible(false);
- relationWithApplicantDiv.setVisible(false);
- kycDiv.addOrReplace(new Label("requiredActualBeneficialOwner", ""));
- kycDiv.addOrReplace(new Label("requiredCnicBeneficial", ""));
- kycDiv.addOrReplace(new Label("requiredRelationWithApplicant", ""));
- break;
- case (Constants.BINARY_DECISION_NO):
- actualBeneficialOwnerDiv.setVisible(true);
- cnicBeneficialDiv.setVisible(true);
- relationWithApplicantDiv.setVisible(true);
- kycDiv.addOrReplace(new Label("requiredActualBeneficialOwner", "*"));
- kycDiv.addOrReplace(new Label("requiredCnicBeneficial", "*"));
- kycDiv.addOrReplace(new Label("requiredRelationWithApplicant", "*"));
- break;
- default : break;
- }
- }
- else {
- }
- target.addComponent(actualBeneficialOwnerDiv);
- target.addComponent(cnicBeneficialDiv);
- target.addComponent(relationWithApplicantDiv);
- }
- }
- }
- });
- final LocalizableLookupDropDownChoice<Integer> accRelegiousOrgOrMadrassa = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.accRelegiousOrgOrMadrassa", Integer.class,
- Constants.RESOURCE_BUNDLE_HIGH_LOW_RISK, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- kycDiv.add(accRelegiousOrgOrMadrassa.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- final LocalizableLookupDropDownChoice<Integer> customerAsDirectorOrGovBody = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.customerAsDirectorOrGovBody", Integer.class,
- Constants.RESOURCE_BUNDLE_HIGH_LOW_RISK, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- kycDiv.add(customerAsDirectorOrGovBody.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- final LocalizableLookupDropDownChoice<Integer> politicalyExposed = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.politicalyExposed", Integer.class,
- Constants.RESOURCE_BUNDLE_HIGH_LOW_RISK, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- kycDiv.add(politicalyExposed.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- final LocalizableLookupDropDownChoice<Integer> houseWife = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.houseWife", Integer.class,
- Constants.RESOURCE_BUNDLE_HIGH_LOW_RISK, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- kycDiv.add(houseWife.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- final LocalizableLookupDropDownChoice<Integer> landLord = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.landLord", Integer.class,
- Constants.RESOURCE_BUNDLE_HIGH_LOW_RISK, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- kycDiv.add(landLord.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- final LocalizableLookupDropDownChoice<Integer> customerMinorAccount = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.customerMinorAccount", Integer.class,
- Constants.RESOURCE_BUNDLE_HIGH_LOW_RISK, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- kycDiv.add(customerMinorAccount.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- final LocalizableLookupDropDownChoice<Integer> refusedByOtherBank = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.refusedByOtherBank", Integer.class,
- Constants.RESOURCE_BUNDLE_HIGH_LOW_RISK, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- kycDiv.add(refusedByOtherBank.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- final LocalizableLookupDropDownChoice<Integer> customerProfesion = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.customerProfesion", Integer.class,
- Constants.RESOURCE_BUNDLE_HIGH_LOW_RISK, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- kycDiv.add(customerProfesion.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- final LocalizableLookupDropDownChoice<Integer> dealingWithHighLowRiskCountry = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.dealingWithHighLowRiskCountry", Integer.class,
- Constants.RESOURCE_BUNDLE_HIGH_LOW_RISK, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- kycDiv.add(dealingWithHighLowRiskCountry.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- final LocalizableLookupDropDownChoice<Integer> productAndServiceMappingMatch = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.productAndServiceMappingMatch", Integer.class,
- Constants.RESOURCE_BUNDLE_HIGH_LOW_RISK, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- kycDiv.add(productAndServiceMappingMatch.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- final LocalizableLookupDropDownChoice<Integer> customerResident = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.customerResident", Integer.class,
- Constants.RESOURCE_BUNDLE_HIGH_LOW_RISK, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- kycDiv.add(customerResident.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- final LocalizableLookupDropDownChoice<Integer> customerbusinessStructure = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.customerbusinessStructure", Integer.class,
- Constants.RESOURCE_BUNDLE_HIGH_LOW_RISK, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- kycDiv.add(customerbusinessStructure.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- final LocalizableLookupDropDownChoice<Integer> customerActualOwnerOfAcc = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.customerActualOwnerOfAcc", Integer.class,
- Constants.RESOURCE_BUNDLE_HIGH_LOW_RISK, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- kycDiv.add(customerActualOwnerOfAcc.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- final LocalizableLookupDropDownChoice<Integer> customerHoldMall = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.customerHoldMall", Integer.class,
- Constants.RESOURCE_BUNDLE_HIGH_LOW_RISK, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- kycDiv.add(customerHoldMall.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- final LocalizableLookupDropDownChoice<Integer> riskRating = new LocalizableLookupDropDownChoice<Integer>(
- "customer.kycDetailsBean.riskRating", Integer.class,
- Constants.RESOURCE_BUNDLE_HIGH_LOW_RISK, this, false, true,
- basePage.getMobiliserWebSession().getLocale());
- kycDiv.add(riskRating.setNullValid(true).setRequired(true).setEnabled(true).add(new ErrorIndicator()));
- kycDiv.add(new TextArea<String>("customer.kycDetailsBean.textField", new PropertyModel<String>(this, "customer.kycDetailsBean.textField"))
- .setRequired(false)
- .add(new PatternValidator(Constants.REGEX_COMMENTS))
- .add(Constants.mediumStringValidator)
- .add(Constants.mediumSimpleAttributeModifier)
- .add(new SimpleAttributeModifier("size",
- Constants.MAX_LENGTH_SEND_MONEY_TXN_TEXT))
- .add(new ErrorIndicator()));
- kycDiv.setVisible(true);
- form.add(kycDiv);
- kycDiv.setOutputMarkupPlaceholderTag(true);
- infoModeSMSEmail.add(new AjaxFormComponentUpdatingBehavior("onchange") {
- private static final long serialVersionUID = 1L;
- @Override
- protected void onUpdate(AjaxRequestTarget target) {
- emailDiv.setVisible(false);
- if(customer.getKvInfoMode() == 2 || customer.getKvInfoMode() == 3){
- emailDiv.setVisible(true);
- }
- target.addComponent(emailDiv);
- }
- });
- customertypes.add(new AjaxFormComponentUpdatingBehavior("onchange") {
- private static final long serialVersionUID = 1L;
- @Override
- protected void onUpdate(AjaxRequestTarget target) {
- if (customer.getCustomerTypeId() != null){
- kycDiv.setVisible(true);
- if(attachmentsPanel != null){
- attachmentsPanel.setVisible(true);
- }
- permanentAddressDiv.setVisible(true);
- businessAddressDiv.setVisible(false);
- switch(customer.getCustomerTypeId().intValue()){
- case (Constants.MBANKING_CUSTOMER_TYPE):
- kycDiv.setVisible(false);
- break;
- case (Constants.STANDARD_CONSUMER):
- kycDiv.setVisible(false);
- break;
- case (Constants.MERCHANT):
- break;
- case (Constants.MERCHANT_AGENT):
- kycDiv.setVisible(false);
- break;
- case (Constants.BENEFICIARY):
- kycDiv.setVisible(false);
- break;
- case (Constants.MERCHANT_HEADQUARTER):
- accountProfileDiv.setVisible(false);
- accountProfileMerchantDiv.setVisible(true);
- break;
- case (Constants.MERCHANT_DEALER):
- kycDiv.setVisible(false);
- break;
- case (Constants.CONSUMER_WITH_FEE):
- kycDiv.setVisible(false);
- break;
- case (Constants.CUSTOMER_TYPE_L1):
- case (Constants.CUSTOMER_TYPE_L0):
- kycDiv.setVisible(false);
- accountProfileDiv.setVisible(false);
- accountProfileMerchantDiv.setVisible(false);
- businessDetailDiv.setVisible(false);
- motherNameDiv.setVisible(true);
- fatherHusbandNameDiv.setVisible(true);
- placeOfBirthDiv.setVisible(true);
- mailingAddressDiv.setVisible(true);
- msisdnDiv.setVisible(true);
- kvInfoModeDiv.setVisible(true);
- landLineDiv.setVisible(true);
- kvIdentityTypeDiv.setVisible(true);
- cnicExpiryDateDiv.setVisible(true);
- kvIdentityValueDiv.setVisible(true);
- birthDateDiv.setVisible(true);
- identityInfoTitleDiv.setVisible(true);
- rolesAndPrivilegesDiv.setVisible(false);
- break;
- case (Constants.CUSTOMER_TYPE_L2_INDIVIDUAL_NEW):
- case (Constants.CUSTOMER_TYPE_L2_INDIVIDUAL_10000):
- case (Constants.CUSTOMER_TYPE_L2_INDIVIDUAL_50000):
- case (Constants.CUSTOMER_TYPE_L2_INDIVIDUAL_99999):
- case (Constants.CUSTOMER_TYPE_L2_INDIVIDUAL_500000):
- kycDiv.setVisible(true);
- accountsDiv.setVisible(false);
- businessDetailDiv.setVisible(false);
- accountProfileDiv.setVisible(true);
- accountProfileMerchantDiv.setVisible(false);
- salaryDiv.setVisible(false);
- otherIncomeDiv.setVisible(false);
- typeOfTransactionDiv.setVisible(false);
- currentBusinessSinceDiv.setVisible(false);
- premisesDiv.setVisible(false);
- motherNameDiv.setVisible(true);
- fatherHusbandNameDiv.setVisible(true);
- placeOfBirthDiv.setVisible(true);
- mailingAddressDiv.setVisible(true);
- msisdnDiv.setVisible(true);
- kvInfoModeDiv.setVisible(true);
- landLineDiv.setVisible(true);
- kvIdentityTypeDiv.setVisible(true);
- cnicExpiryDateDiv.setVisible(true);
- kvIdentityValueDiv.setVisible(true);
- birthDateDiv.setVisible(true);
- identityInfoTitleDiv.setVisible(true);
- rolesAndPrivilegesDiv.setVisible(false);
- break;
- case (Constants.CUSTOMER_TYPE_AGENT_FINJA):
- case (Constants.CUSTOMER_TYPE_L2_MERCHANT):
- kycDiv.setVisible(true);
- businessDetailDiv.setVisible(true);
- permanentAddressDiv.setVisible(false);
- accountProfileDiv.setVisible(false);
- accountProfileMerchantDiv.setVisible(true);
- salaryDiv.setVisible(true);
- otherIncomeDiv.setVisible(true);
- typeOfTransactionDiv.setVisible(true);
- currentBusinessSinceDiv.setVisible(true);
- premisesDiv.setVisible(true);
- accountsDiv.setVisible(true);
- typeOfCustomer_NotCustomerTypeDiv.setVisible(false);
- purposeOfAccountDiv.setVisible(false);
- bankRecognitionMediumDiv.setVisible(false);
- modeOfTransactionDiv.setVisible(false);
- motherNameDiv.setVisible(true);
- fatherHusbandNameDiv.setVisible(true);
- placeOfBirthDiv.setVisible(true);
- mailingAddressDiv.setVisible(true);
- msisdnDiv.setVisible(true);
- kvInfoModeDiv.setVisible(true);
- landLineDiv.setVisible(true);
- kvIdentityTypeDiv.setVisible(true);
- cnicExpiryDateDiv.setVisible(true);
- kvIdentityValueDiv.setVisible(true);
- birthDateDiv.setVisible(true);
- identityInfoTitleDiv.setVisible(true);
- rolesAndPrivilegesDiv.setVisible(false);
- break;
- case (Constants.CUSTOMER_TYPE_CST_SUB_AGENT):
- kycDiv.setVisible(false);
- businessDetailDiv.setVisible(false);
- businessAddressDiv.setVisible(false);
- permanentAddressDiv.setVisible(false);
- accountProfileDiv.setVisible(false);
- accountProfileMerchantDiv.setVisible(false);
- salaryDiv.setVisible(false);
- otherIncomeDiv.setVisible(false);
- typeOfTransactionDiv.setVisible(false);
- currentBusinessSinceDiv.setVisible(false);
- premisesDiv.setVisible(false);
- accountsDiv.setVisible(false);
- typeOfCustomer_NotCustomerTypeDiv.setVisible(false);
- purposeOfAccountDiv.setVisible(false);
- bankRecognitionMediumDiv.setVisible(false);
- modeOfTransactionDiv.setVisible(false);
- motherNameDiv.setVisible(false);
- fatherHusbandNameDiv.setVisible(false);
- placeOfBirthDiv.setVisible(false);
- mailingAddressDiv.setVisible(false);
- msisdnDiv.setVisible(false);
- kvInfoModeDiv.setVisible(false);
- landLineDiv.setVisible(false);
- kvIdentityTypeDiv.setVisible(false);
- cnicExpiryDateDiv.setVisible(false);
- kvIdentityValueDiv.setVisible(false);
- birthDateDiv.setVisible(false);
- identityInfoTitleDiv.setVisible(false);
- rolesAndPrivilegesDiv.setVisible(true);
- break;
- case (Constants.CUSTOMER_TYPE_GUEST):
- kycDiv.setVisible(false);
- attachmentsPanel.setVisible(false);
- break;
- default :
- break;
- }
- }else{
- }
- target.addComponent(kycDiv);
- target.addComponent(accountProfileDiv);
- target.addComponent(accountProfileMerchantDiv);
- target.addComponent(businessDetailDiv);
- target.addComponent(permanentAddressDiv);
- target.addComponent(businessNameDiv);
- target.addComponent(ntnNumberDiv);
- target.addComponent(businessAddressDiv);
- target.addComponent(salaryDiv);
- target.addComponent(otherIncomeDiv);
- target.addComponent(typeOfTransactionDiv);
- target.addComponent(currentBusinessSinceDiv);
- target.addComponent(premisesDiv);
- target.addComponent(monthlyExpectedDepositDiv);
- target.addComponent(monthlyExpectedWithdrawalDiv);
- target.addComponent(expectedAvgBalanceDiv);
- target.addComponent(annualTurnoverDiv);
- target.addComponent(expectedMonthlyCreditSalesDiv);
- target.addComponent(averageMonthlyInflowDiv);
- target.addComponent(averageMonthlyOutflowDiv);
- target.addComponent(averageYearlySalesDiv);
- target.addComponent(avergaeYearlyIncomeDiv);
- target.addComponent(typeOfCustomer_NotCustomerTypeDiv);
- target.addComponent(purposeOfAccountDiv);
- target.addComponent(bankRecognitionMediumDiv);
- target.addComponent(modeOfTransactionDiv);
- target.addComponent(infoModeSMSEmail);
- target.addComponent(motherNameDiv);
- target.addComponent(fatherHusbandNameDiv);
- target.addComponent(placeOfBirthDiv);
- target.addComponent(msisdnDiv);
- target.addComponent(kvInfoModeDiv);
- target.addComponent(landLineDiv);
- target.addComponent(kvIdentityTypeDiv);
- target.addComponent(cnicExpiryDateDiv);
- target.addComponent(kvIdentityValueDiv);
- target.addComponent(birthDateDiv);
- target.addComponent(mailingAddressDiv);
- target.addComponent(identityInfoTitleDiv);
- if(attachmentsPanel != null){
- target.addComponent(attachmentsPanel);
- }
- }
- });
- // adding captcha and terms and conditions
- WebMarkupContainer signUpDiv = new WebMarkupContainer("signUpDiv");
- final CaptchaImage captchaImage = new CaptchaImage("captchaImage");
- captchaImage.setOutputMarkupId(true);
- captchTextField = new RequiredTextField<Object>("captcha") {
- private static final long serialVersionUID = 1L;
- @Override
- protected void onComponentTag(final ComponentTag tag) {
- super.onComponentTag(tag);
- if (form.hasError() && !this.hasErrorMessage())
- tag.put("value", "");
- }
- };
- captchTextField.add(new CaptchaValidator());
- captchTextField.add(new ErrorIndicator());
- signUpDiv.add(captchTextField);
- signUpDiv.add(new AjaxFallbackLink<Object>("captchLink") {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- @Override
- public void onClick(AjaxRequestTarget target) {
- captchaImage.detach();
- if (target != null) {
- target.addComponent(captchaImage);
- } else {
- // javascript is disabled
- }
- }
- }.add(captchaImage));
- try {
- if (!PortalUtils.exists(basePage.getMobiliserWebSession()
- .getLoggedInCustomer())) {
- listTermAndCondition = servicePackagesClientLogic
- .getDefaultTermAndConditions(
- customer.getCustomerTypeId(),
- customer.getOrgUnitId());
- }
- } catch (Exception e) {
- LOG.error(
- "# An error has occurred while loading TermAndConditions",
- e);
- error(getLocalizer().getString(
- "customerRegistration.TermAndCondition.error", this));
- }
- WebMarkupContainer tncsDiv = new WebMarkupContainer("tncsDiv");
- tncsDiv.setOutputMarkupId(true);
- tncsDiv.setOutputMarkupPlaceholderTag(true);
- ListView<TermAndCondition> listView = new ListView<TermAndCondition>(
- "tncs", listTermAndCondition) {
- private static final long serialVersionUID = 1L;
- @Override
- protected void populateItem(ListItem<TermAndCondition> item) {
- TermAndCondition entry = item.getModelObject();
- // Select box
- AjaxCheckBox selectedCheckBox = new AjaxCheckBoxImpl(
- "selected", new Model<Boolean>(new Boolean(
- isSelected(entry))), entry);
- Label asterik = null;
- Label label = new Label("conditions", entry.getTncText());
- item.add(label);
- item.add(selectedCheckBox);
- if (entry.isMandatory()) {
- asterik = new Label("asterik", "*");
- requiredTermAndConditions.add(entry);
- asterik.add(new SimpleAttributeModifier("class", "required"));
- }
- if (!PortalUtils.exists(asterik)) {
- asterik = new Label("asterik", "");
- asterik.add(new SimpleAttributeModifier("class",
- "paddingLeft"));
- }
- item.add(asterik);
- }
- private boolean isSelected(TermAndCondition entry) {
- return selectedTermAndConditions.contains(entry);
- }
- class AjaxCheckBoxImpl extends AjaxCheckBox {
- private static final long serialVersionUID = 1L;
- private final TermAndCondition entry;
- public AjaxCheckBoxImpl(String id, IModel<Boolean> model,
- TermAndCondition entry) {
- super(id, model);
- this.entry = entry;
- }
- @Override
- public boolean isEnabled() {
- return true;
- }
- @Override
- protected void onComponentTag(final ComponentTag tag) {
- super.onComponentTag(tag);
- if (getModelObject().booleanValue()) {
- tag.put("checked", "checked");
- }
- }
- @Override
- protected void onUpdate(AjaxRequestTarget target) {
- boolean checkBoxSelected = getModelObject().booleanValue();
- if (checkBoxSelected) {
- LOG.info("Added {} to deletion list",
- entry.getTncVersionId());
- selectedTermAndConditions.add(entry);
- } else {
- LOG.info("Removed {} from deletion list",
- entry.getTncVersionId());
- selectedTermAndConditions.remove(entry);
- }
- }
- }
- };
- if (!PortalUtils.exists(listTermAndCondition)) {
- tncsDiv.setVisible(false);
- }
- tncsDiv.add(listView);
- signUpDiv.add(tncsDiv);
- form.add(signUpDiv);
- WebMarkupContainer signupButtons = new WebMarkupContainer(
- "signupButtons");
- signupButtons.setVisible(true);
- signupButtons.add(new Button("continue") {
- private static final long serialVersionUID = 1L;
- @Override
- public void onSubmit() {
- if (isEligible()) {
- continueSignUp();
- } else {
- return;
- }
- };
- });
- signupButtons.add(new Button("back") {
- private static final long serialVersionUID = 1L;
- @Override
- public void onSubmit() {
- handleBack();
- };
- }.setDefaultFormProcessing(false));
- signupButtons.add(new Button("cancelSignup") {
- private static final long serialVersionUID = 1L;
- @Override
- public void onSubmit() {
- handleCancel();
- };
- }.setDefaultFormProcessing(false));
- form.add(signupButtons);
- WebMarkupContainer cstButtons = new WebMarkupContainer("cstButtons");
- cstButtons.setVisible(true);
- cstButtons.add(new Button("register") {
- private static final long serialVersionUID = 1L;
- @Override
- public void onSubmit() {
- if (isEligible()||customer.getCustomerTypeId()==Constants.CUSTOMER_TYPE_CST_SUB_AGENT) {
- continueRegistration();
- } else {
- return;
- }
- };
- });
- form.add(cstButtons);
- WebMarkupContainer dppButtons = new WebMarkupContainer("dppButtons");
- dppButtons.setVisible(true);
- dppButtons.add(new Button("cancel") {
- private static final long serialVersionUID = 1L;
- @Override
- public void onSubmit() {
- setResponsePage(systemCustomerClient.getMobiliserApplication()
- .getPage(SelfCareHomePage.class));
- };
- }.setDefaultFormProcessing(false));
- dppButtons.add(new Button("save") {
- private static final long serialVersionUID = 1L;
- @Override
- public void onSubmit() {
- try {
- if (!isEligible()) {
- return;
- }
- if(customer.getCustomerTypeId() == Constants.CUSTOMER_TYPE_GUEST){
- LOG.info("In case for guest, we will skip the attachments");
- }else{
- }
- customer.setUserName(customer.getAddress().getEmail());
- LOG.info("Setting the username {} and email id {} ", new Object[]{customer.getUserName(), customer.getAddress().getEmail()});
- if(!isEligibleCNICExpiry()){
- return;
- }
- if (!systemCustomerClient.uniqueIdentificationCheck(
- getCustomer().getMsisdn(),
- Constants.IDENT_TYPE_MSISDN, getCustomer().getId(),
- configuration.getCountryCode()))
- return;
- if(getCustomer().getUserName() != null){
- if (!systemCustomerClient.uniqueIdentificationCheck(
- getCustomer().getUserName(),
- Constants.IDENT_TYPE_USERNAME, getCustomer()
- .getId(), configuration.getCountryCode()))
- return;
- }
- saveCustomer();
- } catch (Exception e) {
- LOG.error(
- "#An error occurred while registering a customer",
- e);
- error(getLocalizer().getString("register.customer.error",
- this));
- }
- }
- @SuppressWarnings("unused")
- private boolean checkAttachments() {
- if (attachmentsPanel.getAttachments().isEmpty())
- return false;
- else
- return true;
- };
- });
- form.add(dppButtons);
- // field toggling for CST
- if (getBasePage().getMobiliserWebSession().getRoles().hasRole(Constants.PRIV_CST_LOGIN)) {
- titleDiv.setVisible(false);
- dppButtons.setVisible(false);
- signupButtons.setVisible(false);
- signUpDiv.setVisible(false);
- identityTypeDropDown.setRequired(true);
- kvIdentityTypeDiv.addOrReplace(new Label("requiredIdentityType", "*"));
- identityValueField.setRequired(false);
- identityValueField.setRequired(true);
- kycDiv.setVisible(true);
- businessDetailDiv.setVisible(false);
- accountProfileDiv.setVisible(false);
- accountProfileMerchantDiv.setVisible(false);
- motherNameDiv.setVisible(true);
- fatherHusbandNameDiv.setVisible(true);
- placeOfBirthDiv.setVisible(true);
- mailingAddressDiv.setVisible(true);
- msisdnDiv.setVisible(true);
- kvInfoModeDiv.setVisible(true);
- landLineDiv.setVisible(true);
- kvIdentityTypeDiv.setVisible(true);
- cnicExpiryDateDiv.setVisible(true);
- kvIdentityValueDiv.setVisible(true);
- birthDateDiv.setVisible(true);
- identityInfoTitleDiv.setVisible(true);
- rolesAndPrivilegesDiv.setVisible(true);
- // Here we make the KYC fields mandatory
- kycDiv.addOrReplace(new Label("requiredIsBeneficialAccountOwner", "*"));
- typeOfCustomer_NotCustomerTypeDiv.addOrReplace(new Label("requiredTypeOfCustomer_NotCustomerType", "*"));
- bankRecognitionMediumDiv.addOrReplace(new Label("requiredBankRecognitionMedium", "*"));
- purposeOfAccountDiv.addOrReplace(new Label("requiredPurposeOfAccount", "*"));
- modeOfTransactionDiv.addOrReplace(new Label("requiredModeOfTransaction", "*"));
- actualBeneficialOwnerDiv.addOrReplace(new Label("requiredActualBeneficialOwner", "*"));
- averageMonthlyInflowDiv.addOrReplace(new Label("requiredAverageMonthlyInflow", "*"));
- avergaeYearlyIncomeDiv.addOrReplace(new Label("requiredAvergaeYearlyIncome", "*"));
- cnicBeneficialDiv.addOrReplace(new Label("requiredCnicBeneficial", "*"));
- relationWithApplicantDiv.addOrReplace(new Label("requiredRelationWithApplicant", "*"));
- averageMonthlyOutflowDiv.addOrReplace(new Label("requiredAverageMonthlyOutflow", "*"));
- averageYearlySalesDiv.addOrReplace(new Label("requiredAverageYearlySales", "*"));
- sourceOfIncomeDiv.addOrReplace(new Label("requiredSourceOfIncome", "*"));
- typeOfTransactionDiv.addOrReplace(new Label("requiredTypeOfTransaction", "*"));
- currentBusinessSinceDiv.addOrReplace(new Label("requiredCurrentBusinessSince", "*"));
- premisesDiv.addOrReplace(new Label("requiredPremises", "*"));
- kycDiv.add(actualBeneficialOwnerDiv);
- kycDiv.add(cnicBeneficialDiv);
- kycDiv.add(relationWithApplicantDiv);
- accountProfileDiv.add(averageMonthlyOutflowDiv);
- accountProfileDiv.add(averageYearlySalesDiv);
- accountProfileDiv.add(averageMonthlyInflowDiv);
- accountProfileDiv.add(avergaeYearlyIncomeDiv);
- kycDiv.add(sourceOfIncomeDiv);
- kycDiv.add(typeOfTransactionDiv);
- kycDiv.add(currentBusinessSinceDiv);
- kycDiv.add(premisesDiv);
- kycDiv.addOrReplace(new Label("requiredAccRelegiousOrgOrMadrassa", "*"));
- kycDiv.addOrReplace(new Label("requiredPoliticalyExposed", "*"));
- kycDiv.addOrReplace(new Label("requiredLandLord", "*"));
- kycDiv.addOrReplace(new Label("requiredRefusedByOtherBank", "*"));
- kycDiv.addOrReplace(new Label("requiredDealingWithHighLowRiskCountry", "*"));
- kycDiv.addOrReplace(new Label("requiredCustomerResident", "*"));
- kycDiv.addOrReplace(new Label("requiredCustomerActualOwnerOfAcc", "*"));
- kycDiv.addOrReplace(new Label("requiredRiskRating", "*"));
- kycDiv.addOrReplace(new Label("requiredCustomerAsDirectorOrGovBody", "*"));
- kycDiv.addOrReplace(new Label("requiredHouseWife", "*"));
- kycDiv.addOrReplace(new Label("requiredCustomerMinorAccount", "*"));
- kycDiv.addOrReplace(new Label("requiredCustomerProfesion", "*"));
- kycDiv.addOrReplace(new Label("requiredProductAndServiceMappingMatch", "*"));
- kycDiv.addOrReplace(new Label("requiredCustomerbusinessStructure", "*"));
- kycDiv.addOrReplace(new Label("requiredCustomerHoldMall", "*"));
- kycDiv.addOrReplace(new Label("requiredTextField", "*"));
- } else if (getBasePage().getMobiliserWebSession().getRoles().hasRole(Constants.PRIV_MERCHANT_LOGIN)) {
- titleDiv.setVisible(false);
- identityInfoDiv.setVisible(true);
- infoModeDiv.setVisible(true);
- cstButtons.setVisible(false);
- accountProfileDiv.setVisible(false);
- accountProfileMerchantDiv.setVisible(true);
- customerTypeDiv.setVisible(true);
- signupButtons.setVisible(false);
- signUpDiv.setVisible(false);
- identityTypeDropDown.setRequired(true);
- kycDiv.setVisible(false);
- kvIdentityTypeDiv.addOrReplace(new Label("requiredIdentityType", "*"));
- identityValueField.setRequired(true);
- businessAddressDiv.setVisible(false);
- accountProfileDiv.setVisible(false);
- accountProfileMerchantDiv.setVisible(false);
- businessDetailDiv.setVisible(false);
- motherNameDiv.setVisible(true);
- fatherHusbandNameDiv.setVisible(true);
- placeOfBirthDiv.setVisible(true);
- mailingAddressDiv.setVisible(true);
- msisdnDiv.setVisible(true);
- kvInfoModeDiv.setVisible(true);
- landLineDiv.setVisible(true);
- kvIdentityTypeDiv.setVisible(true);
- cnicExpiryDateDiv.setVisible(true);
- kvIdentityValueDiv.setVisible(true);
- birthDateDiv.setVisible(true);
- identityInfoTitleDiv.setVisible(true);
- rolesAndPrivilegesDiv.setVisible(true);
- if(getBasePage().getMobiliserWebSession().getRoles().hasRole(Constants.PRIV_HEAD_QUARTER_AGENT)){
- kycDiv.setVisible(true);
- // Here we make the KYC fields mandatory
- kycDiv.addOrReplace(new Label("requiredIsBeneficialAccountOwner", "*"));
- typeOfCustomer_NotCustomerTypeDiv.addOrReplace(new Label("requiredTypeOfCustomer_NotCustomerType", "*"));
- bankRecognitionMediumDiv.addOrReplace(new Label("requiredBankRecognitionMedium", "*"));
- purposeOfAccountDiv.addOrReplace(new Label("requiredPurposeOfAccount", "*"));
- modeOfTransactionDiv.addOrReplace(new Label("requiredModeOfTransaction", "*"));
- actualBeneficialOwnerDiv.addOrReplace(new Label("requiredActualBeneficialOwner", "*"));
- averageMonthlyInflowDiv.addOrReplace(new Label("requiredAverageMonthlyInflow", "*"));
- avergaeYearlyIncomeDiv.addOrReplace(new Label("requiredAvergaeYearlyIncome", "*"));
- cnicBeneficialDiv.addOrReplace(new Label("requiredCnicBeneficial", "*"));
- relationWithApplicantDiv.addOrReplace(new Label("requiredRelationWithApplicant", "*"));
- averageMonthlyOutflowDiv.addOrReplace(new Label("requiredAverageMonthlyOutflow", "*"));
- averageYearlySalesDiv.addOrReplace(new Label("requiredAverageYearlySales", "*"));
- sourceOfIncomeDiv.addOrReplace(new Label("requiredSourceOfIncome", "*"));
- typeOfTransactionDiv.addOrReplace(new Label("requiredTypeOfTransaction", "*"));
- currentBusinessSinceDiv.addOrReplace(new Label("requiredCurrentBusinessSince", "*"));
- premisesDiv.addOrReplace(new Label("requiredPremises", "*"));
- kycDiv.add(actualBeneficialOwnerDiv);
- kycDiv.add(cnicBeneficialDiv);
- kycDiv.add(relationWithApplicantDiv);
- kycDiv.addOrReplace(new Label("requiredAccRelegiousOrgOrMadrassa", "*"));
- kycDiv.addOrReplace(new Label("requiredPoliticalyExposed", "*"));
- kycDiv.addOrReplace(new Label("requiredLandLord", "*"));
- kycDiv.addOrReplace(new Label("requiredRefusedByOtherBank", "*"));
- kycDiv.addOrReplace(new Label("requiredDealingWithHighLowRiskCountry", "*"));
- kycDiv.addOrReplace(new Label("requiredCustomerResident", "*"));
- kycDiv.addOrReplace(new Label("requiredCustomerActualOwnerOfAcc", "*"));
- kycDiv.addOrReplace(new Label("requiredRiskRating", "*"));
- kycDiv.addOrReplace(new Label("requiredCustomerAsDirectorOrGovBody", "*"));
- kycDiv.addOrReplace(new Label("requiredHouseWife", "*"));
- kycDiv.addOrReplace(new Label("requiredCustomerMinorAccount", "*"));
- kycDiv.addOrReplace(new Label("requiredCustomerProfesion", "*"));
- kycDiv.addOrReplace(new Label("requiredProductAndServiceMappingMatch", "*"));
- kycDiv.addOrReplace(new Label("requiredCustomerbusinessStructure", "*"));
- kycDiv.addOrReplace(new Label("requiredCustomerHoldMall", "*"));
- kycDiv.addOrReplace(new Label("requiredTextField", "*"));
- }
- } else {
- cstButtons.setVisible(false);
- dppButtons.setVisible(false);
- kvIdentityTypeDiv.addOrReplace(new Label("requiredIdentityType", "*"));
- identityValueField.setRequired(true);
- // identityInfoDiv.addOrReplace(new Label("requiredIdentityValue", "*"));
- customerTypeDiv.setVisible(false);
- kycDiv.setVisible(false);
- }
- form.add(new TooltipBehavior());
- add(form);
- }
- protected void saveCustomer() {
- LOG.debug("#RegisterCustomerPanel.next()");
- CustomerBean merchantCustomer = new CustomerBean();
- Customer merchantCust = new Customer();
- try {
- if (!systemCustomerClient.uniqueIdentificationCheck(
- (getCustomer().getMsisdn()), Constants.IDENT_TYPE_MSISDN,
- getCustomer().getId(), configuration.getCountryCode())) {
- return;
- }
- if(!ValidationUtils.isMobileNumberValid(getCustomer().getMsisdn())){
- error(getLocalizer().getString("invalid.mobileNo.format.error", this));
- return;
- }
- if(!systemCustomClient.uniqueCNICCheck(getCustomer().getIdentityValue())){
- LOG.info("duplicate CNIC found in database, returning");
- error(getLocalizer().getString("customer.duplicate.cnic.error", this));
- return;
- }
- if(customer.getKvInfoMode() == 0 || customer.getKvInfoMode() == 1){
- if(customer.getAddress() != null){
- LOG.info("Setting email to null since the user selected the other option");
- customer.getAddress().setEmail("");
- }
- }
- customer.setRiskCategoryId(null);
- customer.getAddress().setKvCountry(customer.getKvCountry());
- List<String> privList = systemCustomerSecurityClient
- .getDefaultPrivileges(customer.getCustomerTypeId(),
- customer.getRiskCategoryId());
- if(basePage.getMobiliserWebSession().hasPrivilege(Constants.PRIV_HEAD_QUARTER_AGENT)
- || basePage.getMobiliserWebSession().hasPrivilege(Constants.PRIV_MERCHANT_LOGIN)){
- LOG.info("Logged in Customer : "+basePage.getMobiliserWebSession().getLoggedInCustomer().getCustomerId());
- if (basePage.getMobiliserWebSession().getLoggedInCustomer() != null) {
- LOG.info("Logger in Customer : "+basePage.getMobiliserWebSession().getLoggedInCustomer().getCustomerId());
- merchantCust = systemCustomerClient.getCustomerDetails(basePage.getMobiliserWebSession().getLoggedInCustomer().getCustomerId());
- merchantCustomer = Converter.getInstance(configuration).getCustomerBeanFromCustomer(merchantCust);
- LOG.info("Successfully got the Merchant Bean with customer ID : "+merchantCustomer.getId());
- if(customer.getCustomerTypeId() == Constants.CUSTOMER_TYPE_GUEST || customer.getCustomerTypeId() == Constants.CUSTOMER_TYPE_L0
- || customer.getCustomerTypeId() == Constants.CUSTOMER_TYPE_L1){
- LOG.info("Skipping the setting parent and hirarchy part.");
- }
- else{
- customer.setParentId(basePage.getMobiliserWebSession().getLoggedInCustomer().getCustomerId());
- customer.setHierarchyLevel(merchantCustomer.getHierarchyLevel() + 1);
- }
- }
- if (!basePage.getMobiliserWebSession().hasPrivilege(Constants.PRIV_ACTIVATE_DESCENDANTS)) {
- if (!basePage.getMobiliserWebSession().hasPrivilege(Constants.PRIV_CREATE_ACTIVE_DESCENDANTS)) {
- customer.setBlackListReason(Constants.PENDING_REG_MERCHANT_BLACKLSTREASON);
- } else {
- customer.setBlackListReason(Constants.DEFAULT_MERCHANT_BLACKLSTREASON);
- }
- } else {
- customer.setBlackListReason(Constants.DEFAULT_MERCHANT_BLACKLSTREASON);
- }
- LOG.info("setting the Customer type : "+customer.getCustomerTypeId());
- //customer.setCustomerTypeId(Constants.CUSTOMER_TYPE_MERCHANT);
- LOG.info("getting name as per cnic : "+customer.getAddress().getNameAsPerCNIC());
- customer.setLoggedInCustomer(String.valueOf(basePage.getMobiliserWebSession().getLoggedInCustomer().getCustomerId()));
- LOG.info("LoggedInCustomer Before calling CustomerClientLogic.createFullCustomer()"+basePage.getMobiliserWebSession().getLoggedInCustomer().getCustomerId());
- customer = selfCustomerClient.createFullCustomer(customer,
- getAttachments(), privList, null, configuration, null);
- /// customization by NoumanZaidi for Notifications
- sendSMSNotification();
- //
- }
- else{
- if(basePage.getMobiliserWebSession().hasPrivilege(Constants.PRIV_CST_LOGIN)){
- LOG.info("setting the Customer type : "+customer.getCustomerTypeId());
- LOG.info("getting name as per cnic : "+customer.getAddress().getNameAsPerCNIC());
- customer.setLoggedInCustomer(String.valueOf(basePage.getMobiliserWebSession().getLoggedInCustomer().getCustomerId()));
- LOG.info("LoggedInCustomer Before calling CustomerClientLogic.createFullCustomer()"+basePage.getMobiliserWebSession().getLoggedInCustomer().getCustomerId());
- customer = systemCustomerClient.createFullCustomer(customer,
- getAttachments(), privList, null, configuration, null);
- /*if(customer.getKvIdentityType()==4){
- customer
- }*/
- /// customization by NoumanZaidi for Notifications
- sendSMSNotification();
- //
- }
- }
- if (PortalUtils.exists(customer)) {
- if (customer.isPendingApproval()) {
- /// customization by NoumanZaidi for Notifications
- sendSMSNotification();
- //
- customer = null;
- info(getLocalizer().getString("pendingApproval.msg", this));
- setResponsePage(basePage);
- } else {
- info("Customer created successfully");
- getBasePage().getMobiliserWebSession()
- .setCustomer(customer);
- customer.setMsisdn(new PhoneNumber(customer.getMsisdn())
- .getInternationalFormat());
- customer.setDisplayName(systemCustomerClient
- .createDisplayName(customer.getAddress()
- .getFirstName(), customer.getAddress().getMiddleName(),
- customer.getAddress().getLastName()));
- if (getBasePage().getMobiliserWebSession().getRoles()
- .hasRole(Constants.PRIV_HEAD_QUARTER_AGENT)){
- // setResponsePage(systemCustomerClient.getMobiliserApplication().getPageInstance(AgentUmgrHandlingPage.class));
- setResponsePage(systemCustomerClient.getMobiliserApplication().getPageInstance(
- com.sybase365.mobiliser.web.distributor.pages.agentcare.CommissionManagementPage.class));
- }else{
- if (getBasePage().getMobiliserWebSession().getRoles()
- .hasRole(Constants.PRIV_MERCHANT_LOGIN)) {
- if(getCustomer().getCustomerTypeId() == Constants.CUSTOMER_TYPE_MERCHANT_AGENT
- || getCustomer().getCustomerTypeId() == Constants.CUSTOMER_TYPE_MERCHANT_DEALER){
- LOG.info("This is the request for Agent or a Dealer");
- setResponsePage(systemCustomerClient.getMobiliserApplication().getPageInstance(
- com.sybase365.mobiliser.web.distributor.pages.agentcare.CommissionManagementPage.class));
- }else{
- LOG.info("The created customer is a Customer , Not an agent or dealer");
- setResponsePage(systemCustomerClient.getMobiliserApplication().getPageInstance(CustomerDetailsPage.class));
- /// customization by NoumanZaidi for Notifications
- sendSMSNotification();
- //
- }
- }
- else{
- if (getBasePage().getMobiliserWebSession().getRoles()
- .hasRole(Constants.PRIV_CST_LOGIN)){
- setResponsePage(systemCustomerClient.getMobiliserApplication().getPageInstance(StandingDataPage.class, getCustomer()));
- }
- }
- }
- }
- }
- } catch (Exception e) {
- LOG.error("# An error has occurred for register customer ", e);
- error(getLocalizer().getString("customerRegistration.error", this));
- }
- }
- public MobiliserBasePage getBasePage() {
- return basePage;
- }
- public void setBasePage(MobiliserBasePage basePage) {
- this.basePage = basePage;
- }
- public CustomerBean getCustomer() {
- return customer;
- }
- public void setCustomer(CustomerBean customer) {
- this.customer = customer;
- }
- public List<Attachment> getAttachments() {
- List<Attachment> attachments = attachmentsPanel.getAttachments();
- LOG.info("in getAttachments() function : "+attachments);
- if (attachments == null) {
- attachments = new ArrayList<Attachment>();
- }
- LOG.info("Return Attachment is : "+attachments);
- return attachments;
- }
- protected WebPage getTnCPage() {
- LOG.debug("#RegisterCustomerPanel.getTnCPage()");
- String className = "com.sybase365.mobiliser.web.consumer.pages.signup."
- + "TermsAndConditions_"
- + getBasePage().getMobiliserWebSession().getLocale()
- .getLanguage();
- WebPage wp = new TermsAndConditions_en();
- try {
- Class<?> classObj = Class.forName(className);
- wp = (WebPage) classObj.newInstance();
- } catch (ClassNotFoundException e) {
- LOG.error("# Class not Found Exception", e);
- } catch (IllegalAccessException e) {
- LOG.error("# IllegalAccessException", e);
- } catch (InstantiationException e) {
- LOG.error("# InstantiationException", e);
- }
- return wp;
- }
- protected void handleBack() {
- LOG.debug("#RegisterCustomerPanel.handleBack()");
- setResponsePage(systemCustomerClient.getMobiliserApplication()
- .getPageInstance(SignupStartPage.class));
- }
- protected void handleCancel() {
- LOG.debug("#RegisterCustomerPanel.handleCancel()");
- setResponsePage(systemCustomerClient.getMobiliserApplication()
- .getPageInstance(SignupCancelPage.class));
- }
- @SuppressWarnings("boxing")
- protected void continueSignUp() {
- try {
- if (!selectedTermAndConditions
- .containsAll(requiredTermAndConditions)) {
- error(getLocalizer().getString(
- "customer.acceptMandatoryTnc.error", this));
- return;
- }
- if (!systemCustomerClient.uniqueIdentificationCheck(getCustomer()
- .getMsisdn(), Constants.IDENT_TYPE_MSISDN, getCustomer()
- .getId(), configuration.getCountryCode()))
- return;
- // if (getBasePage().duplicateUsernameCheck(customer))
- // return;
- if (!systemCustomerClient.uniqueIdentificationCheck(getCustomer()
- .getUserName(), Constants.IDENT_TYPE_USERNAME,
- getCustomer().getId(), configuration.getCountryCode()))
- return;
- if (!systemCustomerSecurityClient.checkPasswordStrength(customer))
- return;
- if (!systemCustomerSecurityClient.checkPinStrength(customer))
- return;
- List<Long> selectedList = new ArrayList<Long>();
- if (PortalUtils.exists(selectedTermAndConditions)) {
- for (TermAndCondition l : selectedTermAndConditions)
- selectedList.add(l.getTncVersionId());
- }
- setResponsePage(systemCustomerClient.getMobiliserApplication()
- .getPageInstance(ConfirmDataPage.class, customer,
- this.getWebPage(), selectedList));
- } catch (Exception e) {
- LOG.error("#An error occurred while registering a customer", e);
- error(getLocalizer().getString("register.customer.error", this));
- }
- }
- protected void continueRegistration() {
- try {
- customer.setUserName(customer.getAddress().getEmail());
- LOG.info("username is set to {} from {} ", new Object[]{customer.getUserName(), customer.getAddress().getEmail()} );
- if( ( customer.getCustomerTypeId() == Constants.CUSTOMER_TYPE_MERCHANT ||
- customer.getCustomerTypeId() == Constants.CUSTOMER_TYPE_AGENT_FINCA_BRANCH ||
- customer.getCustomerTypeId() == Constants.CUSTOMER_TYPE_MERCHANT_HEADQUARTER ||
- customer.getCustomerTypeId() == Constants.CUSTOMER_TYPE_CST_SUB_AGENT )
- && (customer.getUserName() == null || customer.getUserName().isEmpty()) ){
- LOG.info("We have to make sure that the user gives email address in any case");
- error(getLocalizer().getString("email.is.mandatory.error", this));
- return;
- }
- //adding exception for cst users
- if(!(customer.getCustomerTypeId()==Constants.CUSTOMER_TYPE_CST_SUB_AGENT))
- {
- if (!systemCustomerClient.uniqueIdentificationCheck(getCustomer()
- .getMsisdn(), Constants.IDENT_TYPE_MSISDN, getCustomer()
- .getId(), configuration.getCountryCode()))
- return;
- }
- if(getCustomer().getUserName()!=null){
- if (!systemCustomerClient.uniqueIdentificationCheck(getCustomer()
- .getUserName(), Constants.IDENT_TYPE_USERNAME,
- getCustomer().getId(), configuration.getCountryCode())){
- LOG.info("Username already taken, please select some other username");
- error(getLocalizer().getString("username.duplicate.error", this));
- return;
- }
- }
- //adding exception for cst users
- if(!(customer.getCustomerTypeId()==Constants.CUSTOMER_TYPE_CST_SUB_AGENT))
- {
- if(!ValidationUtils.isMobileNumberValid(getCustomer().getMsisdn())){
- error(getLocalizer().getString("invalid.mobileNo.format.error", this));
- return;
- }
- if(!systemCustomClient.uniqueCNICCheck(getCustomer().getIdentityValue())){
- LOG.info("duplicate CNIC found in database, returning");
- error(getLocalizer().getString("customer.duplicate.cnic.error", this));
- return;
- }
- }
- customer.getAddress().setKvCountry(customer.getKvCountry());
- setResponsePage(systemCustomerClient
- .getMobiliserApplication()
- .getPageInstance(
- com.sybase365.mobiliser.web.cst.pages.customercare.ConfirmDataPage.class,
- customer, this.getWebPage(),
- selectedTermAndConditions));
- } catch (Exception e) {
- LOG.error("#An error occurred while registering a customer", e);
- error(getLocalizer().getString("register.customer.error", this));
- }
- }
- protected boolean isEligible() {
- if (PortalUtils.exists(customer.getBirthDateString())) {
- Calendar cc = Calendar.getInstance();
- cc.setTimeInMillis(System.currentTimeMillis());
- cc.set(Calendar.YEAR, cc.get(Calendar.YEAR) - 18);
- Calendar c = customer.getBirthDateAsXml().toGregorianCalendar();
- if (c.after(cc)) {
- error(getLocalizer().getString("customer.age.error", this));
- captcha = "";
- return false;
- }
- return true;
- }
- return false;
- }
- protected boolean isEligibleCNICExpiry() {
- if (PortalUtils.exists(customer.getCnicExpiryDateString())) {
- Calendar cc = Calendar.getInstance();
- cc.setTimeInMillis(System.currentTimeMillis());
- cc.set(Calendar.YEAR, cc.get(Calendar.YEAR));
- Calendar c = customer.getCnicExpiryDateAsXml().toGregorianCalendar();
- if (c.before(cc)) {
- error(getLocalizer().getString("customer.cnic.expiry.error", this));
- captcha = "";
- return false;
- }
- return true;
- }
- return false;
- }
- public String getPinConfirmed() {
- return pinConfirmed;
- }
- public void setPinConfirmed(String pinConfirmed) {
- this.pinConfirmed = pinConfirmed;
- }
- public String getPasswordConfirmed() {
- return passwordConfirmed;
- }
- public void setPasswordConfirmed(String passwordConfirmed) {
- this.passwordConfirmed = passwordConfirmed;
- }
- public String getCaptcha() {
- return captcha;
- }
- public void setCaptcha(String captcha) {
- this.captcha = captcha;
- }
- public String getConditions() {
- return conditions;
- }
- public void setConditions(String conditions) {
- this.conditions = conditions;
- }
- public boolean isSelected() {
- return selected;
- }
- public void setSelected(boolean selected) {
- this.selected = selected;
- }
- /*Customization for Notification*/
- protected void sendSMSNotification() {
- try {
- Map paramMap = new Map();
- Entry aliasName = new Entry();
- aliasName.setKey("name");
- aliasName.setValue(customer.getDisplayName());
- Entry aliasIBAN = new Entry();
- aliasIBAN.setKey("iban");
- aliasIBAN.setValue(customer.getIban());
- paramMap.getEntry().add(aliasName);
- paramMap.getEntry().add(aliasIBAN);
- CommonFunctions.sendSms(paramMap, "TEMPLATE_FOR_ACCOUNT_REGISTRATION",customer.getMsisdn(),systemMessageClient);
- } catch (Exception e) {
- LOG.error("An error occured in sending Agent Registration notification", e.getMessage());
- //e.printStackTrace();
- }
- }
- /*Customization for Notification*/
- // private List<String> getLanguageListDropDown(){
- // List<String> langList = new ArrayList<String>();
- // langList.add(configuration.getLanguage());
- // return langList;
- // }
- //
- // private List<String> getTimeZoeListDropDown(){
- // List<String> timeList = new ArrayList<String>();
- // timeList.add(configuration.getDefaultTime());
- // return timeList;
- // }
- //
- // private List<String> getCountryListDropDown(){
- // List<String> countryList = new ArrayList<String>();
- // countryList.add(configuration.getCountryId());
- // return countryList;
- // }
- //
- // private List<Integer> getIdentityListDropDown(){
- // List<Integer> identityList = new ArrayList<Integer>();
- // identityList.add(configuration.getIdentityTypes());
- //// identityList.add(configuration.getIdentityTypes());
- // return identityList;
- // }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement