Skip to content

Firefly III: a personal finances manager

Various code cleanup.

James Colea0ea3882e192
diff --git a/resources/views/admin/index.twig b/resources/views/admin/index.twig
index ea8a12b066..926a43e2e2 100644
--- a/resources/views/admin/index.twig
+++ b/resources/views/admin/index.twig
@@ -4,21 +4,21 @@
{{ Breadcrumbs.renderIfExists }}
{% endblock %}
{% block content %}
-<div class="row">
- <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
- <div class="box box-primary">
- <div class="box-header with-border">
- <h3 class="box-title">{{ 'user_administration'|_ }}</h3>
- </div>
- <div class="box-body">
- <ul>
- <li><a href="{{ route('admin.users') }}">{{ 'list_all_users'|_ }}</a></li>
- <li><a href="{{ route('admin.users.domains') }}">{{ 'blocked_domains'|_ }}</a></li>
- <!-- <li><a href="#">{{ 'user_related_settings'|_ }}</a></li> -->
- </ul>
+ <div class="row">
+ <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
+ <div class="box box-primary">
+ <div class="box-header with-border">
+ <h3 class="box-title">{{ 'user_administration'|_ }}</h3>
+ </div>
+ <div class="box-body">
+ <ul>
+ <li><a href="{{ route('admin.users') }}">{{ 'list_all_users'|_ }}</a></li>
+ <li><a href="{{ route('admin.users.domains') }}">{{ 'blocked_domains'|_ }}</a></li>
+ <!-- <li><a href="#">{{ 'user_related_settings'|_ }}</a></li> -->
+ </ul>
+ </div>
</div>
</div>
</div>
-</div>
{% endblock %}
diff --git a/resources/views/budgets/show.twig b/resources/views/budgets/show.twig
index 3d16e40562..f88ab7ba9b 100644
--- a/resources/views/budgets/show.twig
+++ b/resources/views/budgets/show.twig
@@ -48,7 +48,8 @@
{% for limit in limits %}
<div class="box">
<div class="box-header with-border">
- <h3 class="box-title"><a href="{{ route('budgets.showWithRepetition',[budget.id,limit.id]) }}">{{ limit.startdate.formatLocalized(monthFormat) }}</a>
+ <h3 class="box-title"><a
+ href="{{ route('budgets.showWithRepetition',[budget.id,limit.id]) }}">{{ limit.startdate.formatLocalized(monthFormat) }}</a>
</h3>
</div>
<div class="box-body">
diff --git a/resources/views/currency/index.twig b/resources/views/currency/index.twig
index f8fd9dbb50..4effcba0a5 100644
--- a/resources/views/currency/index.twig
+++ b/resources/views/currency/index.twig
@@ -37,7 +37,8 @@
{% if currency.id == defaultCurrency.id %}
<span class="label label-success">{{ 'default_currency'|_ }}</span>
{% else %}
- <a class="btn btn-info btn-xs" href="{{ route('currency.default',currency.id) }}">{{ 'make_default_currency'|_ }}</a>
+ <a class="btn btn-info btn-xs"
+ href="{{ route('currency.default',currency.id) }}">{{ 'make_default_currency'|_ }}</a>
{% endif %}
</td>
</tr>
diff --git a/resources/views/emails/blocked-login-html.twig b/resources/views/emails/blocked-login-html.twig
index 9754109df0..8c23391b25 100644
--- a/resources/views/emails/blocked-login-html.twig
+++ b/resources/views/emails/blocked-login-html.twig
@@ -10,14 +10,14 @@
Hey there,
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
- Firefly III has just blocked a login from user #{{ user_id }} ({{ user_address }}).
+ Firefly III has just blocked a login from user #{{ user_id }} ({{ user_address }}).
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
- The blocked code was "{{ code }}".
+ The blocked code was "{{ code }}".
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:11px;color:#aaa;">
- The login attempt came from IP {{ ip }}.
+ The login attempt came from IP {{ ip }}.
</p>
</body>
diff --git a/resources/views/emails/blocked-registration-html.twig b/resources/views/emails/blocked-registration-html.twig
index 9687af9cf3..ac78890963 100644
--- a/resources/views/emails/blocked-registration-html.twig
+++ b/resources/views/emails/blocked-registration-html.twig
@@ -10,14 +10,14 @@
Hey there,
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
- Firefly III has just blocked a registration for an email addres at domain {{ blocked_domain }}.
+ Firefly III has just blocked a registration for an email addres at domain {{ blocked_domain }}.
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
- The blocked email address was "{{ email_address }}".
+ The blocked email address was "{{ email_address }}".
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:11px;color:#aaa;">
- The login attempt came from IP {{ ip }}.
+ The login attempt came from IP {{ ip }}.
</p>
</body>
diff --git a/resources/views/emails/confirm-account-html.twig b/resources/views/emails/confirm-account-html.twig
index eed51defac..147f6d455e 100644
--- a/resources/views/emails/confirm-account-html.twig
+++ b/resources/views/emails/confirm-account-html.twig
@@ -11,7 +11,8 @@
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
- To start using your brand new Firefly III account, you need to activate it. Activating your account allows the website to verify that this email address is valid. Unfortunately, not even the most complex routines can work this out, without actually sending an email message. And here it is!
+ To start using your brand new Firefly III account, you need to activate it. Activating your account allows the website to verify that this email address is
+ valid. Unfortunately, not even the most complex routines can work this out, without actually sending an email message. And here it is!
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
diff --git a/resources/views/emails/error-html.blade.php b/resources/views/emails/error-html.blade.php
index 778f5eac56..b8f186249f 100644
--- a/resources/views/emails/error-html.blade.php
+++ b/resources/views/emails/error-html.blade.php
@@ -10,11 +10,11 @@
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
-The error was of type "{{ class }}".
+ The error was of type "{{ class }}".
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
-The error occured on/at: {{ time }}.
+ The error occured on/at: {{ time }}.
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
@@ -23,14 +23,14 @@ The error occured on/at: {{ time }}.
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
{% if loggedIn %}
- The error was encountered by user #{{ user.id }}, <a href="mailto:{{ user.email }}">{{ user.email }}</a>.
+ The error was encountered by user #{{ user.id }}, <a href="mailto:{{ user.email }}">{{ user.email }}</a>.
{% else %}
- There was no user logged in for this error or no user was detected.
+ There was no user logged in for this error or no user was detected.
{% endif %}
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
- The IP address related to this error is: {{ ip }}
+ The IP address related to this error is: {{ ip }}
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
diff --git a/resources/views/emails/error-html.twig b/resources/views/emails/error-html.twig
index 778f5eac56..d486c0a1d5 100644
--- a/resources/views/emails/error-html.twig
+++ b/resources/views/emails/error-html.twig
@@ -10,11 +10,11 @@
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
-The error was of type "{{ class }}".
+ The error was of type "{{ class }}".
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
-The error occured on/at: {{ time }}.
+ The error occured on/at: {{ time }}.
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
@@ -30,7 +30,7 @@ The error occured on/at: {{ time }}.
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
- The IP address related to this error is: {{ ip }}
+ The IP address related to this error is: {{ ip }}
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
diff --git a/resources/views/emails/error.twig b/resources/views/emails/error.twig
index 369894a1c2..b772919798 100644
--- a/resources/views/emails/error.twig
+++ b/resources/views/emails/error.twig
@@ -7,9 +7,9 @@ The error occured on/at: {{ time }}.
This error occured in file "{{ file }}" on line {{ line }} with code {{ code }}.
{% if loggedIn %}
-The error was encountered by user #{{ user.id }}, {{ user.email }}.
-{% else %}
-There was no user logged in for this error or no user was detected.
+ The error was encountered by user #{{ user.id }}, {{ user.email }}.
+{% else %}
+ There was no user logged in for this error or no user was detected.
{% endif %}
The IP address related to this error is: {{ ip }}
diff --git a/resources/views/errors/503.twig b/resources/views/errors/503.twig
index 71f7588ddd..cf418601da 100644
--- a/resources/views/errors/503.twig
+++ b/resources/views/errors/503.twig
@@ -12,9 +12,10 @@
display: table;
font-family: 'Roboto', sans-serif;
}
+
p {
- color:#575e62;
- font-size:1.5em;
+ color: #575e62;
+ font-size: 1.5em;
}
.container {
diff --git a/resources/views/export/index.twig b/resources/views/export/index.twig
index 492b05f418..c4c4d64077 100644
--- a/resources/views/export/index.twig
+++ b/resources/views/export/index.twig
@@ -33,7 +33,8 @@
</div>
<div id="export-download" style="display:none;">
<p class="text-center text-info" id="download-holder">
- <a id="download-link" class="btn btn-lg btn-success" href="{{ route('export.download', job.key) }}"><i class="fa fa-fw fa-download"></i> Download</a>
+ <a id="download-link" class="btn btn-lg btn-success" href="{{ route('export.download', job.key) }}"><i
+ class="fa fa-fw fa-download"></i> Download</a>
</p>
</div>
<div id="export-error" style="display:none;">
diff --git a/resources/views/form/multiCheckbox.twig b/resources/views/form/multiCheckbox.twig
index b743a4a7d9..5687551004 100644
--- a/resources/views/form/multiCheckbox.twig
+++ b/resources/views/form/multiCheckbox.twig
@@ -4,7 +4,7 @@
<div class="col-sm-8">
{% for value,description in list %}
{% set options = options|merge({'id': 'ffInput_'~name~'_'~value}) %}
- <div class="checkbox">
+ <div class="checkbox">
<label>
{% if value in selected %}
{{ Form.checkbox(name~'[]', value, true, options) }}
diff --git a/resources/views/form/options.twig b/resources/views/form/options.twig
index 83212c903b..01ff8b9813 100644
--- a/resources/views/form/options.twig
+++ b/resources/views/form/options.twig
@@ -32,17 +32,17 @@
</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="form-group">
+ <label for="{{ name }}_split" class="col-sm-4 control-label">
+ {{ trans('form.split_journal') }}
+ </label>
- <div class="col-sm-8">
- <div class="radio"><label>
- {{ Form.checkbox('split_journal', '1', Input.old('split_journal') == '1', {'id': name ~ 'split'}) }}
- {{ trans('form.split_journal_explanation') }}
- </label>
+ <div class="col-sm-8">
+ <div class="radio"><label>
+ {{ Form.checkbox('split_journal', '1', Input.old('split_journal') == '1', {'id': name ~ 'split'}) }}
+ {{ trans('form.split_journal_explanation') }}
+ </label>
+ </div>
</div>
</div>
-</div>
{% endif %}
diff --git a/resources/views/import/complete.twig b/resources/views/import/complete.twig
index f0127faf8e..9d4df06c5d 100644
--- a/resources/views/import/complete.twig
+++ b/resources/views/import/complete.twig
@@ -19,10 +19,12 @@
</p>
<div class="row">
<div class="col-lg-4">
- <a href="{{ route('import.download', [job.key]) }}" class="btn btn-default"><i class="fa fa-fw fa-download"></i> {{ 'import_download_config'|_ }}</a>
+ <a href="{{ route('import.download', [job.key]) }}" class="btn btn-default"><i
+ class="fa fa-fw fa-download"></i> {{ 'import_download_config'|_ }}</a>
</div>
<div class="col-lg-4">
- <a href="{{ route('import.status', [job.key]) }}" class="btn btn-success"><i class="fa fa-fw fa-gears"></i> {{ 'import_start_import'|_ }}</a>
+ <a href="{{ route('import.status', [job.key]) }}" class="btn btn-success"><i
+ class="fa fa-fw fa-gears"></i> {{ 'import_start_import'|_ }}</a>
</div>
</div>
</div>
diff --git a/resources/views/import/csv/roles.twig b/resources/views/import/csv/roles.twig
index 2886c62f25..c18b7e8c03 100644
--- a/resources/views/import/csv/roles.twig
+++ b/resources/views/import/csv/roles.twig
@@ -49,14 +49,14 @@
<em>{{ trans('csv.no_example_data') }}</em>
{% else %}
{% for example in data.columns[i] %}
- <code>{{ example }}</code><br />
+ <code>{{ example }}</code><br/>
{% endfor %}
{% endif %}
<td>
{{ Form.select(('role['~loop.index0~']'),
data.available_roles,
- job.configuration['column-roles'][loop.index0],
+ job.configuration['column-roles'][loop.index0],
{class: 'form-control'}) }}
</td>
<td>
diff --git a/resources/views/import/status.twig b/resources/views/import/status.twig
index d4cd28745c..1c3d44c8a5 100644
--- a/resources/views/import/status.twig
+++ b/resources/views/import/status.twig
@@ -11,13 +11,13 @@
<h3 class="box-title">{{ 'import_status_header'|_ }}</h3>
</div>
<div class="box-body">
- <div class="progress" id="import-status-holder">
- <div id="import-status-bar" class="progress-bar progress-bar-info active progress-bar-striped" role="progressbar"
- aria-valuenow="100" aria-valuemin="0"
- aria-valuemax="100" style="width: 100%">
- </div>
- </div>
- <p id="import-status-txt">{{ 'import_status_settings_complete'|_ }}</p>
+ <div class="progress" id="import-status-holder">
+ <div id="import-status-bar" class="progress-bar progress-bar-info active progress-bar-striped" role="progressbar"
+ aria-valuenow="100" aria-valuemin="0"
+ aria-valuemax="100" style="width: 100%">
+ </div>
+ </div>
+ <p id="import-status-txt">{{ 'import_status_settings_complete'|_ }}</p>
</div>
</div>
</div>
diff --git a/resources/views/layout/default.twig b/resources/views/layout/default.twig
index b6e07e01a6..0334ea8afb 100644
--- a/resources/views/layout/default.twig
+++ b/resources/views/layout/default.twig
@@ -31,7 +31,7 @@
<!-- favicons -->
{% include('partials/favicons.twig') %}
-
+
</head>
<body class="skin-blue-light sidebar-mini">
<div class="wrapper">
@@ -92,7 +92,7 @@
<form action="{{ route('search') }}" method="get" class="sidebar-form">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search..." value="{{ query }}"/>
- <span class="input-group-btn">
+ <span class="input-group-btn">
<button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
</span>
</div>
diff --git a/resources/views/list/journals-tiny.twig b/resources/views/list/journals-tiny.twig
index b788fac644..d748294eb5 100644
--- a/resources/views/list/journals-tiny.twig
+++ b/resources/views/list/journals-tiny.twig
@@ -7,9 +7,9 @@
href="{{ route('transactions.show',journal.id) }}"
{% endif %}
>
- {{ journal|typeIcon }}
- {{ journal.description }}
- <span class="pull-right small">
+ {{ journal|typeIcon }}
+ {{ journal.description }}
+ <span class="pull-right small">
{{ journal|formatJournal }}
</span>
</a>
diff --git a/resources/views/partials/menu-sidebar.twig b/resources/views/partials/menu-sidebar.twig
index 4920233f04..983d7e1b3e 100644
--- a/resources/views/partials/menu-sidebar.twig
+++ b/resources/views/partials/menu-sidebar.twig
@@ -130,7 +130,7 @@
</li>
<!-- options and preferences -->
- <li id="option-menu" class="{{ activeRoutePartial('profile') }} {{ activeRoutePartial('preferences') }} {{ activeRoutePartial('currency') }} treeview">
+ <li id="option-menu" class="{{ activeRoutePartial('admin') }} {{ activeRoutePartial('profile') }} {{ activeRoutePartial('preferences') }} {{ activeRoutePartial('currency') }} treeview">
<a href="#">
<i class="fa fa-gears fa-fw"></i>
<span>{{ 'options'|_ }}</span>
@@ -147,6 +147,12 @@
<li class="{{ activeRoutePartial('currency') }}">
<a class="{{ activeRoutePartial('currency') }}" href="{{ route('currency.index') }}"><i class="fa fa-usd fa-fw"></i> {{ 'currencies'|_ }}</a>
</li>
+ <!-- admin (if user admin) -->
+ {% if Auth.user.hasRole('owner') %}
+ <li class="{{ activeRoutePartial('admin') }}">
+ <a class="{{ activeRoutePartial('admin') }}" href="{{ route('admin.index') }}"><i class="fa fa-hand-spock-o fa-fw"></i> {{ 'administration'|_ }}</a>
+ </li>
+ {% endif %}
</ul>
diff --git a/resources/views/popup/report/budget-spent-amount.twig b/resources/views/popup/report/budget-spent-amount.twig
index c319834045..a0672bdab9 100644
--- a/resources/views/popup/report/budget-spent-amount.twig
+++ b/resources/views/popup/report/budget-spent-amount.twig
@@ -4,7 +4,7 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="{{ 'close'|_ }}"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="budgetSpentAmountLabel">
- {{ trans('firefly.budget_spent_amount', {start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat), budget: budget.name})}}
+ {{ trans('firefly.budget_spent_amount', {start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat), budget: budget.name}) }}
</h4>
</div>
<div class="modal-body">
diff --git a/resources/views/popup/report/category-entry.twig b/resources/views/popup/report/category-entry.twig
index b60c3f57c7..1507983e19 100644
--- a/resources/views/popup/report/category-entry.twig
+++ b/resources/views/popup/report/category-entry.twig
@@ -3,7 +3,8 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="{{ 'close'|_ }}"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title" id="expenseEntryTitle">{{ trans('firefly.category_entry', {name: category.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat)}) }}</h4>
+ <h4 class="modal-title"
+ id="expenseEntryTitle">{{ trans('firefly.category_entry', {name: category.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat)}) }}</h4>
</div>
<div class="modal-body">
{% set hideCategory = true %}
diff --git a/resources/views/popup/report/expense-entry.twig b/resources/views/popup/report/expense-entry.twig
index a1a3ea2f40..bcc814827b 100644
--- a/resources/views/popup/report/expense-entry.twig
+++ b/resources/views/popup/report/expense-entry.twig
@@ -3,7 +3,8 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="{{ 'close'|_ }}"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title" id="expenseEntryTitle">{{ trans('firefly.expense_entry', {name: account.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat)}) }}</h4>
+ <h4 class="modal-title"
+ id="expenseEntryTitle">{{ trans('firefly.expense_entry', {name: account.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat)}) }}</h4>
</div>
<div class="modal-body">
{% set hideDestination = true %}
diff --git a/resources/views/popup/report/income-entry.twig b/resources/views/popup/report/income-entry.twig
index 71ffb20f65..6002a66c4f 100644
--- a/resources/views/popup/report/income-entry.twig
+++ b/resources/views/popup/report/income-entry.twig
@@ -3,7 +3,8 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="{{ 'close'|_ }}"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title" id="incomeEntryTitle">{{ trans('firefly.income_entry', {name: account.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat)}) }}</h4>
+ <h4 class="modal-title"
+ id="incomeEntryTitle">{{ trans('firefly.income_entry', {name: account.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat)}) }}</h4>
</div>
<div class="modal-body">
{% set hideBudget = true %}
diff --git a/resources/views/preferences/code.twig b/resources/views/preferences/code.twig
index 82fa73680f..0e76b35d8c 100644
--- a/resources/views/preferences/code.twig
+++ b/resources/views/preferences/code.twig
@@ -7,7 +7,7 @@
{% block content %}
{{ Form.open({'class' : 'form-horizontal','id' : 'preferences.code'}) }}
<div class="row">
- <div class="col-lg-6 col-md-6 col-sm-6">
+ <div class="col-lg-6 col-md-6 col-sm-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'pref_two_factor_auth_code'|_ }}</h3>
@@ -18,15 +18,15 @@
</p>
<div class="form group">
<div class="col-sm-8 col-md-offset-4">
- <img src="{{ image }}" alt="" title="" />
- <br /><br />
+ <img src="{{ image }}" alt="" title=""/>
+ <br/><br/>
</div>
-
+
</div>
{{ ExpandedForm.text('code', code) }}
</div>
- </div>
+ </div>
</div>
</div>
diff --git a/resources/views/preferences/index.twig b/resources/views/preferences/index.twig
index 4802746cbb..b2b3ef6d82 100644
--- a/resources/views/preferences/index.twig
+++ b/resources/views/preferences/index.twig
@@ -160,38 +160,38 @@
</div>
- <div class="col-lg-6 col-md-6 col-sm-6">
+ <div class="col-lg-6 col-md-6 col-sm-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'pref_two_factor_auth'|_ }}</h3>
</div>
<div class="box-body">
- <p class="text-info">{{ 'pref_two_factor_auth_help'|_ }}</p>
+ <p class="text-info">{{ 'pref_two_factor_auth_help'|_ }}</p>
<div class="form-group">
<div class="col-sm-10">
<div class="checkbox">
<label>
<input type="checkbox" name="twoFactorAuthEnabled" value="1"
- {% if is2faEnabled == '1' %} checked {% endif %}> {{ 'pref_enable_two_factor_auth'|_ }}
+ {% if is2faEnabled == '1' %} checked {% endif %}> {{ 'pref_enable_two_factor_auth'|_ }}
</label>
</div>
</div>
{% if is2faEnabled == 1 and has2faSecret == true %}
- <div class="col-sm-10">
- <div class="checkbox">
- <label>
- <a href="{{ route('preferences.code') }}">{{ 'pref_two_factor_auth_reset_code'|_ }}</a>
- </label>
- </div>
- <div class="checkbox">
- <label>
- <a href="{{ route('preferences.delete-code') }}">{{ 'pref_two_factor_auth_remove_code'|_ }}</a>
- {{ 'pref_two_factor_auth_remove_will_disable'|_ }}
- </label>
+ <div class="col-sm-10">
+ <div class="checkbox">
+ <label>
+ <a href="{{ route('preferences.code') }}">{{ 'pref_two_factor_auth_reset_code'|_ }}</a>
+ </label>
+ </div>
+ <div class="checkbox">
+ <label>
+ <a href="{{ route('preferences.delete-code') }}">{{ 'pref_two_factor_auth_remove_code'|_ }}</a>
+ {{ 'pref_two_factor_auth_remove_will_disable'|_ }}
+ </label>
+ </div>
</div>
- </div>
{% endif %}
</div>
@@ -199,7 +199,6 @@
</div>
</div>
-
</div>
<div class="row">
diff --git a/resources/views/reports/audit/report.twig b/resources/views/reports/audit/report.twig
index 4c8f5b5cc8..bd6c12bb75 100644
--- a/resources/views/reports/audit/report.twig
+++ b/resources/views/reports/audit/report.twig
@@ -18,7 +18,8 @@
{% for hide in hideable %}
<li><input
{% if hide in defaultShow %}checked{% endif %}
- type="checkbox" class="audit-option-checkbox" name="option[]" value="{{ hide }}" id="option_{{ hide }}" /> <label for="option_{{ hide }}" style="font-weight:normal;">{{ trans('list.'~hide) }}</label></li>
+ type="checkbox" class="audit-option-checkbox" name="option[]" value="{{ hide }}" id="option_{{ hide }}"/> <label
+ for="option_{{ hide }}" style="font-weight:normal;">{{ trans('list.'~hide) }}</label></li>
{% endfor %}
</ul>
@@ -41,13 +42,12 @@
<em>
{{ trans('firefly.no_audit_activity',
- {
- account_name: account.name,
- url: url,
- start: start.formatLocalized(monthAndDayFormat),
- end: end.formatLocalized(monthAndDayFormat),
- })|raw
- }}
+ {
+ account_name: account.name,
+ url: url,
+ start: start.formatLocalized(monthAndDayFormat),
+ end: end.formatLocalized(monthAndDayFormat),
+ })|raw }}
</em>
</div>
{% else %}
@@ -60,8 +60,7 @@
url: url,
end: auditData[account.id].end,
balance: auditData[account.id].endBalance|formatAmount
- })|raw
- }}
+ })|raw }}
</p>
{% include 'reports/partials/journals-audit.twig' with {'journals': auditData[account.id].journals,'account':account} %}
<p style="padding:10px;">
@@ -71,8 +70,7 @@
url: url,
end: auditData[account.id].dayBefore,
balance: auditData[account.id].dayBeforeBalance|formatAmount
- })|raw
- }}
+ })|raw }}
</p>
</div>
{% endif %}
diff --git a/resources/views/reports/default/multi-year.twig b/resources/views/reports/default/multi-year.twig
index c1fdfc3389..40170b188f 100644
--- a/resources/views/reports/default/multi-year.twig
+++ b/resources/views/reports/default/multi-year.twig
@@ -62,7 +62,8 @@
<h3 class="box-title">{{ 'Asset account'|_ }}: {{ account.name }}</h3>
</div>
<div class="box-body">
- <canvas id="account-chart-{{ account.id }}" class="account-chart" data-id="{{ account.id }}" style="width:100%;height:400px;" height="400"></canvas>
+ <canvas id="account-chart-{{ account.id }}" class="account-chart" data-id="{{ account.id }}" style="width:100%;height:400px;"
+ height="400"></canvas>
</div>
</div>
</div>
diff --git a/resources/views/reports/default/year.twig b/resources/views/reports/default/year.twig
index 9f605f9f42..caf274a9ff 100644
--- a/resources/views/reports/default/year.twig
+++ b/resources/views/reports/default/year.twig
@@ -70,25 +70,25 @@
<div class="box-body">
<table class="table table-condensed table-hover">
<thead>
- <tr>
- <th>&nbsp;</th>
- {% for date, header in budgets.get('headers') %}
- <th>{{ header }}</th>
- {% endfor %}
- </tr>
+ <tr>
+ <th>&nbsp;</th>
+ {% for date, header in budgets.get('headers') %}
+ <th>{{ header }}</th>
+ {% endfor %}
+ </tr>
</thead>
<tbody>
{% set spentData = budgets.get('spent') %}
{% for budgetId, budgetName in budgets.get('budgets') %}
- <tr>
- <th>
- <a title="{{ budgetName }}" href="#" data-budget="{{ budgetId }}" class="budget-chart-activate">{{ budgetName }}</a>
- </th>
- {% for date, header in budgets.get('headers') %}
- <td>{{ spentData[budgetId][date]|formatAmount }}</td>
- {% endfor %}
+ <tr>
+ <th>
+ <a title="{{ budgetName }}" href="#" data-budget="{{ budgetId }}" class="budget-chart-activate">{{ budgetName }}</a>
+ </th>
+ {% for date, header in budgets.get('headers') %}
+ <td>{{ spentData[budgetId][date]|formatAmount }}</td>
+ {% endfor %}
- </tr>
+ </tr>
{% endfor %}
</tbody>
diff --git a/resources/views/reports/partials/balance.twig b/resources/views/reports/partials/balance.twig
index 3a2bcf1f2e..2ccf769746 100644
--- a/resources/views/reports/partials/balance.twig
+++ b/resources/views/reports/partials/balance.twig
@@ -26,10 +26,10 @@
<td>
<a href="{{ route('budgets.show',balanceLine.getBudget.id) }}">{{ balanceLine.getTitle }}</a>
{% if balanceLine.getStartdate and balanceLine.getEnddate %}
- <span class="small"><br>
- {{ balanceLine.getStartdate.formatLocalized(monthAndDayFormat) }}
- &mdash;
- {{ balanceLine.getEnddate.formatLocalized(monthAndDayFormat) }}
+ <span class="small"><br>
+ {{ balanceLine.getStartdate.formatLocalized(monthAndDayFormat) }}
+ &mdash;
+ {{ balanceLine.getEnddate.formatLocalized(monthAndDayFormat) }}
</span>
{% endif %}
</td>
diff --git a/resources/views/reports/partials/expenses.twig b/resources/views/reports/partials/expenses.twig
index 83cb655eba..69a3881f9a 100644
--- a/resources/views/reports/partials/expenses.twig
+++ b/resources/views/reports/partials/expenses.twig
@@ -17,7 +17,8 @@
<br/>
<small>
{{ expense.count }} {{ 'transactions'|_|lower }}
- <i class="fa fa-fw text-muted fa-info-circle firefly-info-button" data-location="expense-entry" data-account-id="{{ expense.id }}"></i>
+ <i class="fa fa-fw text-muted fa-info-circle firefly-info-button" data-location="expense-entry"
+ data-account-id="{{ expense.id }}"></i>
</small>
{% endif %}
</td>
diff --git a/resources/views/reports/partials/income.twig b/resources/views/reports/partials/income.twig
index fd00162377..8674c74258 100644
--- a/resources/views/reports/partials/income.twig
+++ b/resources/views/reports/partials/income.twig
@@ -17,7 +17,8 @@
<br/>
<small>
{{ income.count }} {{ 'transactions'|_|lower }}
- <i class="fa fa-fw text-muted fa-info-circle firefly-info-button" data-location="income-entry" data-account-id="{{ income.id }}"></i>
+ <i class="fa fa-fw text-muted fa-info-circle firefly-info-button" data-location="income-entry"
+ data-account-id="{{ income.id }}"></i>
</small>
{% endif %}
diff --git a/resources/views/reports/partials/journals-audit.twig b/resources/views/reports/partials/journals-audit.twig
index e476a7c182..b5af50a880 100644
--- a/resources/views/reports/partials/journals-audit.twig
+++ b/resources/views/reports/partials/journals-audit.twig
@@ -33,11 +33,13 @@
<tr data-date="{{ journal.date.format('Y-m-d') }}" data-id="{{ journal.id }}">
<td class="hide-buttons">
<div class="btn-group btn-group-xs">
- <a href="{{ route('transactions.edit',journal.id) }}" class="btn btn-xs btn-default"><i class="fa fa-fw fa-pencil"></i></a>
- <a href="{{ route('transactions.delete',journal.id) }}" class="btn btn-xs btn-danger"><i class="fa fa-fw fa-trash-o"></i></a></div></td>
+ <a href="{{ route('transactions.edit',journal.id) }}" class="btn btn-xs btn-default"><i class="fa fa-fw fa-pencil"></i></a>
+ <a href="{{ route('transactions.delete',journal.id) }}" class="btn btn-xs btn-danger"><i class="fa fa-fw fa-trash-o"></i></a></div>
+ </td>
<td class="hide-icon">{{ journal|typeIcon }}</td>
- <td class="hide-description"><a href="{{ route('transactions.show',journal.id) }}" title="{{ journal.description }}">{{ journal.description }}</a></td>
+ <td class="hide-description"><a href="{{ route('transactions.show',journal.id) }}" title="{{ journal.description }}">{{ journal.description }}</a>
+ </td>
<td class="hide-balance_before">{{ journal.before|formatAmount }}</td>
<td class="hide-amount">{{ journal|formatJournal }}</td>
<td class="hide-balance_after">{{ journal.after|formatAmount }}</td>
diff --git a/resources/views/rules/index.twig b/resources/views/rules/index.twig
index d7ef10e4e7..bc4eceaa0f 100644
--- a/resources/views/rules/index.twig
+++ b/resources/views/rules/index.twig
@@ -44,15 +44,15 @@
class="fa fa-fw fa-trash"></i> {{ 'delete'|_ }}</a></li>
<li><a href="{{ route('rules.rule-group.select_transactions',ruleGroup.id) }}"><i
class="fa fa-fw fa-anchor"></i> {{ 'execute_on_existing_transactions_short'|_ }}</a></li>
- {% if ruleGroup.order > 1 %}
- <li><a href="{{ route('rules.rule-group.up',ruleGroup.id) }}"><i
- class="fa fa-fw fa-arrow-up"></i> {{ 'move_rule_group_up'|_ }}</a></li>
- {% endif %}
- {% if ruleGroup.order < ruleGroups|length %}
- <li><a href="{{ route('rules.rule-group.down',ruleGroup.id) }}"><i
- class="fa fa-fw fa-arrow-down"></i> {{ 'move_rule_group_down'|_ }}
- </a></li>
- {% endif %}
+ {% if ruleGroup.order > 1 %}
+ <li><a href="{{ route('rules.rule-group.up',ruleGroup.id) }}"><i
+ class="fa fa-fw fa-arrow-up"></i> {{ 'move_rule_group_up'|_ }}</a></li>
+ {% endif %}
+ {% if ruleGroup.order < ruleGroups|length %}
+ <li><a href="{{ route('rules.rule-group.down',ruleGroup.id) }}"><i
+ class="fa fa-fw fa-arrow-down"></i> {{ 'move_rule_group_down'|_ }}
+ </a></li>
+ {% endif %}
</ul>
</div>
</div>
diff --git a/resources/views/rules/partials/test-trigger-modal.twig b/resources/views/rules/partials/test-trigger-modal.twig
index ff39116dc2..fc6bcd7f7a 100644
--- a/resources/views/rules/partials/test-trigger-modal.twig
+++ b/resources/views/rules/partials/test-trigger-modal.twig
@@ -1,22 +1,22 @@
- <!-- Modal dialog to show transactions matching these triggers -->
- <div class="modal fade" id="testTriggerModal" tabindex="-1" role="dialog" aria-labelledby="testTriggerLabel">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title" id="testTriggerLabel">{{ 'test_rule_triggers'|_ }}</h4>
- </div>
- <div class="modal-body">
- <div class="transaction-warning alert alert-warning">
- <h4><i class="icon fa fa-warning"></i> {{ 'flash_warning'|_ }}</h4>
- <span class="warning-contents"></span>
- </div>
- <div class="transactions-list">
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{{ 'close'|_ }}</button>
- </div>
- </div>
- </div>
- </div>
+<!-- Modal dialog to show transactions matching these triggers -->
+<div class="modal fade" id="testTriggerModal" tabindex="-1" role="dialog" aria-labelledby="testTriggerLabel">
+ <div class="modal-dialog" role="document">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+ <h4 class="modal-title" id="testTriggerLabel">{{ 'test_rule_triggers'|_ }}</h4>
+ </div>
+ <div class="modal-body">
+ <div class="transaction-warning alert alert-warning">
+ <h4><i class="icon fa fa-warning"></i> {{ 'flash_warning'|_ }}</h4>
+ <span class="warning-contents"></span>
+ </div>
+ <div class="transactions-list">
+ </div>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">{{ 'close'|_ }}</button>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/resources/views/rules/rule/create.twig b/resources/views/rules/rule/create.twig
index 6b4b5ca25c..f28807c503 100644
--- a/resources/views/rules/rule/create.twig
+++ b/resources/views/rules/rule/create.twig
@@ -67,8 +67,8 @@
</div>
</div>
</div>
-
- {% include '/rules/partials/test-trigger-modal.twig' %}
+
+ {% include '/rules/partials/test-trigger-modal.twig' %}
<!-- RULE ACTIONS -->
<div class="row">
diff --git a/resources/views/rules/rule/edit.twig b/resources/views/rules/rule/edit.twig
index c530927a10..69559d895d 100644
--- a/resources/views/rules/rule/edit.twig
+++ b/resources/views/rules/rule/edit.twig
@@ -68,8 +68,8 @@
</div>
</div>
</div>
-
- {% include '/rules/partials/test-trigger-modal.twig' %}
+
+ {% include '/rules/partials/test-trigger-modal.twig' %}
<!-- RULE ACTIONS -->
<div class="row">
diff --git a/resources/views/split/journals/create.twig b/resources/views/split/journals/create.twig
index 076d790df1..a88138a859 100644
--- a/resources/views/split/journals/create.twig
+++ b/resources/views/split/journals/create.twig
@@ -143,7 +143,8 @@
<!-- deposit has several source names -->
{% if preFilled.what == 'deposit' %}
<td>
- <input type="text" name="source_account_name[]" value="{{ preFilled.source_account_name[index] }}" class="form-control"/>
+ <input type="text" name="source_account_name[]" value="{{ preFilled.source_account_name[index] }}"
+ class="form-control"/>
</td>
{% endif %}
diff --git a/resources/views/split/journals/edit.twig b/resources/views/split/journals/edit.twig
index 2ec26d99ea..108fab1b33 100644
--- a/resources/views/split/journals/edit.twig
+++ b/resources/views/split/journals/edit.twig
@@ -7,196 +7,197 @@
<form method="POST" action="{{ route('split.journal.update',journal.id) }}" accept-charset="UTF-8" class="form-horizontal" id="update"
enctype="multipart/form-data">
- <input name="_token" type="hidden" value="{{ csrf_token() }}">
- <input type="hidden" name="id" value="{{ journal.id }}"/>
- <input type="hidden" name="what" value="{{ preFilled.what }}"/>
-
- {% if errors.all()|length > 0 %}
+ <input name="_token" type="hidden" value="{{ csrf_token() }}">
+ <input type="hidden" name="id" value="{{ journal.id }}"/>
+ <input type="hidden" name="what" value="{{ preFilled.what }}"/>
+
+ {% if errors.all()|length > 0 %}
+ <div class="row">
+ <div class="col-lg-12 col-md-12 col-sm-12">
+ <div class="box box-danger">
+ <div class="box-header with-border">
+ <h3 class="box-title">{{ 'errors'|_ }}</h3>
+ </div>
+ <div class="box-body">
+ <ul>
+ {% for key, err in errors.all() %}
+ <li class="text-danger">{{ err }}</li>
+ {% endfor %}
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+ {% endif %}
<div class="row">
- <div class="col-lg-12 col-md-12 col-sm-12">
- <div class="box box-danger">
+ <div class="col-lg-6 col-md-6 col-sm-6">
+ <div class="box">
<div class="box-header with-border">
- <h3 class="box-title">{{ 'errors'|_ }}</h3>
+ <h3 class="box-title">{{ 'transaction_meta_data'|_ }}</h3>
</div>
<div class="box-body">
- <ul>
- {% for key, err in errors.all() %}
- <li class="text-danger">{{ err }}</li>
- {% endfor %}
- </ul>
+ {{ ExpandedForm.text('journal_description', journal.description) }}
+ {{ ExpandedForm.select('journal_currency_id', currencies, preFilled.transaction_currency_id) }}
+ {{ ExpandedForm.staticText('journal_amount', preFilled.journal_amount|formatAmount ) }}
+ <input type="hidden" name="journal_amount" value="{{ preFilled.journal_amount }}"/>
+
+ <!-- show source if withdrawal or transfer -->
+ {% if preFilled.what == 'withdrawal' or preFilled.what == 'transfer' %}
+ {{ ExpandedForm.select('journal_source_account_id', assetAccounts, preFilled.journal_source_account_id) }}
+ {% endif %}
+
+ <!-- show destination account id, if deposit (is asset): -->
+ {% if preFilled.what == 'deposit' %}
+ {{ ExpandedForm.select('journal_destination_account_id', assetAccounts, preFilled.journal_destination_account_id) }}
+ {% endif %}
+
+ <!-- show static destination if transfer -->
+ {% if preFilled.what == 'transfer' %}
+ {{ ExpandedForm.select('journal_destination_account_id', assetAccounts, preFilled.journal_destination_account_id) }}
+ {% endif %}
</div>
</div>
</div>
- </div>
- {% endif %}
- <div class="row">
- <div class="col-lg-6 col-md-6 col-sm-6">
- <div class="box">
- <div class="box-header with-border">
- <h3 class="box-title">{{ 'transaction_meta_data'|_ }}</h3>
- </div>
- <div class="box-body">
- {{ ExpandedForm.text('journal_description', journal.description) }}
- {{ ExpandedForm.select('journal_currency_id', currencies, preFilled.transaction_currency_id) }}
- {{ ExpandedForm.staticText('journal_amount', preFilled.journal_amount|formatAmount ) }}
- <input type="hidden" name="journal_amount" value="{{ preFilled.journal_amount }}"/>
-
- <!-- show source if withdrawal or transfer -->
- {% if preFilled.what == 'withdrawal' or preFilled.what == 'transfer' %}
- {{ ExpandedForm.select('journal_source_account_id', assetAccounts, preFilled.journal_source_account_id) }}
- {% endif %}
-
- <!-- show destination account id, if deposit (is asset): -->
- {% if preFilled.what == 'deposit' %}
- {{ ExpandedForm.select('journal_destination_account_id', assetAccounts, preFilled.journal_destination_account_id) }}
- {% endif %}
-
- <!-- show static destination if transfer -->
- {% if preFilled.what == 'transfer' %}
- {{ ExpandedForm.select('journal_destination_account_id', assetAccounts, preFilled.journal_destination_account_id) }}
- {% endif %}
- </div>
- </div>
- </div>
- <div class="col-lg-6 col-md-6 col-sm-6">
- <div class="box">
- <div class="box-header with-border">
- <h3 class="box-title">{{ 'transaction_dates'|_ }}</h3>
- </div>
- <div class="box-body">
- {{ ExpandedForm.date('date', journal.date) }}
+ <div class="col-lg-6 col-md-6 col-sm-6">
+ <div class="box">
+ <div class="box-header with-border">
+ <h3 class="box-title">{{ 'transaction_dates'|_ }}</h3>
+ </div>
+ <div class="box-body">
+ {{ ExpandedForm.date('date', journal.date) }}
- {{ ExpandedForm.date('interest_date', journal.interest_date) }}
+ {{ ExpandedForm.date('interest_date', journal.interest_date) }}
- {{ ExpandedForm.date('book_date', journal.book_date) }}
+ {{ ExpandedForm.date('book_date', journal.book_date) }}
- {{ ExpandedForm.date('process_date', journal.process_date) }}
+ {{ ExpandedForm.date('process_date', journal.process_date) }}
+ </div>
</div>
- </div>
+ </div>
</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12 col-sm-12">
- <div class="box">
- <div class="box-header with-border">
- <h3 class="box-title">{{ 'splits'|_ }}</h3>
- </div>
- <div class="box-body">
- <table class="table table-bordered table-condensed table-striped split-table">
- <thead>
- <tr>
- <th>{{ trans('list.split_number') }}</th>
- <th>{{ trans('list.description') }}</th>
-
- <!-- withdrawal and deposit have a destination. -->
- {% if preFilled.what == 'withdrawal' %}
- <th>{{ trans('list.destination') }}</th>
- {% endif %}
-
- {% if preFilled.what == 'deposit' %}
- <th>{{ trans('list.source') }}</th>
- {% endif %}
-
- <th>{{ trans('list.amount') }}</th>
-
- <!-- only withdrawal has budget -->
- {% if preFilled.what == 'withdrawal' %}
- <th>{{ trans('list.budget') }}</th>
- {% endif %}
- <th>{{ trans('list.category') }}</th>
- </tr>
- </thead>
- <tbody>
- {% for index, descr in preFilled.description %}
- <tr class="{% if loop.index == 1 %}initial-row{% else %}not-initial-row{% endif %}">
- <td class="count">#{{ loop.index }}</td>
- <td>
- <input type="text" name="description[]" value="{{ descr }}" class="form-control"/>
- </td>
-
- <!-- withdrawal has several destination names. -->
+ <div class="row">
+ <div class="col-lg-12 col-md-12 col-sm-12">
+ <div class="box">
+ <div class="box-header with-border">
+ <h3 class="box-title">{{ 'splits'|_ }}</h3>
+ </div>
+ <div class="box-body">
+ <table class="table table-bordered table-condensed table-striped split-table">
+ <thead>
+ <tr>
+ <th>{{ trans('list.split_number') }}</th>
+ <th>{{ trans('list.description') }}</th>
+
+ <!-- withdrawal and deposit have a destination. -->
{% if preFilled.what == 'withdrawal' %}
- <td>
- <input type="text" name="destination_account_name[]" value="{{ preFilled.destination_account_name[index] }}"
- class="form-control"/>
- </td>
+ <th>{{ trans('list.destination') }}</th>
{% endif %}
- <!-- deposit has several source names -->
{% if preFilled.what == 'deposit' %}
- <td>
- <input type="text" name="source_account_name[]" value="{{ preFilled.source_account_name[index] }}" class="form-control"/>
- </td>
+ <th>{{ trans('list.source') }}</th>
{% endif %}
+ <th>{{ trans('list.amount') }}</th>
- <td style="width:10%;">
- <input type="number" name="amount[]" value="{{ preFilled.amount[index] }}"
- class="form-control" autocomplete="off" step="any" min="0.01">
- </td>
+ <!-- only withdrawal has budget -->
{% if preFilled.what == 'withdrawal' %}
- <td>
- <select class="form-control" name="budget_id[]">
- {% for key, budget in budgets %}
- <option label="{{ budget }}" value="{{ key }}"
- {% if preFilled.budget_id[index] == key %}
- selected="selected"
- {% endif %}
- >{{ budget }}</option>
- {% endfor %}
- </select>
- </td>
+ <th>{{ trans('list.budget') }}</th>
{% endif %}
- <td>
- <input type="text" name="category[]" value="{{ preFilled.category[index] }}" class="form-control"/>
- </td>
+ <th>{{ trans('list.category') }}</th>
</tr>
- {% endfor %}
- </tbody>
- </table>
- <p>
- <br/>
- <a href="#" class="btn btn-default btn-do-split"><i class="fa fa-plus-circle"></i> {{ 'add_another_split'|_ }}</a>
- </p>
- <!--<p class="pull-right">
+ </thead>
+ <tbody>
+ {% for index, descr in preFilled.description %}
+ <tr class="{% if loop.index == 1 %}initial-row{% else %}not-initial-row{% endif %}">
+ <td class="count">#{{ loop.index }}</td>
+ <td>
+ <input type="text" name="description[]" value="{{ descr }}" class="form-control"/>
+ </td>
+
+ <!-- withdrawal has several destination names. -->
+ {% if preFilled.what == 'withdrawal' %}
+ <td>
+ <input type="text" name="destination_account_name[]" value="{{ preFilled.destination_account_name[index] }}"
+ class="form-control"/>
+ </td>
+ {% endif %}
+
+ <!-- deposit has several source names -->
+ {% if preFilled.what == 'deposit' %}
+ <td>
+ <input type="text" name="source_account_name[]" value="{{ preFilled.source_account_name[index] }}"
+ class="form-control"/>
+ </td>
+ {% endif %}
+
+
+ <td style="width:10%;">
+ <input type="number" name="amount[]" value="{{ preFilled.amount[index] }}"
+ class="form-control" autocomplete="off" step="any" min="0.01">
+ </td>
+ {% if preFilled.what == 'withdrawal' %}
+ <td>
+ <select class="form-control" name="budget_id[]">
+ {% for key, budget in budgets %}
+ <option label="{{ budget }}" value="{{ key }}"
+ {% if preFilled.budget_id[index] == key %}
+ selected="selected"
+ {% endif %}
+ >{{ budget }}</option>
+ {% endfor %}
+ </select>
+ </td>
+ {% endif %}
+ <td>
+ <input type="text" name="category[]" value="{{ preFilled.category[index] }}" class="form-control"/>
+ </td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ <p>
+ <br/>
+ <a href="#" class="btn btn-default btn-do-split"><i class="fa fa-plus-circle"></i> {{ 'add_another_split'|_ }}</a>
+ </p>
+ <!--<p class="pull-right">
<button type="submit" id="transaction-btn" class="btn btn-success pull-right">
{{ ('update_splitted_'~preFilled.what)|_ }}
</button>
</p>
-->
+ </div>
</div>
</div>
</div>
- </div>
- <div class="row">
- <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
+ <div class="row">
+ <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
- <div class="box">
- <div class="box-header with-border">
- <h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
- </div>
- <div class="box-body">
- <!-- ATTACHMENTS -->
- {{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
+ <div class="box">
+ <div class="box-header with-border">
+ <h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
+ </div>
+ <div class="box-body">
+ <!-- ATTACHMENTS -->
+ {{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
+ </div>
</div>
</div>
- </div>
- <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
- <!-- panel for options -->
- <div class="box">
- <div class="box-header with-border">
- <h3 class="box-title">{{ 'options'|_ }}</h3>
- </div>
- <div class="box-body">
- {{ ExpandedForm.optionsList('update','split-transaction') }}
- </div>
- <div class="box-footer">
- <button type="submit" class="pull-right btn btn-success">{{ ('update_' ~ preFilled.what)|_ }}</button>
+ <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
+ <!-- panel for options -->
+ <div class="box">
+ <div class="box-header with-border">
+ <h3 class="box-title">{{ 'options'|_ }}</h3>
+ </div>
+ <div class="box-body">
+ {{ ExpandedForm.optionsList('update','split-transaction') }}
+ </div>
+ <div class="box-footer">
+ <button type="submit" class="pull-right btn btn-success">{{ ('update_' ~ preFilled.what)|_ }}</button>
+ </div>
</div>
</div>
</div>
- </div>
</form>
{% endblock %}
diff --git a/resources/views/tags/show.twig b/resources/views/tags/show.twig
index 07053aebd4..47c7f5c54b 100644
--- a/resources/views/tags/show.twig
+++ b/resources/views/tags/show.twig
@@ -39,7 +39,7 @@
{% endif %}
<p>
- {{ 'sum'|_ }}: {{ sum|formatAmount }}<br />
+ {{ 'sum'|_ }}: {{ sum|formatAmount }}<br/>
</p>
</div>
diff --git a/resources/views/transactions/create.twig b/resources/views/transactions/create.twig
index e7ae167f65..e4f200d49b 100644
--- a/resources/views/transactions/create.twig
+++ b/resources/views/transactions/create.twig
@@ -67,7 +67,6 @@
{% endif %}
-
<!-- CATEGORY ALWAYS -->
{{ ExpandedForm.text('category') }}
diff --git a/resources/views/transactions/edit.twig b/resources/views/transactions/edit.twig
index 30aae1821c..b9f0e19341 100644
--- a/resources/views/transactions/edit.twig
+++ b/resources/views/transactions/edit.twig
@@ -13,16 +13,16 @@
<input type="hidden" name="what" value="{{ what }}"/>
{% if errors.all|length > 0 %}
- <div class="row">
- <div class="col-lg-12">
- <h3 class="text-danger">{{ 'errors'|_ }}</h3>
- <ul>
- {% for err in errors.all %}
- <li class="text-danger">{{ err }}</li>
- {% endfor %}
- </ul>
+ <div class="row">
+ <div class="col-lg-12">
+ <h3 class="text-danger">{{ 'errors'|_ }}</h3>
+ <ul>
+ {% for err in errors.all %}
+ <li class="text-danger">{{ err }}</li>
+ {% endfor %}
+ </ul>
+ </div>
</div>
- </div>
{% endif %}
@@ -88,7 +88,6 @@
{{ ExpandedForm.date('process_date',data['process_date']) }}
-
<!-- TAGS -->
{{ ExpandedForm.text('tags') }}
diff --git a/resources/views/transactions/mass-delete.twig b/resources/views/transactions/mass-delete.twig
index 8b9d26ee8b..c8ebe76b87 100644
--- a/resources/views/transactions/mass-delete.twig
+++ b/resources/views/transactions/mass-delete.twig
@@ -36,7 +36,7 @@
{% for journal in journals %}
<tr>
<td>
- <input type="checkbox" name="confirm_mass_delete[]" value="{{ journal.id }}" checked />
+ <input type="checkbox" name="confirm_mass_delete[]" value="{{ journal.id }}" checked/>
</td>
<td>
<a href="{{ route('transactions.show',journal.id) }}" title="{{ journal.description }}">{{ journal.description }}</a>
diff --git a/resources/views/transactions/show.twig b/resources/views/transactions/show.twig
index ffedce51dd..4aa107f307 100644
--- a/resources/views/transactions/show.twig
+++ b/resources/views/transactions/show.twig
@@ -158,46 +158,46 @@
{% endif %}
</div>
<div class="col-lg-6 col-md-6 col-sm-12">
- {% for t in transactions %}
- <div class="box">
- <div class="box-header with-border">
- <h3 class="box-title">{{ t.account.name }}</h3>
- </div>
- <table class="table table-bordered table-striped">
+ {% for t in transactions %}
+ <div class="box">
+ <div class="box-header with-border">
+ <h3 class="box-title">{{ t.account.name }}</h3>
+ </div>
+ <table class="table table-bordered table-striped">
+ <tr>
+ <td style="width:30%;">{{ 'account'|_ }}</td>
+ <td><a href="{{ route('accounts.show',t.account.id) }}">{{ t.account.name }}</a></td>
+ </tr>
+ <tr>
+ <td>{{ 'account_type'|_ }}</td>
+ <td>{{ t.account.accounttype.type|_ }}</td>
+ </tr>
+ <tr>
+ <td>{{ 'balance'|_ }}</td>
+ <td>{{ t.before|formatAmount }} &rarr; {{ (t.before+t.amount)|formatAmount }}</td>
+ </tr>
+ {% if t.description %}
<tr>
- <td style="width:30%;">{{ 'account'|_ }}</td>
- <td><a href="{{ route('accounts.show',t.account.id) }}">{{ t.account.name }}</a></td>
- </tr>
- <tr>
- <td>{{ 'account_type'|_ }}</td>
- <td>{{ t.account.accounttype.type|_ }}</td>
- </tr>
- <tr>
- <td>{{ 'balance'|_ }}</td>
- <td>{{ t.before|formatAmount }} &rarr; {{ (t.before+t.amount)|formatAmount }}</td>
- </tr>
- {% if t.description %}
- <tr>
- <td>{{ trans('form.description') }}</td>
- <td>{{ t.description }}</td>
- </tr>
- {% endif %}
- <tr>
- <td>{{ 'category'|_ }}</td>
- <td>
- {{ transactionCategories(t)|raw }}
- </td>
- </tr>
- <tr>
- <td>{{ 'budget'|_ }}</td>
- <td>
- {{ transactionBudgets(t)|raw }}
- </td>
+ <td>{{ trans('form.description') }}</td>
+ <td>{{ t.description }}</td>
</tr>
- </table>
- </div>
- {% endfor %}
+ {% endif %}
+ <tr>
+ <td>{{ 'category'|_ }}</td>
+ <td>
+ {{ transactionCategories(t)|raw }}
+ </td>
+ </tr>
+ <tr>
+ <td>{{ 'budget'|_ }}</td>
+ <td>
+ {{ transactionBudgets(t)|raw }}
+ </td>
+ </tr>
+ </table>
+ </div>
+ {% endfor %}
</div>
</div>
{% endblock %}