wip javascript

This commit is contained in:
John Woodlock
2012-07-07 17:50:58 +10:00
parent 54417e2168
commit a5590ce31d
+21 -21
View File
@@ -57,7 +57,7 @@ $(document).ready(function() {
<!-- portfolio templates --> <!-- portfolio templates -->
<script id="newLoanScheduleTemplate" type="text/x-jquery-tmpl"><table id="repaymentschedule" class="pretty displayschedule"> <script id="newLoanScheduleTemplate" type="text/x-jquery-tmpl"><table id="repaymentschedule" class="pretty displayschedule">
<caption>Repayment Schedule</caption> <caption>{{=$ctx.doI18N("tab.client.account.loan.schedule.table.repaymentschedule.caption")}}</caption>
<thead> <thead>
<tr> <tr>
<th>#</th> <th>#</th>
@@ -110,17 +110,17 @@ $(document).ready(function() {
<input type="hidden" id="locale" name="locale" value="en" /> <input type="hidden" id="locale" name="locale" value="en" />
<fieldset> <fieldset>
<legend>Loan Information</legend> <legend>{{=$ctx.doI18N("form.legend.loan.information")}}</legend>
<div> <div>
<table id="productdetails"> <table id="productdetails">
<tr> <tr>
<td valign="top"> <td valign="top">
<label for="clientname">Applicant:</label> <label for="clientname">{{=$ctx.doI18N("form.label.loan.applicant")}}</label>
<input id="clientname" name="clientName" title="" type="text" value="{{=clientName}}" disabled="disabled" /> <input id="clientname" name="clientName" title="" type="text" value="{{=clientName}}" disabled="disabled" />
<label for="productId">Product:</label> <label for="productId">{{=$ctx.doI18N("form.label.product.dropdown")}}</label>
<select name="productId" id="productId"> <select name="productId" id="productId">
<option value="-1">--Select Product--</option> <option value="-1">{{=$ctx.doI18N("form.option.product.dropdown.first.choice")}}</option>
{{#each allowedProducts}} {{#each allowedProducts}}
{{#if $ctx.number($parent.parent.data.productId)===$ctx.number(id)}} {{#if $ctx.number($parent.parent.data.productId)===$ctx.number(id)}}
<option value="{{=$ctx.number(id)}}" selected="selected">{{=name}}</option> <option value="{{=$ctx.number(id)}}" selected="selected">{{=name}}</option>
@@ -129,15 +129,15 @@ $(document).ready(function() {
{{/if}} {{/if}}
{{/each}} {{/each}}
</select> </select>
<label for="description">Description:</label> <label for="description">{{=$ctx.doI18N("form.label.loan.product.description")}}</label>
<textarea id="description" rows="2" cols="50" draggable="false" disabled="disabled">{{=selectedProduct.description}}</textarea> <textarea id="description" rows="2" cols="50" draggable="false" disabled="disabled">{{=selectedProduct.description}}</textarea>
</td> </td>
<td style="text-align:right;vertical-align:bottom;width:50px;">&nbsp;</td> <td style="text-align:right;vertical-align:bottom;width:50px;">&nbsp;</td>
<td valign="top"> <td valign="top">
<label for="submittedOnDate">Submitted on:</label> <label for="submittedOnDate">{{=$ctx.doI18N("form.label.loan.submitted.on")}}</label>
<input id="submittedOnDate" name="submittedOnDate" title="" type="text" class="datepickerfield" value="{{=$ctx.globalDate(submittedOnDate)}}" /> <input id="submittedOnDate" name="submittedOnDate" title="" type="text" class="datepickerfield" value="{{=$ctx.globalDate(submittedOnDate)}}" />
<label for="submittedOnNote">Loan submittal note:</label> <label for="submittedOnNote">{{=$ctx.doI18N("form.label.loan.submitted.on.note")}}</label>
<textarea id="submittedOnNote" name="submittedOnNote" rows="2" cols="50" draggable="false">{{=submittedOnNote}}</textarea> <textarea id="submittedOnNote" name="submittedOnNote" rows="2" cols="50" draggable="false">{{=submittedOnNote}}</textarea>
</td> </td>
</tr> </tr>
@@ -145,20 +145,20 @@ $(document).ready(function() {
</div> </div>
</fieldset> </fieldset>
<fieldset> <fieldset>
<legend>Loan Terms</legend> <legend>{{=$ctx.doI18N("form.legend.loan.product.loan.terms")}}</legend>
<table> <table>
<tr> <tr>
<td valign="top" style="padding-right: 5px; border-right: 1px solid;"> <td valign="top" style="padding-right: 5px; border-right: 1px solid;">
<table> <table>
<tr> <tr>
<td>Loan amount:</td> <td>{{=$ctx.doI18N("form.label.loan.product.loan.amount")}}</td>
<td> <td>
<input id="principal" name="principal" title="" type="text" value="{{=$ctx.money(selectedProduct.principal)}}" style="width: 125px;" /> <input id="principal" name="principal" title="" type="text" value="{{=$ctx.money(selectedProduct.principal)}}" style="width: 125px;" />
<input id="principalCurrencyCode" name="principalCurrencyCode" title="" type="text" value="{{=selectedProduct.principal.displaySymbol}}" style="width: 40px;" disabled="disabled" /> <input id="principalCurrencyCode" name="principalCurrencyCode" title="" type="text" value="{{=selectedProduct.principal.displaySymbol}}" style="width: 40px;" disabled="disabled" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Repaid every:</td> <td>{{=$ctx.doI18N("form.label.loan.product.repaidevery")}}</td>
<td> <td>
<input id="repaymentEvery" name="repaymentEvery" title="" type="text" value="{{=$ctx.number(selectedProduct.repaymentEvery)}}" style="width: 50px;" /> <input id="repaymentEvery" name="repaymentEvery" title="" type="text" value="{{=$ctx.number(selectedProduct.repaymentEvery)}}" style="width: 50px;" />
@@ -174,19 +174,19 @@ $(document).ready(function() {
</td> </td>
</tr> </tr>
<tr> <tr>
<td># of repayments:</td> <td>{{=$ctx.doI18N("form.label.loan.product.numberof.repayments")}}</td>
<td> <td>
<input id="numberOfRepayments" name="numberOfRepayments" title="" type="text" value="{{=$ctx.number(selectedProduct.numberOfRepayments)}}" style="width: 50px;" /> <input id="numberOfRepayments" name="numberOfRepayments" title="" type="text" value="{{=$ctx.number(selectedProduct.numberOfRepayments)}}" style="width: 50px;" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Expected disbursement on:</td> <td>{{=$ctx.doI18N("form.label.loan.expected.disbursement.date.on")}}</td>
<td> <td>
<input id="expectedDisbursementDate" name="expectedDisbursementDate" title="" type="text" class="datepickerfield" value="{{=$ctx.globalDate(expectedDisbursementDate)}}" style="width:172px;"/> <input id="expectedDisbursementDate" name="expectedDisbursementDate" title="" type="text" class="datepickerfield" value="{{=$ctx.globalDate(expectedDisbursementDate)}}" style="width:172px;"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>First repayment on:</td> <td>{{=$ctx.doI18N("form.label.loan.first.repayment.on")}}</td>
<td> <td>
<input id="repaymentsStartingFromDate" name="repaymentsStartingFromDate" title="" type="text" class="datepickerfield" value="{{=$ctx.globalDate(repaymentsStartingFromDate)}}" style="width:172px;"/> <input id="repaymentsStartingFromDate" name="repaymentsStartingFromDate" title="" type="text" class="datepickerfield" value="{{=$ctx.globalDate(repaymentsStartingFromDate)}}" style="width:172px;"/>
</td> </td>
@@ -197,7 +197,7 @@ $(document).ready(function() {
<td valign="top" style="padding-left: 5px; padding-right: 5px; border-right: 1px solid;"> <td valign="top" style="padding-left: 5px; padding-right: 5px; border-right: 1px solid;">
<table> <table>
<tr> <tr>
<td>Nominal interest rate %:</td> <td>{{=$ctx.doI18N("form.label.loan.product.nominal.interestrate")}}</td>
<td> <td>
<input id="interestRatePerPeriod" name="interestRatePerPeriod" title="" type="text" value="{{=$ctx.decimal(selectedProduct.interestRatePerPeriod, 4)}}" style="width: 60px;" /> <input id="interestRatePerPeriod" name="interestRatePerPeriod" title="" type="text" value="{{=$ctx.decimal(selectedProduct.interestRatePerPeriod, 4)}}" style="width: 60px;" />
@@ -213,13 +213,13 @@ $(document).ready(function() {
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Annual nominal rate %:</td> <td>{{=$ctx.doI18N("form.label.loan.annual.nominal.interestrate")}}</td>
<td> <td>
<input id="interestRatePerYear" name="interestRatePerYear" title="" type="text" style="width: 60px;" disabled="disabled" /> <input id="interestRatePerYear" name="interestRatePerYear" title="" type="text" style="width: 60px;" disabled="disabled" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Amortization:</td> <td>{{=$ctx.doI18N("form.label.loan.product.amortization")}}</td>
<td> <td>
<select name="amortizationType" id="amortizationType" title="" style="width: 178px;"> <select name="amortizationType" id="amortizationType" title="" style="width: 178px;">
{{#each selectedProduct.amortizationTypeOptions}} {{#each selectedProduct.amortizationTypeOptions}}
@@ -233,7 +233,7 @@ $(document).ready(function() {
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Interest method:</td> <td>{{=$ctx.doI18N("form.label.loan.product.interest.method")}}</td>
<td> <td>
<select name="interestType" id="interestType" title="" style="width: 180px;"> <select name="interestType" id="interestType" title="" style="width: 180px;">
{{#each selectedProduct.interestTypeOptions}} {{#each selectedProduct.interestTypeOptions}}
@@ -247,7 +247,7 @@ $(document).ready(function() {
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Interest calculation period:</td> <td>{{=$ctx.doI18N("form.label.loan.product.interest.rate.calcutated.in.period")}}</td>
<td> <td>
<select id="interestCalculationPeriodType" name="interestCalculationPeriodType" title="" style="width: 220px;"> <select id="interestCalculationPeriodType" name="interestCalculationPeriodType" title="" style="width: 220px;">
{{#each selectedProduct.interestCalculationPeriodTypeOptions}} {{#each selectedProduct.interestCalculationPeriodTypeOptions}}
@@ -261,13 +261,13 @@ $(document).ready(function() {
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Interest charged from:</td> <td>{{=$ctx.doI18N("form.label.loan.interest.charged.from")}}</td>
<td> <td>
<input id="interestChargedFromDate" name="interestChargedFromDate" title="" type="text" class="datepickerfield" value="{{=$ctx.globalDate(interestCalculatedFromDate)}}" style="width:172px;"/> <input id="interestChargedFromDate" name="interestChargedFromDate" title="" type="text" class="datepickerfield" value="{{=$ctx.globalDate(interestCalculatedFromDate)}}" style="width:172px;"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Arrears tolerance:</td> <td>{{=$ctx.doI18N("form.label.loan.product.arrears.tolerance")}}</td>
<td> <td>
<input id="inArrearsTolerance" name="inArrearsTolerance" title="" type="text" value="{{=$ctx.money(selectedProduct.inArrearsTolerance)}}" style="width: 125px;" /> <input id="inArrearsTolerance" name="inArrearsTolerance" title="" type="text" value="{{=$ctx.money(selectedProduct.inArrearsTolerance)}}" style="width: 125px;" />
<input id="inArrearsCurrencyCode" name="inArrearsCurrencyCode" title="" type="text" value="{{=selectedProduct.inArrearsTolerance.displaySymbol}}" style="width: 40px;" disabled="disabled" /> <input id="inArrearsCurrencyCode" name="inArrearsCurrencyCode" title="" type="text" value="{{=selectedProduct.inArrearsTolerance.displaySymbol}}" style="width: 40px;" disabled="disabled" />