diff --git a/app/Support/Form/AccountForm.php b/app/Support/Form/AccountForm.php
index e5e07422d3..c94d150dbc 100644
--- a/app/Support/Form/AccountForm.php
+++ b/app/Support/Form/AccountForm.php
@@ -43,6 +43,8 @@ class AccountForm
use FormSupport;
/**
+ * TODO describe.
+ *
* @param string $name
* @param mixed $value
* @param array $options
@@ -85,6 +87,8 @@ class AccountForm
/**
+ * TODO describe.
+ *
* @param string $name
* @param mixed $value
* @param array $options
@@ -128,6 +132,8 @@ class AccountForm
}
/**
+ * TODO clean up.
+ *
* Grouped dropdown list of all accounts that are valid as the destination of a withdrawal.
*
* @param string $name
@@ -190,6 +196,7 @@ class AccountForm
}
/**
+ * TODO cleanup.
* Grouped dropdown list of all accounts that are valid as the destination of a withdrawal.
*
* @param string $name
@@ -249,6 +256,8 @@ class AccountForm
/**
+ * TODO describe and cleanup.
+ *
* @param string $name
* @param array $options
*
@@ -291,6 +300,8 @@ class AccountForm
}
/**
+ * TODO describe and cleanup.
+ *
* @param string $name
* @param mixed $value
* @param array $options
@@ -332,6 +343,7 @@ class AccountForm
/**
+ * TODO decribe and cleanup
* @param string $name
* @param mixed $value
* @param array $options
diff --git a/config/twigbridge.php b/config/twigbridge.php
index 30e7604efc..3b62450e26 100644
--- a/config/twigbridge.php
+++ b/config/twigbridge.php
@@ -197,16 +197,16 @@ return [
'ExpandedForm' => [
'is_safe' => [
'date', 'text', 'select', 'balance', 'optionsList', 'checkbox', 'amount', 'tags', 'integer', 'textarea', 'location', 'file', 'staticText',
- 'password', 'nonSelectableAmount', 'number', 'assetAccountList', 'amountNoCurrency', 'currencyList', 'ruleGroupList',
- 'assetAccountCheckList', 'ruleGroupListWithEmpty', 'piggyBankList', 'currencyListEmpty', 'percentage',
- 'activeLongAccountList', 'longAccountList', 'balanceAll', 'activeWithdrawalDestinations', 'activeDepositDestinations',
+ 'password', 'nonSelectableAmount', 'number', 'amountNoCurrency', 'currencyList', 'ruleGroupList',
+ 'ruleGroupListWithEmpty', 'piggyBankList', 'currencyListEmpty', 'percentage', 'balanceAll',
],
],
'AccountForm' => [
'is_safe' => [
- 'activeAssetAccountList', 'activeLongAccountList',
+ 'activeAssetAccountList', 'activeLongAccountList', 'activeWithdrawalDestinations', 'activeDepositDestinations',
+ 'assetAccountCheckList', 'assetAccountList', 'longAccountList',
],
],
],
diff --git a/resources/views/v1/piggy-banks/edit.twig b/resources/views/v1/piggy-banks/edit.twig
index 79770b0f09..c6b0d19a81 100644
--- a/resources/views/v1/piggy-banks/edit.twig
+++ b/resources/views/v1/piggy-banks/edit.twig
@@ -19,7 +19,7 @@
{{ ExpandedForm.text('name') }}
- {{ ExpandedForm.assetAccountList('account_id', null, {label: 'saveOnAccount'|_ }) }}
+ {{ AccountForm.assetAccountList('account_id', null, {label: 'saveOnAccount'|_ }) }}
{{ ExpandedForm.amountNoCurrency('targetamount') }}
diff --git a/resources/views/v1/recurring/create.twig b/resources/views/v1/recurring/create.twig
index 51616a2595..b666c8b025 100644
--- a/resources/views/v1/recurring/create.twig
+++ b/resources/views/v1/recurring/create.twig
@@ -93,7 +93,7 @@
{{ AccountForm.activeLongAccountList('source_id', null, {label: trans('form.asset_source_account')}) }}
{# for deposits, a drop down with revenue accounts, loan debt cash and mortgage #}
- {{ ExpandedForm.activeDepositDestinations('deposit_source_id', null, {label: trans('form.deposit_source_id')}) }}
+ {{ AccountForm.activeDepositDestinations('deposit_source_id', null, {label: trans('form.deposit_source_id')}) }}
{# destination if deposit or transfer: #}
{{ AccountForm.activeLongAccountList('destination_id', null, {label: trans('form.asset_destination_account')} ) }}
@@ -102,7 +102,7 @@
{#{{ ExpandedForm.text('destination_name', null, {label: trans('form.expense_account')}) }} #}
{# for withdrawals, also a drop down with expense accounts, loans, debts, mortgages or (cash). #}
- {{ ExpandedForm.activeWithdrawalDestinations('withdrawal_destination_id', null, {label: trans('form.withdrawal_destination_id')}) }}
+ {{ AccountForm.activeWithdrawalDestinations('withdrawal_destination_id', null, {label: trans('form.withdrawal_destination_id')}) }}
diff --git a/resources/views/v1/recurring/edit.twig b/resources/views/v1/recurring/edit.twig
index 50d4a4e2a3..05c81e9ecd 100644
--- a/resources/views/v1/recurring/edit.twig
+++ b/resources/views/v1/recurring/edit.twig
@@ -88,22 +88,22 @@
{{ ExpandedForm.amountNoCurrency('amount', array.transactions[0].amount) }}
{# source account if withdrawal, or if transfer: #}
- {{ ExpandedForm.longAccountList('source_id', array.transactions[0].source_id, {label: trans('form.asset_source_account')}) }}
+ {{ AccountForm.longAccountList('source_id', array.transactions[0].source_id, {label: trans('form.asset_source_account')}) }}
{# source account name for deposits: #}
{#{{ ExpandedForm.text('source_name', array.transactions[0].source_name, {label: trans('form.revenue_account')}) }}#}
{# NEW for deposits, a drop down with revenue accounts, loan debt cash and mortgage #}
- {{ ExpandedForm.activeDepositDestinations('deposit_source_id', preFilled.deposit_source_id, {label: trans('form.deposit_source_id')}) }}
+ {{ AccountForm.activeDepositDestinations('deposit_source_id', preFilled.deposit_source_id, {label: trans('form.deposit_source_id')}) }}
{# destination if deposit or transfer: #}
- {{ ExpandedForm.longAccountList('destination_id', array.transactions[0].destination_id, {label: trans('form.asset_destination_account')} ) }}
+ {{ AccountForm.longAccountList('destination_id', array.transactions[0].destination_id, {label: trans('form.asset_destination_account')} ) }}
{# destination account name for withdrawals #}
{# {{ ExpandedForm.text('destination_name', array.transactions[0].destination_name, {label: trans('form.expense_account')}) }}#}
{# NEW for withdrawals, also a drop down with expense accounts, loans, debts, mortgages or (cash). #}
- {{ ExpandedForm.activeWithdrawalDestinations('withdrawal_destination_id', preFilled.withdrawal_destination_id, {label: trans('form.withdrawal_destination_id')}) }}
+ {{ AccountForm.activeWithdrawalDestinations('withdrawal_destination_id', preFilled.withdrawal_destination_id, {label: trans('form.withdrawal_destination_id')}) }}
diff --git a/resources/views/v1/rules/rule-group/select-transactions.twig b/resources/views/v1/rules/rule-group/select-transactions.twig
index b24fb1b8f0..7d885c6258 100644
--- a/resources/views/v1/rules/rule-group/select-transactions.twig
+++ b/resources/views/v1/rules/rule-group/select-transactions.twig
@@ -28,7 +28,7 @@
{{ ExpandedForm.date('start_date', first) }}
{{ ExpandedForm.date('end_date', today) }}
- {{ ExpandedForm.assetAccountCheckList('accounts', {'select_all': true,'class': 'account-checkbox', 'label': trans('firefly.include_transactions_from_accounts') }) }}
+ {{ AccountForm.assetAccountCheckList('accounts', {'select_all': true,'class': 'account-checkbox', 'label': trans('firefly.include_transactions_from_accounts') }) }}
diff --git a/resources/views/v1/rules/rule/select-transactions.twig b/resources/views/v1/rules/rule/select-transactions.twig
index c6b49131df..6c9555d1a4 100644
--- a/resources/views/v1/rules/rule/select-transactions.twig
+++ b/resources/views/v1/rules/rule/select-transactions.twig
@@ -28,7 +28,7 @@
{{ ExpandedForm.date('start_date', first) }}
{{ ExpandedForm.date('end_date', today) }}
- {{ ExpandedForm.assetAccountCheckList('accounts', {'select_all': true, 'class': 'account-checkbox', 'label': trans('firefly.include_transactions_from_accounts') }) }}
+ {{ AccountForm.assetAccountCheckList('accounts', {'select_all': true, 'class': 'account-checkbox', 'label': trans('firefly.include_transactions_from_accounts') }) }}
diff --git a/resources/views/v1/transactions/convert.twig b/resources/views/v1/transactions/convert.twig
index eba06b4339..768ae2e33f 100644
--- a/resources/views/v1/transactions/convert.twig
+++ b/resources/views/v1/transactions/convert.twig
@@ -295,18 +295,6 @@
{% endif %}
#}
- {# in case of deposit #}
- {#
- {% if journalType.type == "Deposit" %}
-
- {% if sourceAccount.accountType.type == "Cash account" %}
- {{ ExpandedForm.staticText('source_account_revenue', '(cash)') }}
- {% else %}
- {{ ExpandedForm.staticText('source_account_revenue', ''~sourceAccount.name|escape~'') }}
- {% endif %}
- {{ ExpandedForm.staticText('destination_account_asset', ''~destinationAccount.name|escape~'') }}
- {% endif %}
- #}
{# in case of transfer #}
{% if sourceType.type == "Transfer" %}