radio buttons
This commit is contained in:
@@ -33,6 +33,16 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location'
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// HIER GEHT'S WEITER
|
||||||
|
// URL des aktuell selektierten Account ermitteln, dann /accounts/id/users abrufen, Liste für Rediobuttons bereitstellen
|
||||||
|
// var users = $resource('/categories/search/listForAccount', { accountId: $scope.accounts[0].id }).get();
|
||||||
|
// categories.$promise.then(function(data) {
|
||||||
|
// $scope.categories = categories._embedded.categories;
|
||||||
|
//
|
||||||
|
// $scope.refreshList();
|
||||||
|
// });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.initList = function() {
|
$scope.initList = function() {
|
||||||
@@ -49,6 +59,10 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location'
|
|||||||
var categories = $resource('/categories/search/listForAccount', { accountId: $scope.accounts[0].id }).get();
|
var categories = $resource('/categories/search/listForAccount', { accountId: $scope.accounts[0].id }).get();
|
||||||
categories.$promise.then(function(data) {
|
categories.$promise.then(function(data) {
|
||||||
$scope.categories = categories._embedded.categories;
|
$scope.categories = categories._embedded.categories;
|
||||||
|
|
||||||
|
//$scope.categories.push({id: -1, name: '────────────────', position: 9999, disabled: true});
|
||||||
|
$scope.categories.push({id: -1, name: 'private Entnahme', position: 10000, _links: { self: {href: 'withdrawal'}}});
|
||||||
|
|
||||||
$scope.refreshList();
|
$scope.refreshList();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<div>
|
<div>
|
||||||
Betrag: <input name="amount" ng-model='transaction.amount' type='text' required ng-pattern="/^[+-]?(?:\d+(?:[\.,]\d{0,2})?|[\.,]\d{1,2})$/" />
|
Betrag: <input name="amount" ng-model='transaction.amount' type='text' required ng-pattern="/^[+-]?(?:\d+(?:[\.,]\d{0,2})?|[\.,]\d{1,2})$/" />
|
||||||
</div>
|
</div>
|
||||||
<span ng-show="form.amount.$error.pattern"">The value is not a valid value!</span>
|
<span ng-show="form.amount.$error.pattern">The value is not valid!</span>
|
||||||
<div>
|
<div>
|
||||||
Kategorie: <select ng-model='transaction.category' size='1'
|
Kategorie: <select ng-model='transaction.category' size='1'
|
||||||
ng-options="category.name for category in categories track by category._links.self.href">
|
ng-options="category.name for category in categories track by category._links.self.href">
|
||||||
@@ -18,6 +18,13 @@
|
|||||||
<div>
|
<div>
|
||||||
Notiz: <input ng-model='transaction.description' type='text' size='20' />
|
Notiz: <input ng-model='transaction.description' type='text' size='20' />
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
Auslage: <label><input name='expenseBy' type='radio' checked='checked' />Keine</label>
|
||||||
|
<label ng-repeat="user in users"><input name='expenseBy' type='radio' />{{user.name}}</label>
|
||||||
|
|
||||||
|
|
||||||
|
<input name='expenseBy' id='expenseBy{{id}}' type='radio' value='{{id}}' /><label for="expenseBy{{id}}">{{name}}</label>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<input type="submit" ng-disabled="form.amount.$error.pattern" />
|
<input type="submit" ng-disabled="form.amount.$error.pattern" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user