Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Can edit as well.
James Colef8e9ce0d5240
diff --git a/app/Providers/ConfigServiceProvider.php b/app/Providers/ConfigServiceProvider.phpindex 0af1c058c7..a23a061d87 100644--- a/app/Providers/ConfigServiceProvider.php+++ b/app/Providers/ConfigServiceProvider.php@@ -165,12 +165,12 @@ class ConfigServiceProvider extends ServiceProvider'Config','ExpandedForm' => ['is_safe' => [- 'date','text','select','balance','optionsList'+ 'date','text','select','balance','optionsList','checkbox']],'Form' => ['is_safe' => [- 'input','select','checkbox'+ 'input','select','checkbox','model']],],diff --git a/resources/twig/accounts/create.twig b/resources/twig/accounts/create.twigindex 20da44b186..6ed1f2dfaf 100644--- a/resources/twig/accounts/create.twig+++ b/resources/twig/accounts/create.twig@@ -28,7 +28,7 @@{{ ExpandedForm.balance('openingBalance') }}{{ ExpandedForm.date('openingBalanceDate', phpdate('Y-m-d')) }}- {{ ExpandedForm.select('accountRole') }}+ {{ ExpandedForm.select('accountRole', Config.get('firefly.accountRoles'),null,{'helpText' : 'Any extra options resulting from your choice can be set later.'}) }}{{ ExpandedForm.balance('virtualBalance') }}</div>diff --git a/resources/twig/accounts/edit.twig b/resources/twig/accounts/edit.twigindex 0ecfceb939..19968766f8 100644--- a/resources/twig/accounts/edit.twig+++ b/resources/twig/accounts/edit.twig@@ -1,18 +1,18 @@{% extends "./layout/default.twig" %}{% block content %}-{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $account) !!}-{!! Form::model($account, ['class' => 'form-horizontal','id' => 'update','url' => route('accounts.update',$account->id)]) !!}+{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute().getName(), account) }}+{{ Form.model(account, {'class' : 'form-horizontal','id' : 'update','url' : route('accounts.update',account.id) } ) }}-<input type="hidden" name="id" value="{{$account->id}}" />+<input type="hidden" name="id" value="{{account.id}}" /><div class="row"><div class="col-lg-6 col-md-6 col-sm-12"><div class="panel panel-primary"><div class="panel-heading">- <i class="fa {{{$subTitleIcon}}}"></i> Mandatory fields+ <i class="fa {{ subTitleIcon }}"></i> Mandatory fields</div><div class="panel-body">- {!! ExpandedForm::text('name') !!}+ {{ ExpandedForm.text('name') }}</div></div>@@ -23,37 +23,37 @@<i class="fa fa-smile-o"></i> Optional fields</div><div class="panel-body">- @if($account->accounttype->type == 'Default account' || $account->accounttype->type == 'Asset account')- {!! ExpandedForm::balance('openingBalance',null, ['currency' => $openingBalance ? $openingBalance->transactionCurrency : null]) !!}- {!! ExpandedForm::date('openingBalanceDate') !!}- {!! ExpandedForm::select('accountRole',Config::get('firefly.accountRoles')) !!}- {!! ExpandedForm::balance('virtualBalance',null) !!}- {!! Form::hidden('id',$account->id) !!}- @endif- {!! ExpandedForm::checkbox('active','1') !!}+ {% if account.accounttype.type == 'Default account' or account.accounttype.type == 'Asset account' %}+ {{ ExpandedForm.balance('openingBalance',null, {'currency' : openingBalance ? openingBalance.transactionCurrency : null}) }}+ {{ ExpandedForm.date('openingBalanceDate') }}+ {{ ExpandedForm.select('accountRole',Config.get('firefly.accountRoles')) }}+ {{ ExpandedForm.balance('virtualBalance',null) }}++ {% endif %}+ {{ ExpandedForm.checkbox('active','1') }}</div></div><!-- panel for credit card options -->- @if(Session::get('preFilled')['accountRole'] == 'ccAsset')+ {% if Session.get('preFilled').accountRole == 'ccAsset' %}<div class="panel panel-default"><div class="panel-heading"><i class="fa fa-credit-card"></i> Credit card options</div><div class="panel-body">- {!! ExpandedForm::select('ccType',Config::get('firefly.ccTypes')) !!}- {!! ExpandedForm::date('ccMonthlyPaymentDate',null,['helpText' => 'Select any year and any month, it will be ignored anway. Only the day of the month is relevant.']) !!}+ {{ ExpandedForm.select('ccType',Config.get('firefly.ccTypes')) }}+ {{ ExpandedForm.date('ccMonthlyPaymentDate',null,{'helpText' : 'Select any year and any month, it will be ignored anway. Only the day of the month is relevant.'}) }}</div></div>- @endif+ {% endif %}- <!-- panel for options -->+ <!-- panel for options --><div class="panel panel-default"><div class="panel-heading"><i class="fa fa-bolt"></i> Options</div><div class="panel-body">- {!! ExpandedForm::optionsList('update','account') !!}+ {{ ExpandedForm.optionsList('update','account') }}</div></div></div>@@ -67,6 +67,5 @@</p></div></div>--{!! Form::close() !!}+</form>{% endblock %}diff --git a/resources/twig/form/checkbox.twig b/resources/twig/form/checkbox.twignew file mode 100644index 0000000000..21d8e59177--- /dev/null+++ b/resources/twig/form/checkbox.twig@@ -0,0 +1,11 @@+<div class="{{ classes }}">+ <label for="{{ options.id }}" class="col-sm-4 control-label">{{ label }}</label>+ <div class="col-sm-8">+ <div class="checkbox">+ <label>+ {{ Form.checkbox(name, value, options.checked, options) }}+ </label>+ </div>+ {% include 'form/feedback.twig' %}+ </div>+</div>