wip javascript
This commit is contained in:
@@ -36,8 +36,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- templates below here -->
|
||||
|
||||
<!-- portfolio templates below here -->
|
||||
<script id="newLoanScheduleTemplate" type="text/x-jquery-tmpl">
|
||||
<table id="repaymentschedule" class="pretty displayschedule">
|
||||
<caption>Repayment Schedule</caption>
|
||||
@@ -865,9 +864,541 @@
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!-- end of template section -->
|
||||
<!-- end of portfolio template section -->
|
||||
|
||||
<!-- admin templates below here -->
|
||||
|
||||
|
||||
<script id="productFormTemplate" type="text/x-jquery-tmpl">
|
||||
<form id="entityform">
|
||||
<div id="formerrors"></div>
|
||||
<fieldset>
|
||||
<input type="hidden" id="locale" name="locale" value="${currentLocale}" />
|
||||
<legend><spring:message code="form.legend.loan.product.information"/></legend>
|
||||
|
||||
<label for="name"><spring:message code="form.label.loan.product.name"/></label>
|
||||
<input id="name" name="name" type="text" title="" value="{{=name}}"/>
|
||||
|
||||
<label for="description"><spring:message code="form.label.loan.product.description"/></label>
|
||||
<textarea cols="73" rows="3" id="description" name="description" title="">{{=description}}</textarea>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><spring:message code="form.legend.loan.product.currency"/></legend>
|
||||
<label for="currencyCode"><spring:message code="form.label.loan.product.currency"/></label>
|
||||
<select id="currencyCode" name="currencyCode" title="" style="width: 300px;">
|
||||
{{#each currencyOptions}}
|
||||
{{#if $parent.parent.data.principal.currencyCode===code}}
|
||||
<option value="{{=code}}" selected="selected">{{=name}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=code}}">{{=name}}</option>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</select>
|
||||
<label for="digitsAfterDecimal"><spring:message code="form.label.loan.product.decimalplaces"/></label>
|
||||
<input id="digitsAfterDecimal" name="digitsAfterDecimal" title="" style="width: 300px;" value="{{=$ctx.number(principal.digitsAfterDecimal)}}" />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><spring:message code="form.legend.loan.product.loan.terms"/></legend>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td valign="top" style="padding-right: 5px; border-right: 1px solid;">
|
||||
<table>
|
||||
<tr>
|
||||
<td><spring:message code="form.label.loan.product.loan.amount"/></td>
|
||||
<td>
|
||||
<input id="principal" name="principal" title="" style="width: 125px;" value="{{=$ctx.money(principal)}}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><spring:message code="form.label.loan.product.repaidevery"/></td>
|
||||
<td>
|
||||
<input id="repaymentEvery" name="repaymentEvery" title="" style="width: 50px;" value="{{=$ctx.number(repaymentEvery)}}"/>
|
||||
|
||||
<select id="repaymentFrequencyType" name="repaymentFrequencyType" title="" style="width: 121px;">
|
||||
{{#each repaymentFrequencyTypeOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.repaymentFrequencyType.id)===$ctx.number(id)}}
|
||||
<option value="{{=$ctx.number(id)}}" selected="selected">{{=value}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=$ctx.number(id)}}">{{=value}}</option>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><spring:message code="form.label.loan.product.numberof.repayments"/></td>
|
||||
<td>
|
||||
<input id="numberOfRepayments" name="numberOfRepayments" title="" style="width: 50px;" value="{{=$ctx.number(numberOfRepayments)}}"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td valign="top" style="padding-left: 5px; padding-right: 5px; border-right: 1px solid;">
|
||||
<table>
|
||||
<tr>
|
||||
<td><spring:message code="form.label.loan.product.nominal.interestrate"/></td>
|
||||
<td>
|
||||
<input id="interestRatePerPeriod" name="interestRatePerPeriod" title="" style="width: 70px;" value="{{=$ctx.decimal(interestRatePerPeriod, 4)}}" />
|
||||
|
||||
<select id="interestRateFrequencyType" name="interestRateFrequencyType" title="" style="width: 139px;">
|
||||
{{#each interestRateFrequencyTypeOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.interestRateFrequencyType.id)===$ctx.number(id)}}
|
||||
<option value="{{=$ctx.number(id)}}" selected="selected">{{=value}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=$ctx.number(id)}}">{{=value}}</option>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><spring:message code="form.label.loan.product.amortization"/></td>
|
||||
<td>
|
||||
<select id="amortizationType" name="amortizationType" title="" style="width: 220px;">
|
||||
{{#each amortizationTypeOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.amortizationType.id)===$ctx.number(id)}}
|
||||
<option value="{{=$ctx.number(id)}}" selected="selected">{{=value}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=$ctx.number(id)}}">{{=value}}</option>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><spring:message code="form.label.loan.product.interest.method"/></td>
|
||||
<td>
|
||||
<select id="interestType" name="interestType" title="" style="width: 220px;">
|
||||
{{#each interestTypeOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.interestType.id)===$ctx.number(id)}}
|
||||
<option value="{{=$ctx.number(id)}}" selected="selected">{{=value}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=$ctx.number(id)}}">{{=value}}</option>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><spring:message code="form.label.loan.product.interest.rate.calcutated.in.period"/></td>
|
||||
<td>
|
||||
<select id="interestCalculationPeriodType" name="interestCalculationPeriodType" title="" style="width: 220px;">
|
||||
{{#each interestCalculationPeriodTypeOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.interestCalculationPeriodType.id)===$ctx.number(id)}}
|
||||
<option value="{{=$ctx.number(id)}}" selected="selected">{{=value}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=$ctx.number(id)}}">{{=value}}</option>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><spring:message code="form.label.loan.product.arrears.tolerance"/></td>
|
||||
<td>
|
||||
<input id="inArrearsTolerance" name="inArrearsTolerance" title="" style="width: 215px;" value="{{=$ctx.money(inArrearsTolerance)}}" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</form>
|
||||
</script>
|
||||
|
||||
<script id="productListTemplate" type="text/x-jquery-tmpl">
|
||||
<table id='productstable' width='100%'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Product Name</th>
|
||||
<th>Created</th>
|
||||
<th>Last Modified</th>
|
||||
<th>Active</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each products}}
|
||||
<tr>
|
||||
<td title='{{=description}}'>{{=name}}</td>
|
||||
<td>{{=$ctx.globalDateTime(createdOn)}}</td>
|
||||
<td>{{=$ctx.globalDateTime(lastModifedOn)}}</td>
|
||||
<td>Yes</td>
|
||||
<td>
|
||||
<a id='deactivateproduct{{=id}}' class='deactivateproduct' href='#' style='margin-right: 5px;'>Deactivate</a>
|
||||
<a id='editproduct{{=id}}' class='editproduct' href='#' style='margin-right: 5px;'>View/Edit</a>
|
||||
<a id='deleteproduct{{=id}}' class='deleteproduct' href='#' style='margin-right: 5px;'>Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</script>
|
||||
|
||||
<script id="officeListTemplate" type="text/x-jquery-tmpl">
|
||||
<table id='officestable' width='100%'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><spring:message code="table.heading.office.name"/></th>
|
||||
<th><spring:message code="table.heading.office.externalid"/></th>
|
||||
<th><spring:message code="table.heading.office.openedon"/></th>
|
||||
<th><spring:message code="table.heading.office.parent"/></th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each offices}}
|
||||
<tr>
|
||||
<td>{{=name}}</td>
|
||||
<td>{{=externalId}}</td>
|
||||
<td>{{=$ctx.globalDate(openingDate)}}</td>
|
||||
<td>{{=parentName}}</td>
|
||||
<td>
|
||||
<a id='edit{{=id}}' class='edit' href='#' style='margin-right: 5px;'><spring:message code="link.action.product.viewedit"/></a>
|
||||
<!--
|
||||
<a id='delete{{=id}}' class='delete' href='#' style='margin-right: 5px;'><spring:message code="link.action.product.delete"/></a>
|
||||
-->
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</script>
|
||||
|
||||
<script id="officeFormTemplate" type="text/x-jquery-tmpl">
|
||||
<form id="entityform">
|
||||
<div id="formerrors"></div>
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend><spring:message code="form.legend.office.details"/></legend>
|
||||
<label for="name"><spring:message code="form.label.office.name"/></label>
|
||||
<input id="name" name="name" title="" type="text" value="{{=name}}" size="75"/>
|
||||
|
||||
{{#if allowedParents.length > 0}}
|
||||
<label for="parentId"><spring:message code="form.label.office.parent"/></label>
|
||||
<select id="parentId" name="parentId" title="">
|
||||
<option value="-1"><spring:message code="option.office.first.choice"/></option>
|
||||
{{#each allowedParents}}
|
||||
{{#if $ctx.number($parent.parent.data.parentId)===$ctx.number(id)}}
|
||||
<option value="{{=$ctx.number(id)}}" selected="selected">{{=name}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=$ctx.number(id)}}">{{=name}}</option>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</select>
|
||||
{{#else}}
|
||||
<input type="hidden" id="rootOffice" name="rootOffice" value="true" />
|
||||
{{/if}}
|
||||
|
||||
<input type="hidden" id="dateFormat" name="dateFormat" value="dd MMMM yyyy" />
|
||||
<label for="openingDate"><spring:message code="form.label.office.openedon"/></label>
|
||||
<input id="openingDate" name="openingDate" title="" type="text" value="{{=$ctx.globalDate(openingDate)}}" size="75" class="datepickerfield" />
|
||||
|
||||
<label for="externalId"><spring:message code="form.label.office.externalid"/></label>
|
||||
<input id="externalId" name="externalId" title="" type="text" value="{{=externalId}}" size="75"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
</script>
|
||||
|
||||
<script id="configurationFormTemplate" type="text/x-jquery-tmpl">
|
||||
<form id="entityform">
|
||||
<div id="formerrors"></div>
|
||||
<fieldset>
|
||||
<legend><spring:message code="form.legend.loan.product.currency"/></legend>
|
||||
|
||||
<div class="multiselectwidget" style="width:400px;height:125px;">
|
||||
<label for="notSelectedCurrencies"><spring:message code="form.label.configuration.available.currencies"/></label>
|
||||
<select id="notSelectedCurrencies" name="notSelectedCurrencies" title="" class="multiselectwidget" multiple="multiple" style="width:400px;height:125px;">
|
||||
{{#each currencyOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.code)===code}}
|
||||
<option value="{{=code}}" selected="selected">{{=displayLabel}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=code}}">{{=displayLabel}}</option>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</select>
|
||||
<a href="#" id="add" class="multiselectwidget"><spring:message code="widget.multiselect.button.add"/> >></a>
|
||||
</div>
|
||||
|
||||
<div class="multiselectwidget">
|
||||
<label for="currencies"><spring:message code="form.label.configuration.allowed.currencies"/></label>
|
||||
<select id="currencies" name="currencies" title="" class="multiselectwidget" multiple="multiple" style="width:400px;height:125px;">
|
||||
{{#each selectedCurrencyOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.code)===code}}
|
||||
<option value="{{=code}}" selected="selected">{{=displayLabel}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=code}}">{{=displayLabel}}</option>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</select>
|
||||
<a href="#" id="remove" class="multiselectwidget"><< <spring:message code="widget.multiselect.button.remove"/></a>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</script>
|
||||
|
||||
<script id="changePasswordFormTemplate" type="text/x-jquery-tmpl">
|
||||
<form id="entityform">
|
||||
<div id="formerrors"></div>
|
||||
<label for="password"><spring:message code="form.label.new.password"/></label>
|
||||
<input id="password" name="password" title="" type="password" value="{{=password}}" size="75"/>
|
||||
|
||||
<label for="repeatPassword"><spring:message code="form.label.repeat.new.password"/></label>
|
||||
<input id="repeatPassword" name="repeatPassword" title="" type="password" value="{{=passwordrepeat}}" size="75"/>
|
||||
</form>
|
||||
</script>
|
||||
|
||||
<script id="userSettingsFormTemplate" type="text/x-jquery-tmpl">
|
||||
<form id="entityform">
|
||||
<div id="formerrors"></div>
|
||||
<label for="username"><spring:message code="form.label.username"/></label>
|
||||
<input id="username" name="username" title="" type="text" value="{{=username}}" size="75"/>
|
||||
|
||||
<label for="firstname"><spring:message code="form.label.firstname"/></label>
|
||||
<input id="firstname" name="firstname" title="The first name of user." type="text" value="{{=firstname}}" size="75"/>
|
||||
|
||||
<label for="lastname"><spring:message code="form.label.lastname"/></label>
|
||||
<input id="lastname" name="lastname" title="The last name of user." type="text" value="{{=lastname}}" size="75"/>
|
||||
|
||||
<label for="email"><spring:message code="form.label.email"/></label>
|
||||
<input id="email" name="email" title="" type="text" value="{{=email}}" size="75"/>
|
||||
</form>
|
||||
</script>
|
||||
|
||||
<script id="userSettingsTemplate" type="text/x-jquery-tmpl">
|
||||
<h2><spring:message code="form.label.heading.office"/></h2>
|
||||
<div class="row">
|
||||
<span class="rowlabel"><spring:message code="form.label.office"/></span>
|
||||
<span class="rowvalue">{{=officeName}}</span>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
<h2><spring:message code="form.label.heading.details"/></h2>
|
||||
<div class="row">
|
||||
<span class="rowlabel"><spring:message code="form.label.name"/></span>
|
||||
<span class="rowvalue">{{=firstname}} {{=lastname}}</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span class="rowlabel"><spring:message code="form.label.username"/></span>
|
||||
<span class="rowvalue">{{=username}}</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span class="rowlabel"><spring:message code="form.label.email"/></span>
|
||||
<span class="rowvalue">{{=email}}</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span class="rowlabel"> </span>
|
||||
<span class="rowvalue"><a href="#" id="changedetails"><spring:message code="form.link.changedetails"/></a></span>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
<h2><spring:message code="form.label.heading.security"/></h2>
|
||||
<div class="row">
|
||||
<span class="rowlabel"><spring:message code="form.label.password"/></span>
|
||||
<span class="rowvalue"><a href="#" id="changepassword"><spring:message code="form.link.changepassword"/></a></span>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
<h2><spring:message code="form.label.heading.roles"/></h2>
|
||||
{{#each selectedRoles}}
|
||||
<div class="row">
|
||||
<span class="rowlabel"> </span>
|
||||
<span class="rowvalue"><b>{{=name}}</b> - <i>{{=description}}</i></span>
|
||||
</div>
|
||||
{{/each}}
|
||||
</script>
|
||||
|
||||
<script id="permissionListTemplate" type="text/x-jquery-tmpl">
|
||||
<table id='entitytable' width='100%'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><spring:message code="table.heading.permission.type"/></th>
|
||||
<th><spring:message code="table.heading.permission.permission"/></th>
|
||||
<th><spring:message code="table.heading.permission.description"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each permissions}}
|
||||
<tr>
|
||||
<td>
|
||||
{{#if $ctx.number(groupType)===$ctx.number(0)}}
|
||||
Unknown
|
||||
{{/if}}
|
||||
{{#if $ctx.number(groupType)===$ctx.number(1)}}
|
||||
User Administration
|
||||
{{/if}}
|
||||
{{#if $ctx.number(groupType)===$ctx.number(2)}}
|
||||
Organisation Administration
|
||||
{{/if}}
|
||||
{{#if $ctx.number(groupType)===$ctx.number(3)}}
|
||||
Portfolio Management
|
||||
{{/if}}
|
||||
{{#if $ctx.number(groupType)===$ctx.number(4)}}
|
||||
Reporting
|
||||
{{/if}}
|
||||
{{#if $ctx.number(groupType)===$ctx.number(5)}}
|
||||
Migration
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>{{=name}}</td>
|
||||
<td>{{=description}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</script>
|
||||
|
||||
<script id="roleListTemplate" type="text/x-jquery-tmpl">
|
||||
<table id='entitytable' width='100%'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><spring:message code="table.heading.rolename"/></th>
|
||||
<th><spring:message code="table.heading.description"/></th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each roles}}
|
||||
<tr>
|
||||
<td>{{=name}}</td>
|
||||
<td>{{=description}}</td>
|
||||
<td>
|
||||
<a id='edit{{=id}}' class='edit' href='#' style='margin-right: 5px;'><spring:message code="link.action.product.viewedit"/></a>
|
||||
<!--
|
||||
<a id='delete{{=id}}' class='delete' href='#' style='margin-right: 5px;'><spring:message code="link.action.product.delete"/></a>
|
||||
-->
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</script>
|
||||
|
||||
<script id="usersListTemplate" type="text/x-jquery-tmpl">
|
||||
<table id='entitytable' width='100%'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><spring:message code="table.heading.officename"/></th>
|
||||
<th><spring:message code="table.heading.username"/></th>
|
||||
<th><spring:message code="table.heading.name"/></th>
|
||||
<th><spring:message code="table.heading.email"/></th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each users}}
|
||||
<tr>
|
||||
<td>{{=officeName}}</td>
|
||||
<td>{{=username}}</td>
|
||||
<td>{{=lastname}}, {{=firstname}}</td>
|
||||
<td>{{=email}}</td>
|
||||
<td>
|
||||
<a id='edit{{=id}}' class='edit' href='#' style='margin-right: 5px;'><spring:message code="link.action.product.viewedit"/></a>
|
||||
<!--
|
||||
<a id='delete{{=id}}' class='delete' href='#' style='margin-right: 5px;'><spring:message code="link.action.product.delete"/></a>
|
||||
-->
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</script>
|
||||
|
||||
<script id="userFormTemplate" type="text/x-jquery-tmpl">
|
||||
<form id="entityform">
|
||||
<div id="formerrors"></div>
|
||||
<fieldset>
|
||||
<legend><spring:message code="form.legend.user.details"/></legend>
|
||||
|
||||
<label for="username"><spring:message code="form.label.user.username"/></label>
|
||||
<input id="username" name="username" title="" type="text" value="{{=username}}" size="75"/>
|
||||
|
||||
<label for="firstname"><spring:message code="form.label.user.firstname"/></label>
|
||||
<input id="firstname" name="firstname" title="" type="text" value="{{=firstname}}" size="75"/>
|
||||
|
||||
<label for="lastname"><spring:message code="form.label.user.lastname"/></label>
|
||||
<input id="lastname" name="lastname" title="" type="text" value="{{=lastname}}" size="75"/>
|
||||
|
||||
<label for="email"><spring:message code="form.label.user.email"/></label>
|
||||
<input id="email" name="email" title="" type="text" value="{{=email}}" size="75"/>
|
||||
|
||||
<label for="officeId"><spring:message code="form.label.user.office"/></label>
|
||||
<select id="officeId" name="officeId" title="">
|
||||
<option value="-1"><spring:message code="option.office.first.choice"/></option>
|
||||
{{#each allowedOffices}}
|
||||
{{#if $ctx.number($parent.parent.data.officeId)===$ctx.number(id)}}
|
||||
<option value="{{=$ctx.number(id)}}" selected="selected">{{=name}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=$ctx.number(id)}}">{{=name}}</option>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</select>
|
||||
<br/>
|
||||
|
||||
<div class="multiselectwidget">
|
||||
<label for="notSelectedRoles"><spring:message code="form.label.user.available.roles"/></label>
|
||||
<select id="notSelectedRoles" name="notSelectedRoles" title="Available application roles." class="multiselectwidget multiNotSelectedItems" multiple="multiple" style="width:450px;height:125px;">
|
||||
{{#each availableRoles}}
|
||||
<option value="{{=id}}">{{=name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
<a href="#" id="add" class="multiselectwidget multiadd"><spring:message code="widget.multiselect.button.add"/> >></a>
|
||||
</div>
|
||||
|
||||
<div class="multiselectwidget">
|
||||
<label for="roles"><spring:message code="form.label.user.selected.roles"/></label>
|
||||
<select id="roles" name="roles" title="User selected roles." class="multiselectwidget multiSelectedItems" multiple="multiple" style="width:450px;height:125px;">
|
||||
{{#each selectedRoles}}
|
||||
<option value="{{=id}}" selected="selected">{{=name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
<a href="#" id="remove" class="multiselectwidget multiremove"><< <spring:message code="widget.multiselect.button.remove"/></a>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</script>
|
||||
|
||||
<script id="roleFormTemplate" type="text/x-jquery-tmpl">
|
||||
<form id="entityform">
|
||||
<div id="formerrors"></div>
|
||||
<fieldset>
|
||||
<legend><spring:message code="form.legend.role.details"/></legend>
|
||||
|
||||
<label for="name"><spring:message code="form.label.role.name"/></label>
|
||||
<input id="name" name="name" title="" type="text" value="{{=name}}" size="75"/>
|
||||
|
||||
<label for="description"><spring:message code="form.label.role.description"/></label>
|
||||
<textarea cols="73" rows="3" id="description" name="description" title="">{{=description}}</textarea>
|
||||
<br/>
|
||||
|
||||
<div class="multiselectwidget">
|
||||
<label for="notSelectedPermissions"><spring:message code="form.label.role.available.permissions"/></label>
|
||||
<select id="notSelectedPermissions" name="notSelectedPermissions" title="" class="multiselectwidget multiNotSelectedItems" multiple="multiple" style="width:450px;height:125px;">
|
||||
{{#each availablePermissions}}
|
||||
<option value="{{=id}}" title="{{=description}}">{{=name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
<a href="#" id="add" class="multiselectwidget multiadd"><spring:message code="widget.multiselect.button.add"/> >></a>
|
||||
</div>
|
||||
|
||||
<div class="multiselectwidget">
|
||||
<label for="permissions"><spring:message code="form.label.role.selected.permissions"/></label>
|
||||
<select id="permissions" name="permissions" title="" class="multiselectwidget multiSelectedItems" multiple="multiple" style="width:450px;height:125px;">
|
||||
{{#each selectedPermissions}}
|
||||
<option value="{{=id}}" title="{{=description}}">{{=name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
<a href="#" id="remove" class="multiselectwidget multiremove"><< <spring:message code="widget.multiselect.button.remove"/></a>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!-- end of admin templates -->
|
||||
|
||||
<!-- real action start here -->
|
||||
|
||||
@@ -892,8 +1423,8 @@
|
||||
<div id="navwrapper">
|
||||
<ul id="nav" class="floatleft">
|
||||
<li><a href="unknown.html" onclick="showILClientListing(baseApiUrl);return false;">Clients</a></li>
|
||||
<li><a href="org/admin/user">User Administration</a></li>
|
||||
<li><a href="org/admin">Organisation Administration</a></li>
|
||||
<li><a href="unknown.html" onclick="showILUserAdmin();return false;">User Administration</a></li>
|
||||
<li><a href="unknown.html" onclick="showILOrgAdmin();return false;">Organisation Administration</a></li>
|
||||
<li><a href="unknown.html" onclick="showILReporting();return false;">Reports</a></li>
|
||||
</ul>
|
||||
<ul id="nav" class="floatright">
|
||||
|
||||
@@ -103,6 +103,28 @@ function setAddLoanContent(divName) {
|
||||
$("#" + divName).html(htmlVar);
|
||||
}
|
||||
|
||||
function setOrgAdminContent(divName) {
|
||||
|
||||
var htmlVar = '<div id="inputarea"></div><div id="schedulearea"></div>'
|
||||
|
||||
var htmlVar = '<div>';
|
||||
htmlVar += '<span style="float: left">';
|
||||
htmlVar += ' <a href="unknown.html" onclick="refreshLoanProductsView();return false;" id="viewloanproducts">View Products</a>';
|
||||
htmlVar += '|';
|
||||
htmlVar += ' <a href="#" id="addloanproduct">Add Product</a>';
|
||||
htmlVar += '|';
|
||||
htmlVar += ' <a href="#" id="viewoffices">View Offices</a>';
|
||||
htmlVar += '|';
|
||||
htmlVar += ' <a href="#" id="addoffice">Add Office</a>';
|
||||
htmlVar += '|';
|
||||
htmlVar += ' <a href="#" id="editconfiguration">Currency Configuration</a>';
|
||||
htmlVar += '</span>';
|
||||
htmlVar += '</div>';
|
||||
htmlVar += '<br><br>';
|
||||
htmlVar += '<div id="listplaceholder" ></div>';
|
||||
$("#" + divName).html(htmlVar);
|
||||
}
|
||||
|
||||
|
||||
function setReportingContent(divName) {
|
||||
|
||||
@@ -1088,6 +1110,77 @@ function loadILLoan(baseApiUrl, loanId) {
|
||||
|
||||
|
||||
|
||||
/* user admin code */
|
||||
|
||||
function showILOrgAdmin() {
|
||||
setOrgAdminContent("content");
|
||||
}
|
||||
|
||||
|
||||
function refreshLoanProductsView() {
|
||||
|
||||
var url = baseApiUrl + 'loanproducts';
|
||||
|
||||
var successFunction = function(data, textStatus, jqXHR) {
|
||||
|
||||
var productlistParent = new Object();
|
||||
productlistParent.products = data;
|
||||
|
||||
var productListHtml = $("#productListTemplate").render(productlistParent);
|
||||
$("#listplaceholder").html(productListHtml);
|
||||
|
||||
$("a.editproduct").click( function(e) {
|
||||
var linkId = this.id;
|
||||
var productId = linkId.replace("editproduct", "");
|
||||
var getUrl = baseApiUrl + 'loanproducts/' + productId + '?template=true';
|
||||
var putUrl = baseApiUrl + 'loanproducts/' + productId;
|
||||
|
||||
var templateSelector = "#productFormTemplate";
|
||||
var width = 800;
|
||||
var height = 550;
|
||||
|
||||
var saveSuccessFunction = function(data, textStatus, jqXHR) {
|
||||
$("#dialog-form").dialog("close");
|
||||
refreshLoanProductsView();
|
||||
}
|
||||
popupDialogWithFormView(getUrl, putUrl, 'PUT', "dialog.title.product.details", templateSelector, width, height, saveSuccessFunction);
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$("a.deactivateproduct").click( function(e) {
|
||||
//var linkId = this.id;
|
||||
//var productId = linkId.replace("deactivateproduct", "");
|
||||
showNotAvailableDialog('dialog.title.functionality.not.available');
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$("a.deleteproduct").click( function(e) {
|
||||
//var linkId = this.id;
|
||||
//var productId = linkId.replace("deleteproduct", "");
|
||||
showNotAvailableDialog('dialog.title.functionality.not.available');
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
var oTable = $("#productstable").dataTable( {
|
||||
"bSort": true,
|
||||
"bInfo": true,
|
||||
"bJQueryUI": true,
|
||||
"bRetrieve": false,
|
||||
"bScrollCollapse": false,
|
||||
"bPaginate": false,
|
||||
"bLengthChange": false,
|
||||
"bFilter": false,
|
||||
"bAutoWidth": false,
|
||||
});
|
||||
};
|
||||
|
||||
executeAjaxRequest(url, 'GET', "", base64, successFunction, formErrorFunction);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user