mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-25 13:10:35 +00:00
Expand forms and improve validation for multi-account piggy banks
This commit is contained in:
@@ -2197,6 +2197,7 @@ return [
|
||||
'amount' => 'Amount',
|
||||
'overview' => 'Overview',
|
||||
'saveOnAccount' => 'Save on account',
|
||||
'saveOnAccounts' => 'Save on account(s)',
|
||||
'unknown' => 'Unknown',
|
||||
'monthly' => 'Monthly',
|
||||
'profile' => 'Profile',
|
||||
|
||||
@@ -69,6 +69,7 @@ return [
|
||||
// Ignore this comment
|
||||
|
||||
'targetamount' => 'Target amount',
|
||||
'target_amount' => 'Target amount',
|
||||
'account_role' => 'Account role',
|
||||
'opening_balance_date' => 'Opening balance date',
|
||||
'cc_type' => 'Credit card payment plan',
|
||||
@@ -106,7 +107,9 @@ return [
|
||||
'deletePermanently' => 'Delete permanently',
|
||||
'cancel' => 'Cancel',
|
||||
'targetdate' => 'Target date',
|
||||
'target_date' => 'Target date',
|
||||
'startdate' => 'Start date',
|
||||
'start_date' => 'Start date',
|
||||
'tag' => 'Tag',
|
||||
'under' => 'Under',
|
||||
'symbol' => 'Symbol',
|
||||
@@ -116,7 +119,6 @@ return [
|
||||
'creditCardNumber' => 'Credit card number',
|
||||
'has_headers' => 'Headers',
|
||||
'date_format' => 'Date format',
|
||||
'specifix' => 'Bank- or file specific fixes',
|
||||
'attachments[]' => 'Attachments',
|
||||
'title' => 'Title',
|
||||
'notes' => 'Notes',
|
||||
@@ -125,8 +127,7 @@ return [
|
||||
'size' => 'Size',
|
||||
'trigger' => 'Trigger',
|
||||
'stop_processing' => 'Stop processing',
|
||||
'start_date' => 'Start of range',
|
||||
'end_date' => 'End of range',
|
||||
'end_date' => 'End date',
|
||||
'enddate' => 'End date',
|
||||
'move_rules_before_delete' => 'Rule group',
|
||||
'start' => 'Start of range',
|
||||
|
||||
@@ -26,6 +26,8 @@ declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'invalid_account_type' => 'A piggy bank can only be linked to asset accounts and liabilities',
|
||||
'invalid_account_currency' => 'This account does not use the currency you have selected',
|
||||
'current_amount_too_much' => 'The combined amount in "current_amount" cannot exceed the "target_amount".',
|
||||
'filter_must_be_in' => 'Filter ":filter" must be one of: :values',
|
||||
'filter_not_string' => 'Filter ":filter" is expected to be a string of text',
|
||||
'bad_api_filter' => 'This API endpoint does not support ":filter" as a filter.',
|
||||
|
||||
10
resources/views/form/multi-select.twig
Normal file
10
resources/views/form/multi-select.twig
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="{{ classes }}" id="{{ name }}_holder">
|
||||
<label for="{{ options.id }}" class="col-sm-4 control-label">{{ label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{{ Html.select(name~"[]", list, selected).id(options.id).class('form-control').attribute('multiple').attribute('autocomplete','off').attribute('spellcheck','false').attribute('placeholder', options.placeholder) }}
|
||||
{% include 'form.help' %}
|
||||
{% include 'form.feedback' %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
<form method="POST" action="{{ route('piggy-banks.store') }}" accept-charset="UTF-8" class="form-horizontal" id="store" enctype="multipart/form-data">
|
||||
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="repeats" value="0"/>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
<div class="box box-primary">
|
||||
@@ -16,10 +15,10 @@
|
||||
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
{{ ExpandedForm.text('name') }}
|
||||
{{ AccountForm.assetAccountList('account_id', null, {label: 'saveOnAccount'|_ }) }}
|
||||
{{ ExpandedForm.amountNoCurrency('targetamount') }}
|
||||
{{ AccountForm.assetLiabilityMultiAccountList('accounts', null, {label: 'saveOnAccounts'|_ }) }}
|
||||
|
||||
{{ ExpandedForm.amountNoCurrency('target_amount') }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -30,7 +29,7 @@
|
||||
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.date('targetdate') }}
|
||||
{{ ExpandedForm.date('target_date') }}
|
||||
{{ ExpandedForm.textarea('notes', null, {helpText: trans('firefly.field_supports_markdown')} ) }}
|
||||
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
|
||||
{{ ExpandedForm.objectGroup() }}
|
||||
|
||||
Reference in New Issue
Block a user