Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Update
Sander Dorigo941b02dc6833
diff --git a/app/Support/ExpandedForm.php b/app/Support/ExpandedForm.phpindex b228519060..e7e2a83bea 100644--- a/app/Support/ExpandedForm.php+++ b/app/Support/ExpandedForm.php@@ -66,7 +66,7 @@ class ExpandedForm])->render();} catch (Throwable $e) {Log::error(sprintf('Could not render amountNoCurrency(): %s', $e->getMessage()));- $html = 'Could not render amountNoCurrency.';+ $html = sprintf('Could not render amountNoCurrency: %s', $e->getMessage());throw new FireflyException($html, 0, $e);}@@ -135,7 +135,7 @@ class ExpandedForm$html = view('form.date', ['classes' => $classes, 'name' => $name, 'label' => $label, 'value' => $value, 'options' => $options])->render();} catch (Throwable $e) {Log::debug(sprintf('Could not render date(): %s', $e->getMessage()));- $html = 'Could not render date.';+ $html = sprintf('Could not render date: %s', $e->getMessage());throw new FireflyException($html, 0, $e);}@@ -157,7 +157,7 @@ class ExpandedForm$html = view('form.file', ['classes' => $classes, 'name' => $name, 'label' => $label, 'options' => $options])->render();} catch (Throwable $e) {Log::debug(sprintf('Could not render file(): %s', $e->getMessage()));- $html = 'Could not render file.';+ $html = sprintf('Could not render file-element: %s', $e->getMessage());throw new FireflyException($html, 0, $e);}@@ -378,7 +378,7 @@ class ExpandedForm])->render();} catch (Throwable $e) {Log::debug(sprintf('Could not render percentage(): %s', $e->getMessage()));- $html = 'Could not render percentage.';+ $html = sprintf('Could not render percentage: %s', $e->getMessage());throw new FireflyException($html, 0, $e);}diff --git a/resources/views/accounts/create.blade.php b/resources/views/accounts/create.blade.phpindex f6514b0676..2260e78bab 100644--- a/resources/views/accounts/create.blade.php+++ b/resources/views/accounts/create.blade.php@@ -14,7 +14,7 @@<div class="row"><div class="col-lg-6 col-md-6 col-sm-12">- <div class="card">+ <div class="card mb-2"><div class="card-header"><h3 class="card-title">{{ __('firefly.mandatoryFields') }}</h3></div>@@ -71,9 +71,9 @@<div class="card-body">{!! ExpandedForm::optionsList('create','account') !!}</div>- <div class="box-footer">- <button type="submit" class="btn pull-right btn-success">- {{ __('store_new_' . $objectType . '_account') }}+ <div class="card-footer text-end">+ <button type="submit" class="btn btn-success">+ {{ __('firefly.store_new_' . $objectType . '_account') }}</button></div></div>@@ -83,8 +83,8 @@@endsection@section('scripts')<script type="text/javascript" nonce="{{ $JS_NONCE }}">- var iAmOwed = '{{ __('i_am_owed_amount') }}';- var iOwe = '{{ __('i_owe_amount') }}';+ var iAmOwed = '{{ __('firefly.i_am_owed_amount') }}';+ var iOwe = '{{ __('firefly.i_owe_amount') }}';</script><script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ $FF_BUILD_TIME }}"nonce="{{ $JS_NONCE }}"></script>diff --git a/resources/views/form/assetAccountCheckList.twig b/resources/views/form/assetAccountCheckList.twigindex 71f81ef700..f4e5c8804e 100644--- a/resources/views/form/assetAccountCheckList.twig+++ b/resources/views/form/assetAccountCheckList.twig@@ -8,9 +8,9 @@<div class="checkbox ml-4"><label>{% if account in selected or (selected|length == 0 and options.select_all == true) %}- {{ Html.checkbox(name~'[]',true, id).id(id) }}+ {{ Html::checkbox(name~'[]',true, id).id(id) }}{% else %}- {{ Html.checkbox(name~'[]',false, id).id(id) }}+ {{ Html::checkbox(name~'[]',false, id).id(id) }}{% endif %}{{ account|escape }}</label>diff --git a/resources/views/form/checkbox.blade.php b/resources/views/form/checkbox.blade.phpindex 75c7287fb0..8c78ad3b56 100644--- a/resources/views/form/checkbox.blade.php+++ b/resources/views/form/checkbox.blade.php@@ -1,7 +1,6 @@<div class="row mb-3" id="{{ $name }}_holder"><div class="col-sm-9 offset-sm-3"><div class="form-check has-validation">- <!-- <input class="form-check-input" type="checkbox" id="gridCheck1"> -->{{ Html::checkbox($name, $options['checked'], $value)->class($inputClasses)->id($options['id']) }}<label class="form-check-label" for="{{ $options['id'] }}">{{ $label }}diff --git a/resources/views/form/date.blade.php b/resources/views/form/date.blade.phpindex 991458063a..39452ad853 100644--- a/resources/views/form/date.blade.php+++ b/resources/views/form/date.blade.php@@ -1,17 +1,17 @@-<div class="{{ $classes }}" id="{{ $name }}_holder">- <label for="{{ $options['id'] }}" class="col-sm-4 control-label">{{ $label }}</label>--- <div class="col-sm-8">+<div class="row mb-3" id="{{ $name }}_holder">+ <div class="input-group has-validation">+ <label for="{{ $options['id'] }}" class="col-sm-3 col-form-label">{{ $label }}</label>+ <div class="col-sm-9"><div class="input-group">- <div class="input-group-addon">+ <span class="input-group-text"><span class="bi bi-calendar"></span>- </div>+ </span>{{ Html::input('date', $name, $value)->id($options['id'])->class('form-control')->attribute('autocomplete','off')->attribute('spellcheck','false')- ->attribute('min', $options['min'] ?? null)+ ->attribute('min', $options['min'] ?? null)->attribute('lang','nl-NL')}}</div>@include('form.help')@include('form.feedback')</div></div>+</div>diff --git a/resources/views/form/file.blade.php b/resources/views/form/file.blade.phpindex 690a8d764e..5268973012 100644--- a/resources/views/form/file.blade.php+++ b/resources/views/form/file.blade.php@@ -1,9 +1,11 @@-<div class="{{ $classes }}" id="{{ $name }}_holder">- <label for="{{ $options['id'] }}" class="col-sm-4 control-label">{{ $label }}</label>+<div class="row mb-3" id="{{ $name }}_holder">+ <div class="input-group has-validation">+ <label for="{{ $options['id'] }}" class="col-sm-3 col-form-label has-validation">{{ $label }}</label>- <div class="col-sm-8">+ <div class="col-sm-9">{{ Html::input('file',$name)->id($options['id'])->attribute('multiple','multiple')->class('form-control') }}@include('form.help')@include('form.feedback')</div></div>+</div>diff --git a/resources/views/form/options.blade.php b/resources/views/form/options.blade.phpnew file mode 100644index 0000000000..8920c0dd25--- /dev/null+++ b/resources/views/form/options.blade.php@@ -0,0 +1,27 @@+@if('create' === $type)+ <div class="row mb-3" id="{{ $name }}_holder">+ <div class="col-sm-9 offset-sm-3">+ <div class="form-check has-validation">+ {{ Html::checkbox('create_another')->class('form-check-input')->id($name . '_return_to_form') }}+ <label class="form-check-label" for="{{ $name }}">+ {{ trans('form.returnHereExplanation') }}+ </label>+ </div>+ </div>+ </div>+@endif+@if('update' === $type)+ <div class="row mb-3" id="{{ $name }}_holder">+ <div class="col-sm-9 offset-sm-3">+ <div class="form-check has-validation">+ {{ Html::checkbox('create_another')->class('form-check-input')->id($name . '_return_to_edit') }}++ <label for="{{ $name }}_return_to_edit" class="col-sm-4 control-label">+ {{ trans('form.returnHere') }}+ {{ trans('form.returnHereUpdateExplanation') }}+ </label>+ </div>+ </div>+ </div>+@endif+diff --git a/resources/views/form/options.twig b/resources/views/form/options.twigdeleted file mode 100644index 4bc1835803..0000000000--- a/resources/views/form/options.twig+++ /dev/null@@ -1,34 +0,0 @@-{% if type == 'create' %}- <div class="form-group">- <label for="{{ name }}_return_to_form" class="col-sm-4 control-label">- {{ trans('form.returnHere') }}- </label>-- <div class="col-sm-8">- <div class="checkbox">- <label>- {{ Html.checkbox('create_another').id(name ~ '_return_to_form') }}- {{ trans('form.returnHereExplanation') }}-- </label>- </div>- </div>- </div>-{% endif %}--{% if type == 'update' %}- <div class="form-group">- <label for="{{ name }}_return_to_edit" class="col-sm-4 control-label">- {{ trans('form.returnHere') }}- </label>-- <div class="col-sm-8">- <div class="checkbox"><label>- {{ Html.checkbox('return_to_edit', null).id(name ~ '_return_to_edit') }}- {{ trans('form.returnHereUpdateExplanation') }}- </label>- </div>- </div>- </div>-{% endif %}-diff --git a/resources/views/form/percentage.blade.php b/resources/views/form/percentage.blade.phpindex 084b637870..ec0767bff8 100644--- a/resources/views/form/percentage.blade.php+++ b/resources/views/form/percentage.blade.php@@ -1,10 +1,10 @@<div class="row mb-3" id="{{ $name }}_holder"><div class="input-group has-validation">- <label for="{{ $options['id'] }}" class="col-sm-4 control-label">{{ $label }}</label>+ <label for="{{ $options['id'] }}" class="col-sm-3 col-form-label">{{ $label }}</label><div class="col-sm-9"><div class="input-group">{{ Html::input('number', $name, $value)->id($options['id'])->attribute('step',$options['step'])->attribute('autocomplete','off')->attribute('spellcheck', 'false')->class('form-control')->attribute('placeholder',$options['placeholder'] ?? '') }}- <div class="input-group-addon">%</div>+ <span class="input-group-text">%</span></div>@include('form.help')@include('form.feedback')diff --git a/resources/views/form/textarea.blade.php b/resources/views/form/textarea.blade.phpnew file mode 100644index 0000000000..c501b5d6cb--- /dev/null+++ b/resources/views/form/textarea.blade.php@@ -0,0 +1,11 @@+<div class="row mb-3" id="{{ $name }}_holder">+ <div class="input-group has-validation">+ <label for="{{ $options['id'] }}" class="col-sm-3 col-form-label has-validation">{{ $label }}</label>++ <div class="col-sm-9">+ {{ Html::textarea($name, $value)->id($options['id'])->attribute('rows', $options['rows'])->class('form-control')->attribute('autocomplete','off')->attribute('spellcheck','false')->attribute('placeholder',$options['placeholder'] ?? '') }}+ @include('form.help')+ @include('form.feedback')+ </div>+</div>+</div>diff --git a/resources/views/form/textarea.twig b/resources/views/form/textarea.twigdeleted file mode 100644index 0ff8a5a083..0000000000--- a/resources/views/form/textarea.twig+++ /dev/null@@ -1,9 +0,0 @@-<div class="{{ classes }}" id="{{ name }}_holder">- <label for="{{ options.id }}" class="col-sm-4 control-label">{{ label }}</label>-- <div class="col-sm-8">- {{ Html.textarea(name, value).id(options.id).attribute('rows', options.rows).class('form-control').attribute('autocomplete','off').attribute('spellcheck','false').attribute('placeholder',options.placeholder) }}- @include('form.help')- @include('form.feedback')- </div>-</div>