bugfix: no autoselect creditor for withdrawals
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>de.tilman</groupId>
|
<groupId>de.tilman</groupId>
|
||||||
<artifactId>next-transactions</artifactId>
|
<artifactId>next-transactions</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.3</version>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
|||||||
@@ -101,27 +101,8 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$routePara
|
|||||||
}
|
}
|
||||||
|
|
||||||
$scope.checkCategory = function() {
|
$scope.checkCategory = function() {
|
||||||
|
|
||||||
var radioButtons = document.getElementsByName('expenseBy');
|
var radioButtons = document.getElementsByName('expenseBy');
|
||||||
var userLabels = document.getElementsByClassName('userLabel');
|
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() {
|
$scope.initList = function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user