diff --git a/ui/BankingJavaFxApp/src/main/resources/Messages.properties b/ui/BankingJavaFxApp/src/main/resources/Messages.properties index 61484ec3..507a7763 100755 --- a/ui/BankingJavaFxApp/src/main/resources/Messages.properties +++ b/ui/BankingJavaFxApp/src/main/resources/Messages.properties @@ -55,6 +55,7 @@ enter.tan.dialog.tan.error.changing.tan.medium=Could not change TAN medium to \' transfer.money.dialog.title=Transfer money +transfer.money.dialog.account.label=Account: transfer.money.dialog.remittee.name.label=Remittee: transfer.money.dialog.remittee.iban.label=IBAN: transfer.money.dialog.remittee.bank.label=Bank: diff --git a/ui/BankingJavaFxApp/src/main/resources/Messages_de.properties b/ui/BankingJavaFxApp/src/main/resources/Messages_de.properties index 6f9e1c7a..8bf3836b 100755 --- a/ui/BankingJavaFxApp/src/main/resources/Messages_de.properties +++ b/ui/BankingJavaFxApp/src/main/resources/Messages_de.properties @@ -55,6 +55,7 @@ enter.tan.dialog.tan.error.changing.tan.medium=TAN Medium konnte nicht geändert transfer.money.dialog.title=Neue Überweisung +transfer.money.dialog.account.label=Konto: transfer.money.dialog.remittee.name.label=Begünstigter (Name oder Firma): transfer.money.dialog.remittee.iban.label=IBAN: transfer.money.dialog.remittee.bank.label=Bank: diff --git a/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt b/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt index 12ed574c..a718e51e 100644 --- a/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt +++ b/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt @@ -4,6 +4,7 @@ import javafx.beans.property.SimpleBooleanProperty import javafx.beans.property.SimpleDoubleProperty import javafx.beans.property.SimpleObjectProperty import javafx.beans.property.SimpleStringProperty +import javafx.collections.FXCollections import javafx.geometry.Insets import javafx.geometry.Pos import javafx.scene.layout.Priority @@ -17,6 +18,7 @@ import net.dankito.fints.messages.segmente.implementierte.sepa.SepaMessageCreato import net.dankito.fints.model.BankInfo import net.dankito.utils.javafx.ui.controls.doubleTextfield import net.dankito.utils.javafx.ui.dialogs.Window +import net.dankito.utils.javafx.ui.extensions.ensureOnlyUsesSpaceIfVisible import net.dankito.utils.javafx.ui.extensions.fixedHeight import net.dankito.utils.javafx.ui.extensions.fixedWidth import tornadofx.* @@ -36,7 +38,11 @@ open class TransferMoneyDialog @JvmOverloads constructor( } - protected val selectedBankAccount = SimpleObjectProperty(preselectedBankAccount ?: presenter.bankAccounts.firstOrNull { it.supportsTransferringMoney }) + protected val bankAccountsSupportingTransferringMoney = FXCollections.observableArrayList(presenter.bankAccounts.filter { it.supportsTransferringMoney }) + + protected val selectedBankAccount = SimpleObjectProperty(preselectedBankAccount ?: bankAccountsSupportingTransferringMoney.firstOrNull()) + + protected val showBankAccounts = SimpleBooleanProperty(bankAccountsSupportingTransferringMoney.size > 1) protected val remitteeName = SimpleStringProperty(preselectedValues?.creditorName ?: "") @@ -84,6 +90,19 @@ open class TransferMoneyDialog @JvmOverloads constructor( } fieldset { + field(messages["transfer.money.dialog.account.label"]) { + visibleWhen(showBankAccounts) + ensureOnlyUsesSpaceIfVisible() + + combobox(selectedBankAccount, bankAccountsSupportingTransferringMoney) { + fixedHeight = TextFieldHeight + } + + vboxConstraints { + marginBottom = 12.0 + } + } + field(messages["transfer.money.dialog.remittee.name.label"]) { textfield(this@TransferMoneyDialog.remitteeName) { fixedHeight = TextFieldHeight