Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix forms
James Colef8b48f7455eb
diff --git a/app/Http/Controllers/Account/EditController.php b/app/Http/Controllers/Account/EditController.phpindex d2a71fb09e..bf98f2b733 100644--- a/app/Http/Controllers/Account/EditController.php+++ b/app/Http/Controllers/Account/EditController.php@@ -139,13 +139,13 @@ class EditController extends Controller'cc_type' => $repository->getMetaValue($account, 'cc_type'),'cc_monthly_payment_date' => $repository->getMetaValue($account, 'cc_monthly_payment_date'),'BIC' => $repository->getMetaValue($account, 'BIC'),- 'opening_balance_date' => $openingBalanceDate,+ 'opening_balance_date' => substr((string)$openingBalanceDate, 0, 10),'liability_type_id' => $account->account_type_id,'opening_balance' => app('steam')->bcround($openingBalanceAmount, $currency->decimal_places),'liability_direction' => $this->repository->getMetaValue($account, 'liability_direction'),'virtual_balance' => app('steam')->bcround($virtualBalance, $currency->decimal_places),'currency_id' => $currency->id,- 'include_net_worth' => $includeNetWorth,+ 'include_net_worth' => $hasOldInput ? (bool)$request->old('include_net_worth') : $includeNetWorth,'interest' => $repository->getMetaValue($account, 'interest'),'interest_period' => $repository->getMetaValue($account, 'interest_period'),'notes' => $this->repository->getNoteText($account),diff --git a/resources/views/accounts/edit.twig b/resources/views/accounts/edit.twigindex 2dfd0f81b2..b00131699f 100644--- a/resources/views/accounts/edit.twig+++ b/resources/views/accounts/edit.twig@@ -26,7 +26,7 @@<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3></div><div class="box-body">- {{ ExpandedForm.text('name') }}+ {{ ExpandedForm.text('name', account.name) }}{% if account.accountType.type == 'Default account' or account.accountType.type == 'Asset account' or objectType == 'liabilities' %}{{ CurrencyForm.currencyList('currency_id', null, {helpText:'account_default_currency'|_}) }}@@ -36,7 +36,7 @@{{ ExpandedForm.select('liability_type_id', liabilityTypes) }}{{ ExpandedForm.amountNoCurrency('opening_balance', null, {label:'debt_start_amount'|_}) }}{{ ExpandedForm.select('liability_direction', liabilityDirections) }}- {{ ExpandedForm.date('opening_balance_date', null, {label:'debt_start_date'|_}) }}+ {{ ExpandedForm.date('opening_balance_date', preFilled.opening_balance_date, {label:'debt_start_date'|_}) }}{{ ExpandedForm.percentage('interest') }}{{ ExpandedForm.select('interest_period', interestPeriods) }}{% endif %}@@ -50,7 +50,7 @@<h3 class="box-title">{{ 'optionalFields'|_ }}</h3></div><div class="box-body">- {{ ExpandedForm.text('iban') }}+ {{ ExpandedForm.text('iban', account.iban) }}{{ ExpandedForm.text('BIC', null, {maxlength: 11}) }}{% if preFilled.account_role == 'ccAsset' %}{{ ExpandedForm.text('account_number', null , {label:trans('form.creditCardNumber')}) }}@@ -62,7 +62,7 @@{# get opening balance entry for this thing! #}{{ ExpandedForm.amountNoCurrency('opening_balance',null) }}- {{ ExpandedForm.date('opening_balance_date') }}+ {{ ExpandedForm.date('opening_balance_date', preFilled.opening_balance_date) }}{{ ExpandedForm.select('account_role', roles) }}{{ ExpandedForm.amountNoCurrency('virtual_balance',null) }}diff --git a/resources/views/admin/link/edit.twig b/resources/views/admin/link/edit.twigindex 39635b8cad..e27a5f1432 100644--- a/resources/views/admin/link/edit.twig+++ b/resources/views/admin/link/edit.twig@@ -18,9 +18,9 @@<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3></div><div class="box-body">- {{ ExpandedForm.text('name', null, {helpText: trans('firefly.link_type_help_name')}) }}- {{ ExpandedForm.text('inward', null, {helpText: trans('firefly.link_type_help_inward')}) }}- {{ ExpandedForm.text('outward', null, {helpText: trans('firefly.link_type_help_outward')}) }}+ {{ ExpandedForm.text('name', linkType.name, {helpText: trans('firefly.link_type_help_name')}) }}+ {{ ExpandedForm.text('inward', linkType.inward, {helpText: trans('firefly.link_type_help_inward')}) }}+ {{ ExpandedForm.text('outward', linkType.outward, {helpText: trans('firefly.link_type_help_outward')}) }}</div></div></div>diff --git a/resources/views/admin/users/edit.twig b/resources/views/admin/users/edit.twigindex bcdd79ab15..9970950c13 100644--- a/resources/views/admin/users/edit.twig+++ b/resources/views/admin/users/edit.twig@@ -20,7 +20,7 @@</div><div class="box-body">{% if canEditDetails %}- {{ ExpandedForm.text('email',null,{'helpText': trans('firefly.admin_update_email')}) }}+ {{ ExpandedForm.text('email',user.email,{'helpText': trans('firefly.admin_update_email')}) }}{{ ExpandedForm.password('password') }}{{ ExpandedForm.password('password_confirmation') }}{% else %}diff --git a/resources/views/attachments/edit.twig b/resources/views/attachments/edit.twigindex e1136c5778..2a8a45c7e1 100644--- a/resources/views/attachments/edit.twig+++ b/resources/views/attachments/edit.twig@@ -5,7 +5,8 @@{% endblock %}{% block content %}- <form method="POST" action="{{ route('attachments.update', attachment.id) }}" accept-charset="UTF-8" class="form-horizontal" id="update">+ <form method="POST" action="{{ route('attachments.update', attachment.id) }}" accept-charset="UTF-8"+ class="form-horizontal" id="update"><input type="hidden" name="_token" value="{{ csrf_token() }}"/><input type="hidden" name="id" value="{{ attachment.id }}"/>@@ -37,6 +38,7 @@</div></div></div>+<div class="row"><div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">{# panel for options #}diff --git a/resources/views/bills/edit.twig b/resources/views/bills/edit.twigindex 09303033db..e20065ca8c 100644--- a/resources/views/bills/edit.twig+++ b/resources/views/bills/edit.twig@@ -19,16 +19,16 @@</div><div class="box-body">{% if rules.count() > 0 %}- {{ ExpandedForm.text('name',null, {helpText: trans_choice('firefly.bill_edit_rules', rules.count())}) }}+ {{ ExpandedForm.text('name', bill.name, {helpText: trans_choice('firefly.bill_edit_rules', rules.count())}) }}{% else %}- {{ ExpandedForm.text('name') }}+ {{ ExpandedForm.text('name', bill.name) }}{% endif %}{{ CurrencyForm.currencyList('transaction_currency_id') }}- {{ ExpandedForm.amountNoCurrency('amount_min') }}- {{ ExpandedForm.amountNoCurrency('amount_max') }}+ {{ ExpandedForm.amountNoCurrency('amount_min', bill.amount_min) }}+ {{ ExpandedForm.amountNoCurrency('amount_max', bill.amount_max) }}{{ ExpandedForm.date('date',bill.date.format('Y-m-d')) }}{{ ExpandedForm.select('repeat_freq',periods) }}- {{ ExpandedForm.integer('skip') }}+ {{ ExpandedForm.integer('skip', bill.skip) }}</div></div>diff --git a/resources/views/budgets/edit.twig b/resources/views/budgets/edit.twigindex 4fec930260..a68fe8a6c7 100644--- a/resources/views/budgets/edit.twig+++ b/resources/views/budgets/edit.twig@@ -18,7 +18,7 @@<div class="box-body">{# only correct way to do active checkbox #}{{ ExpandedForm.checkbox('active', 1) }}- {{ ExpandedForm.text('name') }}+ {{ ExpandedForm.text('name', budget.name) }}</div></div>diff --git a/resources/views/categories/edit.twig b/resources/views/categories/edit.twigindex d2bb786836..aa9b6263d6 100644--- a/resources/views/categories/edit.twig+++ b/resources/views/categories/edit.twig@@ -19,7 +19,7 @@<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3></div><div class="box-body">- {{ ExpandedForm.text('name') }}+ {{ ExpandedForm.text('name', category.name) }}</div></div></div>diff --git a/resources/views/currencies/edit.twig b/resources/views/currencies/edit.twigindex 422de5ce6e..3bd7e52b21 100644--- a/resources/views/currencies/edit.twig+++ b/resources/views/currencies/edit.twig@@ -18,11 +18,11 @@<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3></div><div class="box-body">- {{ ExpandedForm.text('name',null,{'maxlength' : 48}) }}- {{ ExpandedForm.text('symbol',null,{'maxlength' : 51}) }}- {{ ExpandedForm.text('code',null,{'maxlength' : 51}) }}- {{ ExpandedForm.integer('decimal_places',null,{'maxlength' : 2,'min': 0,'max': 12}) }}- {{ ExpandedForm.checkbox('enabled',null) }}+ {{ ExpandedForm.text('name', currency.name,{'maxlength' : 48}) }}+ {{ ExpandedForm.text('symbol', currency.symbol,{'maxlength' : 51}) }}+ {{ ExpandedForm.text('code', currency.code,{'maxlength' : 51}) }}+ {{ ExpandedForm.integer('decimal_places', currency.decimal_places,{'maxlength' : 2,'min': 0,'max': 12}) }}+ {{ ExpandedForm.checkbox('enabled', currency.enabled) }}</div></div></div>diff --git a/resources/views/object-groups/edit.twig b/resources/views/object-groups/edit.twigindex dc046a865a..d6d52e29c6 100644--- a/resources/views/object-groups/edit.twig+++ b/resources/views/object-groups/edit.twig@@ -19,7 +19,7 @@<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3></div><div class="box-body">- {{ ExpandedForm.text('title') }}+ {{ ExpandedForm.text('title', objectGroup.title) }}</div></div>diff --git a/resources/views/piggy-banks/edit.twig b/resources/views/piggy-banks/edit.twigindex 4adf6f003a..636a932124 100644--- a/resources/views/piggy-banks/edit.twig+++ b/resources/views/piggy-banks/edit.twig@@ -5,7 +5,7 @@{% endblock %}{% block content %}- <form method="post" action="{{ route('piggy-banks.update',piggyBank.id) }}" class="form-horizontal"+ <form method="post" action="{{ route('piggy-banks.update', piggyBank.id) }}" class="form-horizontal"accept-charset="UTF-8"enctype="multipart/form-data"><input type="hidden" name="_token" value="{{ csrf_token() }}"/>@@ -19,8 +19,8 @@<div class="box-header with-border"><h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3></div>- <div class="box-body">+ <div class="box-body">{{ ExpandedForm.text('name') }}{{ AccountForm.assetAccountList('account_id', null, {label: 'saveOnAccount'|_ }) }}{{ ExpandedForm.amountNoCurrency('targetamount') }}diff --git a/resources/views/recurring/edit.twig b/resources/views/recurring/edit.twigindex c288fb0de5..667b46c49c 100644--- a/resources/views/recurring/edit.twig+++ b/resources/views/recurring/edit.twig@@ -20,7 +20,7 @@</div><div class="box-body"><input type="hidden" name="id" value="{{ array.id }}"/>- {{ ExpandedForm.text('title') }}+ {{ ExpandedForm.text('title', array.title) }}{{ ExpandedForm.date('first_date',array.first_date, {helpText: trans('firefly.help_first_date_no_past')}) }}{{ ExpandedForm.select('repetition_type', [], null, {helpText: trans('firefly.change_date_other_options')}) }}{{ ExpandedForm.integer('skip', array.repetitions[0].skip) }}diff --git a/resources/views/rules/rule-group/edit.twig b/resources/views/rules/rule-group/edit.twigindex 1d45427417..4f42533ba0 100644--- a/resources/views/rules/rule-group/edit.twig+++ b/resources/views/rules/rule-group/edit.twig@@ -21,7 +21,7 @@{# only correct way to do active checkbox #}{{ ExpandedForm.checkbox('active', 1) }}- {{ ExpandedForm.text('title') }}+ {{ ExpandedForm.text('title', ruleGroup.title) }}</div></div>diff --git a/resources/views/rules/rule/edit.twig b/resources/views/rules/rule/edit.twigindex eed1e2f45c..53d1cf8739 100644--- a/resources/views/rules/rule/edit.twig+++ b/resources/views/rules/rule/edit.twig@@ -17,7 +17,7 @@<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3></div><div class="box-body">- {{ ExpandedForm.text('title') }}+ {{ ExpandedForm.text('title', rule.title) }}{{ RuleForm.ruleGroupList('rule_group_id', ruleGroup.id) }}{{ ExpandedForm.select('trigger',allJournalTriggers(), primaryTrigger) }}diff --git a/resources/views/tags/edit.twig b/resources/views/tags/edit.twigindex e862c6dacf..c07494a04d 100644--- a/resources/views/tags/edit.twig+++ b/resources/views/tags/edit.twig@@ -24,7 +24,7 @@<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3></div><div class="box-body">- {{ ExpandedForm.text('tag') }}+ {{ ExpandedForm.text('tag', tag.tag) }}</div></div></div>