Files
firefly-iii/resources/views/v1/accounts/create.twig

96 lines
4.7 KiB
Twig
Raw Normal View History

2016-11-06 08:11:43 +01:00
{% extends "./layout/default" %}
2015-06-19 20:59:14 +02:00
{% block breadcrumbs %}
2019-06-22 05:51:32 +02:00
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, objectType) }}
2015-06-19 20:59:14 +02:00
{% endblock %}
{% block content %}
<!-- set location data high up -->
<script type="text/javascript">
var locations = {{ locations|json_encode|raw }};
var mapboxToken = "{{ config('firefly.mapbox_api_key') }}";
</script>
2015-06-19 20:59:14 +02:00
2015-05-01 22:44:35 +02:00
<form action="{{ route('accounts.store') }}" method="post" id="store" class="form-horizontal">
2015-06-22 17:55:37 +02:00
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
2019-06-22 05:51:32 +02:00
<input type="hidden" name="objectType" value="{{ objectType }}"/>
2016-10-22 21:40:31 +02:00
<input type="hidden" name="active" value="1"/>
2015-05-01 22:44:35 +02:00
2015-05-01 23:17:17 +02:00
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
2015-06-20 07:29:25 +02:00
<div class="box box-primary">
<div class="box-header with-border">
2015-06-20 09:54:01 +02:00
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
2015-05-01 23:17:17 +02:00
</div>
2015-06-20 07:29:25 +02:00
<div class="box-body">
2015-05-01 23:17:17 +02:00
{{ ExpandedForm.text('name') }}
2019-06-22 05:51:32 +02:00
{% if objectType == 'asset' or objectType == 'liabilities' %}
2019-08-10 16:50:37 +02:00
{{ CurrencyForm.currencyList('currency_id', null, {helpText:'account_default_currency'|_}) }}
{% endif %}
2019-06-22 05:51:32 +02:00
{% if objectType == 'liabilities' %}
2018-08-04 17:30:47 +02:00
{{ ExpandedForm.select('liability_type_id', liabilityTypes) }}
2019-06-16 13:16:26 +02:00
{{ ExpandedForm.amountNoCurrency('opening_balance', null, {label:'debt_start_amount'|_, helpText: 'debt_start_amount_help'|_}) }}
{{ ExpandedForm.date('opening_balance_date', null, {label:'debt_start_date'|_}) }}
2018-08-04 17:30:47 +02:00
{{ ExpandedForm.percentage('interest') }}
{{ ExpandedForm.select('interest_period', interestPeriods) }}
{% endif %}
2015-05-01 23:17:17 +02:00
</div>
</div>
2015-05-01 22:44:35 +02:00
</div>
2015-05-01 23:17:17 +02:00
<div class="col-lg-6 col-md-6 col-sm-12">
2016-02-11 06:30:09 +01:00
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
2015-05-01 23:17:17 +02:00
{{ ExpandedForm.text('iban') }}
2016-11-28 18:55:56 +01:00
{{ ExpandedForm.text('BIC', null, {maxlength: 11}) }}
{{ ExpandedForm.text('account_number') }}
2016-02-11 06:30:09 +01:00
2019-06-22 05:51:32 +02:00
{% if objectType == 'asset' %}
2016-02-11 06:30:09 +01:00
2019-06-16 13:16:26 +02:00
{{ ExpandedForm.amountNoCurrency('opening_balance') }}
{{ ExpandedForm.date('opening_balance_date') }}
{{ ExpandedForm.select('account_role', roles,null,{helpText : 'asset_account_role_help'|_}) }}
{{ ExpandedForm.amountNoCurrency('virtual_balance') }}
{% endif %}
{# only correct way to do active checkbox #}
{{ ExpandedForm.checkbox('include_net_worth', 1) }}
2017-12-30 21:04:04 +01:00
{{ ExpandedForm.textarea('notes',null,{helpText: trans('firefly.field_supports_markdown')}) }}
{{ ExpandedForm.location('location', null, {locations:locations}) }}
2015-05-01 23:17:17 +02:00
</div>
</div>
2016-02-11 06:30:09 +01:00
2015-06-22 17:55:37 +02:00
2015-06-20 07:29:25 +02:00
<div class="box">
<div class="box-header with-border">
2015-06-20 09:54:01 +02:00
<h3 class="box-title">{{ 'options'|_ }}</h3>
2015-05-01 23:17:17 +02:00
</div>
2015-06-20 07:29:25 +02:00
<div class="box-body">
2015-05-01 23:17:17 +02:00
{{ ExpandedForm.optionsList('create','account') }}
</div>
2015-06-22 17:55:37 +02:00
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
2019-06-22 05:51:32 +02:00
{{ ('store_new_' ~ objectType ~ '_account')|_ }}
2015-06-22 17:55:37 +02:00
</button>
</div>
2015-05-01 23:17:17 +02:00
</div>
2015-05-01 22:44:35 +02:00
</div>
</div>
2015-06-22 17:55:37 +02:00
</form>
{% endblock %}
{% block scripts %}
2019-12-28 19:49:33 +01:00
<script src="v1/lib/leaflet/leaflet.js?v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="v1/js/lib/jquery-ui.min.js?v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="v1/js/ff/accounts/create.js?v={{ FF_VERSION }}"></script>
{% endblock %}
{% block styles %}
<link href="v1/css/jquery-ui/jquery-ui.structure.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all">
<link href="v1/css/jquery-ui/jquery-ui.theme.min.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all">
2019-12-28 19:49:33 +01:00
<link rel="stylesheet" href="v1/lib/leaflet/leaflet.css?v={{ FF_VERSION }}"/>
{% endblock %}