mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
289 lines
16 KiB
Twig
289 lines
16 KiB
Twig
{% extends "./layout/default" %}
|
|
|
|
{% block breadcrumbs %}
|
|
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, objectType) }}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<create-transaction></create-transaction>
|
|
|
|
|
|
{#
|
|
<form method="POST" action="{{ route('transactions.store') }}" accept-charset="UTF-8" class="form-horizontal" id="store" enctype="multipart/form-data">
|
|
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
|
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<div class="box">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">
|
|
{{ 'split_transaction_title'|_ }}
|
|
</h3>
|
|
</div>
|
|
<div class="box-body">
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<input type="text" class="form-control" name="group_title"
|
|
title="{{ 'split_transaction_title'|_ }}" autocomplete="off" placeholder="{{ 'split_transaction_title'|_ }}">
|
|
<p class="help-block">
|
|
{{ 'split_title_help'|_ }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="transactions">
|
|
<div class="row transactionRow">
|
|
<div class="col-lg-12">
|
|
<div class="box">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title splitTitle">
|
|
{{ 'transaction_information'|_ }}
|
|
</h3>
|
|
</div>
|
|
<div class="box-body">
|
|
<div class="row">
|
|
<div class="col-lg-4">
|
|
<div class="form-group transactionTypeIndicatorBlock" style="display:none;">
|
|
<div class="col-sm-12">
|
|
<label class="control-label transactionTypeIndicator text-info"></label>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
|
|
<div class="input-group">
|
|
<input type="text" data-index="0" class="form-control indexField sourceAccountAC" name="source[]"
|
|
title="{{ trans('form.source_account') }}" autocomplete="off"
|
|
placeholder="{{ trans('form.source_account') }}">
|
|
<span class="input-group-btn">
|
|
<button class="btn btn-default clearSource" type="button"><i class="fa fa-trash-o"></i></button>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<div class="input-group">
|
|
<input data-index="0" type="text" class="form-control indexField destinationAccountAC" name="destination[]"
|
|
title="{{ trans('form.destination_account') }}" autocomplete="off"
|
|
placeholder="{{ trans('form.destination_account') }}">
|
|
<span class="input-group-btn">
|
|
<button class="btn btn-default clearDestination" type="button"><i class="fa fa-trash-o"></i></button>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<input type="text" class="form-control" name="description[]"
|
|
title="{{ trans('form.description') }}" autocomplete="off" placeholder="{{ trans('form.description') }}">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<input type="date" class="form-control" name="date[]"
|
|
title="{{ trans('form.date') }}" value="{{ phpdate('Y-m-d') }}" autocomplete="off"
|
|
placeholder="{{ trans('form.date') }}">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-4">
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">$</label>
|
|
<div class="col-sm-9">
|
|
<input type="number" step="any" class="form-control" name="amount[]"
|
|
title="{{ trans('form.amount') }}" autocomplete="off" placeholder="{{ trans('form.amount') }}">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-sm-3">
|
|
<select name="foreign_amount">
|
|
<option>none</option>
|
|
<option>USD</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-sm-9">
|
|
<input type="number" step="any" class="form-control" name="amount[]"
|
|
title="Foreign amount" autocomplete="off" placeholder="Foreign amount">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-4">
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<select name="budget">
|
|
<option>budget</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<input type="text" class="form-control" name="category[]"
|
|
title="Category" autocomplete="off" placeholder="Category">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<input type="text" class="form-control" name="tags[]"
|
|
title="Tags" autocomplete="off" placeholder="Tags">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<select name="piggy">
|
|
<option>Piggy</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{% if
|
|
optionalFields.interest_date or optionalFields.book_date or optionalFields.process_date
|
|
or optionalFields.due_date or optionalFields.payment_date
|
|
or optionalFields.invoice_date %}
|
|
{% for field in ['interest_date','book_date','process_date','due_date','payment_date','invoice_date'] %}
|
|
{% if optionalFields[field] %}
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<input type="text" class="form-control" name="{{ field }}[]"
|
|
title="{{ field }}" autocomplete="off" placeholder="{{ field }}">
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
|
|
{% if optionalFields.internal_reference or optionalFields.notes %}
|
|
|
|
{% if optionalFields.internal_reference %}
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<input type="text" class="form-control" name="internal_reference[]"
|
|
title="internal_reference" autocomplete="off" placeholder="internal_reference">
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
{% if optionalFields.notes %}
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<textarea></textarea>
|
|
<br>
|
|
{{ trans('firefly.field_supports_markdown')|raw }}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
|
|
{% if optionalFields.attachments %}
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
|
|
<input multiple="multiple" class="form-control"
|
|
autocomplete="off" placeholder="Attachments" name="attachments[]" type="file">
|
|
<p class="help-block">
|
|
{{ trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
{% if
|
|
not optionalFields.interest_date or
|
|
not optionalFields.book_date or
|
|
not optionalFields.process_date or
|
|
not optionalFields.due_date or
|
|
not optionalFields.payment_date or
|
|
not optionalFields.invoice_date or
|
|
not optionalFields.internal_reference or
|
|
not optionalFields.notes or
|
|
not optionalFields.attachments %}
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<p class="text-success"><i class="fa fa-info-circle"></i>
|
|
<em>{{ trans('firefly.hidden_fields_preferences', {link: route('preferences.index')})|raw }}</em></p>
|
|
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<p>
|
|
<button id="addSplitButton" class="btn btn-primary">Add another split</button>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
|
|
<div class="box">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">{{ 'options'|_ }}</h3>
|
|
</div>
|
|
<div class="box-body">
|
|
{{ ExpandedForm.optionsList('create','transaction') }}
|
|
</div>
|
|
<div class="box-footer">
|
|
<button type="submit" class="transaction-btn btn btn-success pull-right">
|
|
{{ trans('form.store_new_transaction') }}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
#}
|
|
{% endblock %}
|
|
{% block scripts %}
|
|
<script type="text/javascript">
|
|
var allowedOpposingTypes = {{ allowedOpposingTypes|json_encode|raw }};
|
|
var accountToTypes = {{ accountToTypes|json_encode|raw }};
|
|
var defaultCurrency = {{ defaultCurrency.toArray()|json_encode|raw }};
|
|
</script>
|
|
<!--
|
|
<script type="text/javascript">
|
|
var transactionType = 'none';
|
|
|
|
var accountToTypes = {{ accountToTypes|json_encode|raw }};
|
|
|
|
var creatingTypes = {
|
|
Transfer: "{{ 'you_create_transfer'|_ }}",
|
|
Withdrawal: "{{ 'you_create_withdrawal'|_ }}",
|
|
Deposit: "{{ 'you_create_deposit'|_ }}",
|
|
};
|
|
|
|
// options for source account selection.
|
|
var sourceAccount = null;
|
|
var sourceAllowedAccountTypes = [];
|
|
|
|
// options for destination account selection.
|
|
var destinationAccount = null;
|
|
var destAllowedAccountTypes = [];
|
|
|
|
</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.autocomplete.min.js?v={{ FF_VERSION }}"></script>
|
|
<script type="text/javascript" src="v1/js/ff/transactions/create.js?v={{ FF_VERSION }}"></script>
|
|
-->
|
|
{% endblock %}
|
|
|
|
{% block styles %}
|
|
{% endblock %}
|