mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 13:36:15 +00:00
Lots of new code for new transaction screen.
This commit is contained in:
@@ -31,18 +31,4 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if type == 'create' and name == 'transaction' %}
|
||||
<div class="form-group">
|
||||
<label for="{{ name }}_split" class="col-sm-4 control-label">
|
||||
{{ trans('form.split_journal') }}
|
||||
</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="checkbox"><label>
|
||||
{{ Form.checkbox('split_journal', '1', old('split_journal') == '1', {'id': name ~ 'split'}) }}
|
||||
{{ trans('form.split_journal_explanation') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -193,8 +193,8 @@
|
||||
{% if not shownDemo %}
|
||||
<script type="text/javascript">
|
||||
var routeForTour = "{{ current_route_name }}";
|
||||
var routeStepsUri = "{{ route('json.intro', [current_route_name, what|default("")]) }}";
|
||||
var routeForFinishedTour = "{{ route('json.intro.finished', [current_route_name, what|default("")]) }}";
|
||||
var routeStepsUri = "{{ route('json.intro', [current_route_name, objectType|default("")]) }}";
|
||||
var routeForFinishedTour = "{{ route('json.intro.finished', [current_route_name, objectType|default("")]) }}";
|
||||
</script>
|
||||
<script type="text/javascript" src="v1/lib/intro/intro.min.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="v1/js/ff/intro/intro.js?v={{ FF_VERSION }}"></script>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>X</th>
|
||||
<th>
|
||||
{{ groups.render }}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -12,22 +12,22 @@
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li class="{{ activeRoutePartialWhat('accounts', 'asset') }}">
|
||||
<li class="{{ activeRoutePartialObjectType('accounts', 'asset') }}">
|
||||
<a href="{{ route('accounts.index','asset') }}">
|
||||
<i class="fa fa-money fa-fw"></i> {{ 'asset_accounts'|_ }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ activeRoutePartialWhat('accounts', 'expense') }}">
|
||||
<li class="{{ activeRoutePartialObjectType('accounts', 'expense') }}">
|
||||
<a href="{{ route('accounts.index','expense') }}">
|
||||
<i class="fa fa-shopping-cart fa-fw"></i> {{ 'expense_accounts'|_ }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ activeRoutePartialWhat('accounts', 'revenue') }}">
|
||||
<li class="{{ activeRoutePartialObjectType('accounts', 'revenue') }}">
|
||||
<a href="{{ route('accounts.index','revenue') }}">
|
||||
<i class="fa fa-download fa-fw"></i> {{ 'revenue_accounts'|_ }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ activeRoutePartialWhat('accounts', 'liabilities') }}">
|
||||
<li class="{{ activeRoutePartialObjectType('accounts', 'liabilities') }}">
|
||||
<a href="{{ route('accounts.index','liabilities') }}">
|
||||
<i class="fa fa-ticket fa-fw"></i> {{ 'liabilities_accounts'|_ }}
|
||||
</a>
|
||||
@@ -67,15 +67,15 @@
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li class="{{ activeRoutePartialWhat('transactions','withdrawal') }}">
|
||||
<li class="{{ activeRoutePartialObjectType('transactions','withdrawal') }}">
|
||||
<a href="{{ route('transactions.index','withdrawal') }}">
|
||||
<i class="fa fa-long-arrow-left fa-fw"></i> {{ 'expenses'|_ }}</a>
|
||||
</li>
|
||||
<li class="{{ activeRoutePartialWhat('transactions','deposit') }}">
|
||||
<li class="{{ activeRoutePartialObjectType('transactions','deposit') }}">
|
||||
<a href="{{ route('transactions.index','deposit') }}"><i
|
||||
class="fa fa-long-arrow-right fa-fw"></i> {{ 'income'|_ }}</a>
|
||||
</li>
|
||||
<li class="{{ activeRoutePartialWhat('transactions','transfers') }}">
|
||||
<li class="{{ activeRoutePartialObjectType('transactions','transfers') }}">
|
||||
<a href="{{ route('transactions.index','transfers') }}">
|
||||
<i class="fa fa-fw fa-exchange"></i> {{ 'transfers'|_ }}</a>
|
||||
</li>
|
||||
|
||||
288
resources/views/v1/transactions/create.twig
Normal file
288
resources/views/v1/transactions/create.twig
Normal file
@@ -0,0 +1,288 @@
|
||||
{% 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 %}
|
||||
@@ -31,7 +31,7 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
{# actual list #}
|
||||
{% include 'list.transactions' %}
|
||||
{% include 'list.groups' %}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{# links for other views #}
|
||||
|
||||
Reference in New Issue
Block a user