mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Can edit as well.
This commit is contained in:
parent
11baa968cd
commit
f8e9ce0d52
@ -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'
|
||||
]
|
||||
],
|
||||
],
|
||||
|
@ -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>
|
||||
|
@ -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 %}
|
||||
|
11
resources/twig/form/checkbox.twig
Normal file
11
resources/twig/form/checkbox.twig
Normal file
@ -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>
|
Loading…
Reference in New Issue
Block a user