perfin/src/main/resources/create-transaction.fxml

73 lines
3.8 KiB
Plaintext
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<BorderPane xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
fx:controller="com.andrewlalis.perfin.control.CreateTransactionController"
stylesheets="@style/base.css"
>
<center>
<ScrollPane fitToWidth="true" fitToHeight="true">
<VBox styleClass="std-spacing,std-padding" style="-fx-max-width: 500px;">
2023-12-28 21:19:21 +00:00
<!-- Basic properties -->
<VBox>
<Label text="Timestamp" labelFor="${timestampField}" styleClass="bold-text"/>
<TextField fx:id="timestampField" styleClass="mono-font"/>
<Label fx:id="timestampInvalidLabel" text="Invalid timestamp." styleClass="error-text"/>
<Label fx:id="timestampFutureLabel" text="Timestamp cannot be in the future." styleClass="error-text"/>
</VBox>
<VBox>
<Label text="Amount" labelFor="${amountField}" styleClass="bold-text"/>
<TextField fx:id="amountField" styleClass="mono-font"/>
</VBox>
<VBox>
<Label text="Currency" labelFor="${currencyChoiceBox}" styleClass="bold-text"/>
<ChoiceBox fx:id="currencyChoiceBox"/>
</VBox>
<VBox>
<Label text="Description" labelFor="${descriptionField}" styleClass="bold-text"/>
<Label text="Maximum of 255 characters." styleClass="small-font"/>
<TextArea
fx:id="descriptionField"
styleClass="mono-font"
wrapText="true"
style="-fx-pref-height: 100px;-fx-min-height: 100px;"
/>
<Label fx:id="descriptionErrorLabel" styleClass="error-text" wrapText="true"/>
</VBox>
2023-12-28 21:19:21 +00:00
<!-- Container for linked accounts -->
<VBox>
<HBox styleClass="std-spacing">
<VBox>
<Label text="Debited Account" labelFor="${linkDebitAccountComboBox}" styleClass="bold-text"/>
<ComboBox fx:id="linkDebitAccountComboBox">
<tooltip><Tooltip text="The account whose assets will increase as a result of this transaction."/></tooltip>
</ComboBox>
</VBox>
<VBox>
<Label text="Credited Account" labelFor="${linkCreditAccountComboBox}" styleClass="bold-text"/>
<ComboBox fx:id="linkCreditAccountComboBox">
<tooltip><Tooltip text="The account whose assets will decrease as a result of this transaction."/></tooltip>
</ComboBox>
</VBox>
</HBox>
<Label fx:id="linkedAccountsErrorLabel" styleClass="error-text" wrapText="true"/>
</VBox>
2023-12-28 21:19:21 +00:00
<!-- Container for attachments -->
<VBox fx:id="attachmentsVBox">
2023-12-28 21:19:21 +00:00
<Label text="Attachments" styleClass="bold-text"/>
<Label text="Attach receipts, invoices, or other content to this transaction." styleClass="small-font" wrapText="true"/>
<!-- FileSelectionArea inserted here! -->
2023-12-28 21:19:21 +00:00
</VBox>
</VBox>
</ScrollPane>
</center>
<bottom>
<HBox styleClass="std-padding,std-spacing">
<Button text="Save" onAction="#save"/>
<Button text="Cancel" onAction="#cancel"/>
</HBox>
</bottom>
</BorderPane>