bugfix: no autoselect creditor for withdrawals

This commit is contained in:
2016-07-29 00:07:41 +02:00
parent 6b4264f24f
commit 2775b81ce5
2 changed files with 1 additions and 20 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.tilman</groupId>
<artifactId>next-transactions</artifactId>
<version>1.3.2</version>
<version>1.3.3</version>
<parent>
<groupId>org.springframework.boot</groupId>
@@ -101,27 +101,8 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$routePara
}
$scope.checkCategory = function() {
var radioButtons = document.getElementsByName('expenseBy');
var userLabels = document.getElementsByClassName('userLabel');
// if this is selected to be a withdrawal, preselect the current user and lock the radio buttons
if ($scope.transaction.category.name === 'Private Entnahme') {
for (i = 0; i < userLabels.length; i++) {
if (userLabels[i].innerHTML.indexOf($scope.userinfo.name) >= 0) {
userLabels[i].getElementsByTagName('INPUT')[0].checked = true;
}
}
for (i = 0; i < radioButtons.length; i++) {
radioButtons[i].disabled = true;
}
}
else {
for (i = 0; i < radioButtons.length; i++) {
radioButtons[i].disabled = false;
}
radioButtons[0].checked = true;
}
}
$scope.initList = function() {