Cleanup account frontend.

This commit is contained in:
Alexis Lahouze
2015-07-15 18:28:56 +02:00
parent 0b0ca57042
commit e18009b0dd
2 changed files with 33 additions and 5 deletions

View File

@ -60,7 +60,7 @@
</td>
</tr>
<tr id="account_[[account.id]]" class="form-inline" ng-repeat="account in accounts">
<tr id="account_[[account.id]]" class="form-inline" ng-if="!account.edit" ng-repeat-start="account in accounts">
<td><a href="account/[[ account.id ]]/entries">[[ account.name ]]</a></td>
<td>[[ account.current ]]</td>
<td>[[ account.pointed ]]</td>
@ -84,6 +84,34 @@
</div>
</td>
</tr>
<tr id="account_[[account.id]]" class="form-inline" ng-if="account.edit" ng-repeat-end>
<td>
<input type="text" class="form-control" ng-model="account.name" />
</td>
<td>[[ account.current ]]</td>
<td>[[ account.pointed ]]</td>
<td>
<input type="text" class="form-control"
ng-model="account.authorized_overdraft" />
</td>
<td>
<div class="btn-group">
<button class="btn btn-xs btn-success"
ng-click="saveAccount(account)">
<span class="fa fa-floppy-o"></span>
</button>
<button class="btn btn-xs btn-default"
ng-click="cancelEditAccount(account)">
<span class="fa fa-times"></span>
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>