First steps for #2920

This commit is contained in:
James Cole
2020-01-04 07:24:43 +01:00
parent 40c6ca9d35
commit 041357c2ff
20 changed files with 577 additions and 539 deletions

View File

@@ -50,67 +50,3 @@ import Budget from "./components/transactions/Budget";
*/
require('./bootstrap');
Vue.use(VueI18n);
window.Vue = Vue;
Vue.use(uiv);
// components for create and edit transactions.
Vue.component('budget', Budget);
Vue.component('custom-date', CustomDate);
Vue.component('custom-string', CustomString);
Vue.component('custom-attachments', CustomAttachments);
Vue.component('custom-textarea', CustomTextarea);
Vue.component('standard-date', StandardDate);
Vue.component('group-description', GroupDescription);
Vue.component('transaction-description', TransactionDescription);
Vue.component('custom-transaction-fields', CustomTransactionFields);
Vue.component('piggy-bank', PiggyBank);
Vue.component('tags', Tags);
Vue.component('category', Category);
Vue.component('amount', Amount);
Vue.component('foreign-amount', ForeignAmountSelect);
Vue.component('transaction-type', TransactionType);
Vue.component('account-select', AccountSelect);
/**
* Components for OAuth2 tokens.
*/
Vue.component('passport-clients', Clients);
Vue.component('passport-authorized-clients',AuthorizedClients);
Vue.component('passport-personal-access-tokens', PersonalAccessTokens);
Vue.component('create-transaction', CreateTransaction);
Vue.component('edit-transaction', EditTransaction);
// Create VueI18n instance with options
const i18n = new VueI18n({
locale: document.documentElement.lang, // set locale
fallbackLocale: 'en',
messages: {
'cs': require('./locales/cs.json'),
'de': require('./locales/de.json'),
'en': require('./locales/en.json'),
'es': require('./locales/es.json'),
'fr': require('./locales/fr.json'),
'hu': require('./locales/hu.json'),
'id': require('./locales/id.json'),
'it': require('./locales/it.json'),
'nl': require('./locales/nl.json'),
'no': require('./locales/no.json'),
'pl': require('./locales/pl.json'),
'pt-br': require('./locales/pt-br.json'),
'ro': require('./locales/ro.json'),
'ru': require('./locales/ru.json'),
'zh': require('./locales/zh.json'),
'zh-tw': require('./locales/zh-tw.json'),
'zh-cn': require('./locales/zh-cn.json'),
'sv': require('./locales/sv.json'),
}
});
new Vue({i18n}).$mount('#app');

View File

@@ -0,0 +1,49 @@
<!--
- ProfileOptions.vue
- Copyright (c) 2020 thegrumpydictator@gmail.com
-
- This file is part of Firefly III (https://github.com/firefly-iii).
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<template>
<div>
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
<passport-clients></passport-clients>
</div>
</div>
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
<passport-authorized-clients></passport-authorized-clients>
</div>
</div>
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
<passport-personal-access-tokens></passport-personal-access-tokens>
</div>
</div>
</div>
</template>
<script>
export default {
name: "ProfileOptions"
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,115 @@
/*
* app.js
* Copyright (c) 2019 thegrumpydictator@gmail.com
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import * as uiv from 'uiv';
import CustomAttachments from "./components/transactions/CustomAttachments";
import CreateTransaction from './components/transactions/CreateTransaction';
import EditTransaction from './components/transactions/EditTransaction';
import Clients from './components/passport/Clients';
import AuthorizedClients from "./components/passport/AuthorizedClients";
import PersonalAccessTokens from "./components/passport/PersonalAccessTokens";
import CustomDate from "./components/transactions/CustomDate";
import CustomString from "./components/transactions/CustomString";
import CustomTextarea from "./components/transactions/CustomTextarea";
import StandardDate from "./components/transactions/StandardDate";
import GroupDescription from "./components/transactions/GroupDescription";
import TransactionDescription from "./components/transactions/TransactionDescription";
import CustomTransactionFields from "./components/transactions/CustomTransactionFields";
import PiggyBank from "./components/transactions/PiggyBank";
import Tags from "./components/transactions/Tags";
import Category from "./components/transactions/Category";
import Amount from "./components/transactions/Amount";
import ForeignAmountSelect from "./components/transactions/ForeignAmountSelect";
import TransactionType from "./components/transactions/TransactionType";
import AccountSelect from "./components/transactions/AccountSelect";
import Budget from "./components/transactions/Budget";
/**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
Vue.use(VueI18n);
window.Vue = Vue;
Vue.use(uiv);
// components for create and edit transactions.
Vue.component('budget', Budget);
Vue.component('custom-date', CustomDate);
Vue.component('custom-string', CustomString);
Vue.component('custom-attachments', CustomAttachments);
Vue.component('custom-textarea', CustomTextarea);
Vue.component('standard-date', StandardDate);
Vue.component('group-description', GroupDescription);
Vue.component('transaction-description', TransactionDescription);
Vue.component('custom-transaction-fields', CustomTransactionFields);
Vue.component('piggy-bank', PiggyBank);
Vue.component('tags', Tags);
Vue.component('category', Category);
Vue.component('amount', Amount);
Vue.component('foreign-amount', ForeignAmountSelect);
Vue.component('transaction-type', TransactionType);
Vue.component('account-select', AccountSelect);
Vue.component('create-transaction', CreateTransaction);
// Create VueI18n instance with options
const i18n = new VueI18n({
locale: document.documentElement.lang, // set locale
fallbackLocale: 'en',
messages: {
'cs': require('./locales/cs.json'),
'de': require('./locales/de.json'),
'en': require('./locales/en.json'),
'es': require('./locales/es.json'),
'fr': require('./locales/fr.json'),
'hu': require('./locales/hu.json'),
'id': require('./locales/id.json'),
'it': require('./locales/it.json'),
'nl': require('./locales/nl.json'),
'no': require('./locales/no.json'),
'pl': require('./locales/pl.json'),
'pt-br': require('./locales/pt-br.json'),
'ro': require('./locales/ro.json'),
'ru': require('./locales/ru.json'),
'zh': require('./locales/zh.json'),
'zh-tw': require('./locales/zh-tw.json'),
'zh-cn': require('./locales/zh-cn.json'),
'sv': require('./locales/sv.json'),
}
});
let props = {};
new Vue({
i18n,
el: "#create_transaction",
render: (createElement) => {
return createElement(CreateTransaction, { props: props })
},
});

113
resources/assets/js/edit_transaction.js vendored Normal file
View File

@@ -0,0 +1,113 @@
/*
* app.js
* Copyright (c) 2019 thegrumpydictator@gmail.com
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import * as uiv from 'uiv';
import CustomAttachments from "./components/transactions/CustomAttachments";
import CreateTransaction from './components/transactions/CreateTransaction';
import EditTransaction from './components/transactions/EditTransaction';
import Clients from './components/passport/Clients';
import AuthorizedClients from "./components/passport/AuthorizedClients";
import PersonalAccessTokens from "./components/passport/PersonalAccessTokens";
import CustomDate from "./components/transactions/CustomDate";
import CustomString from "./components/transactions/CustomString";
import CustomTextarea from "./components/transactions/CustomTextarea";
import StandardDate from "./components/transactions/StandardDate";
import GroupDescription from "./components/transactions/GroupDescription";
import TransactionDescription from "./components/transactions/TransactionDescription";
import CustomTransactionFields from "./components/transactions/CustomTransactionFields";
import PiggyBank from "./components/transactions/PiggyBank";
import Tags from "./components/transactions/Tags";
import Category from "./components/transactions/Category";
import Amount from "./components/transactions/Amount";
import ForeignAmountSelect from "./components/transactions/ForeignAmountSelect";
import TransactionType from "./components/transactions/TransactionType";
import AccountSelect from "./components/transactions/AccountSelect";
import Budget from "./components/transactions/Budget";
/**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
Vue.use(VueI18n);
window.Vue = Vue;
Vue.use(uiv);
// components for create and edit transactions.
Vue.component('budget', Budget);
Vue.component('custom-date', CustomDate);
Vue.component('custom-string', CustomString);
Vue.component('custom-attachments', CustomAttachments);
Vue.component('custom-textarea', CustomTextarea);
Vue.component('standard-date', StandardDate);
Vue.component('group-description', GroupDescription);
Vue.component('transaction-description', TransactionDescription);
Vue.component('custom-transaction-fields', CustomTransactionFields);
Vue.component('piggy-bank', PiggyBank);
Vue.component('tags', Tags);
Vue.component('category', Category);
Vue.component('amount', Amount);
Vue.component('foreign-amount', ForeignAmountSelect);
Vue.component('transaction-type', TransactionType);
Vue.component('account-select', AccountSelect);
Vue.component('edit-transaction', EditTransaction);
// Create VueI18n instance with options
const i18n = new VueI18n({
locale: document.documentElement.lang, // set locale
fallbackLocale: 'en',
messages: {
'cs': require('./locales/cs.json'),
'de': require('./locales/de.json'),
'en': require('./locales/en.json'),
'es': require('./locales/es.json'),
'fr': require('./locales/fr.json'),
'hu': require('./locales/hu.json'),
'id': require('./locales/id.json'),
'it': require('./locales/it.json'),
'nl': require('./locales/nl.json'),
'no': require('./locales/no.json'),
'pl': require('./locales/pl.json'),
'pt-br': require('./locales/pt-br.json'),
'ro': require('./locales/ro.json'),
'ru': require('./locales/ru.json'),
'zh': require('./locales/zh.json'),
'zh-tw': require('./locales/zh-tw.json'),
'zh-cn': require('./locales/zh-cn.json'),
'sv': require('./locales/sv.json'),
}
});
let props = {};
new Vue({
i18n,
el: "#edit_transaction",
render: (createElement) => {
return createElement(EditTransaction, { props: props })
},
});

68
resources/assets/js/profile.js vendored Normal file
View File

@@ -0,0 +1,68 @@
/*
* app.js
* Copyright (c) 2019 thegrumpydictator@gmail.com
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import * as uiv from 'uiv';
import CustomAttachments from "./components/transactions/CustomAttachments";
import CreateTransaction from './components/transactions/CreateTransaction';
import EditTransaction from './components/transactions/EditTransaction';
import Clients from './components/passport/Clients';
import AuthorizedClients from "./components/passport/AuthorizedClients";
import PersonalAccessTokens from "./components/passport/PersonalAccessTokens";
import CustomDate from "./components/transactions/CustomDate";
import CustomString from "./components/transactions/CustomString";
import CustomTextarea from "./components/transactions/CustomTextarea";
import StandardDate from "./components/transactions/StandardDate";
import GroupDescription from "./components/transactions/GroupDescription";
import TransactionDescription from "./components/transactions/TransactionDescription";
import CustomTransactionFields from "./components/transactions/CustomTransactionFields";
import PiggyBank from "./components/transactions/PiggyBank";
import Tags from "./components/transactions/Tags";
import Category from "./components/transactions/Category";
import Amount from "./components/transactions/Amount";
import ForeignAmountSelect from "./components/transactions/ForeignAmountSelect";
import TransactionType from "./components/transactions/TransactionType";
import AccountSelect from "./components/transactions/AccountSelect";
import Budget from "./components/transactions/Budget";
import ProfileOptions from "./components/profile/ProfileOptions";
/**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
window.Vue = Vue;
Vue.component('passport-clients', Clients);
Vue.component('passport-authorized-clients',AuthorizedClients);
Vue.component('passport-personal-access-tokens', PersonalAccessTokens);
Vue.component('profile-options', ProfileOptions);
let props = {};
new Vue({
el: "#passport_clients",
render: (createElement) => {
return createElement(ProfileOptions, { props: props })
},
});

View File

@@ -183,7 +183,7 @@
<script src="{{ route('javascript.variables') }}?ext=.js&amp;v={{ FF_VERSION }}{% if account %}&amp;account={{ account.id }}{% endif %}" type="text/javascript"></script>
{# big fat JS thing courtesy of Vue#}
<script src="v1/js/app.js?v={{ FF_VERSION }}" type="text/javascript"></script>
<script src="v1/js/{{ VUE_SCRIPT_NAME|default('app') }}.js?v={{ FF_VERSION }}" type="text/javascript"></script>
{# date range picker, current template, etc.#}
<script src="v1/js/lib/daterangepicker.js?v={{ FF_VERSION }}" type="text/javascript"></script>

View File

@@ -1,3 +1,4 @@
{% set VUE_SCRIPT_NAME = 'profile' %}
{% extends "./layout/default" %}
{% block breadcrumbs %}
@@ -128,22 +129,7 @@
</div>
</div>
{% endif %}
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
<passport-clients></passport-clients>
</div>
</div>
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
<passport-authorized-clients></passport-authorized-clients>
</div>
</div>
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
<passport-personal-access-tokens></passport-personal-access-tokens>
</div>
</div>
<div id="passport_clients"></div>
{% endblock %}
{% block scripts %}
{% if SANDSTORM %}

View File

@@ -1,11 +1,11 @@
{% set VUE_SCRIPT_NAME = 'create_transaction' %}
{% extends "./layout/default" %}
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, objectType) }}
{% endblock %}
{% block content %}
<create-transaction></create-transaction>
<div id="create_transaction"></div>
{% endblock %}
{% block scripts %}
<script type="text/javascript">

View File

@@ -1,11 +1,11 @@
{% set VUE_SCRIPT_NAME = 'edit_transaction' %}
{% extends "./layout/default" %}
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, transactionGroup) }}
<edit-transaction></edit-transaction>
{% endblock %}
{% block content %}
<div id="edit_transaction"></div>
{% endblock %}
{% block scripts %}
<script type="text/javascript">

View File

@@ -1 +0,0 @@
<!-- DO NOT USE ME -->

View File

@@ -1,277 +1 @@
{% extends "./layout/default" %}
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, journal) }}
{% endblock %}
{% block content %}
<form method="POST" action="{{ route('transactions.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="{{ 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>
</div>
{% endif %}
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{# ALWAYS AVAILABLE #}
{{ ExpandedForm.text('description',journal.description) }}
{# SELECTABLE SOURCE ACCOUNT ONLY FOR WITHDRAWALS AND TRANSFERS #}
{% if what == 'transfer' or what == 'withdrawal' %}
{{ ExpandedForm.longAccountList('source_id', data.source_id, {label: trans('form.asset_source_account')}) }}
{% endif %}
{# FREE FORMAT SOURCE ACCOUNT ONLY FOR DEPOSITS #}
{% if what == 'deposit' %}
{{ ExpandedForm.text('source_name',data.source_name, {label: trans('form.revenue_account')}) }}
{% endif %}
{# FREE FORMAT DESTINATION ACCOUNT ONLY FOR EXPENSES #}
{% if what == 'withdrawal' %}
{{ ExpandedForm.text('destination_name',data.destination_name, {label: trans('form.expense_account')}) }}
{% endif %}
{# SELECTABLE DESTINATION ACCOUNT ONLY FOR TRANSFERS AND DEPOSITS #}
{% if what == 'transfer' or what == 'deposit' %}
{{ ExpandedForm.longAccountList('destination_id', data.destination_id, {label: trans('form.asset_destination_account')} ) }}
{% endif %}
{# ALWAYS SHOW AMOUNT #}
{{ ExpandedForm.amount('amount',data.amount, {'currency' : data.currency}) }}
{# INSTRUCTIONS FOR EXCHANGE RATES #}
{{ ExpandedForm.staticText('exchange_rate_instruction','(here be text)') }}
{{ ExpandedForm.nonSelectableAmount('native_amount', data.native_amount, {currency: data.native_currency}) }}
{{ ExpandedForm.nonSelectableAmount('source_amount', data.source_amount, {currency: data.source_currency }) }}
{{ ExpandedForm.nonSelectableAmount('destination_amount', data.destination_amount, {currency: data.destination_currency }) }}
{# ALWAYS SHOW DATE #}
{{ ExpandedForm.date('date',data['date']) }}
</div>
</div>
</div>
<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">
{% if what == 'withdrawal' %}
{% if budgetList|length > 1 %}
{{ ExpandedForm.select('budget_id', budgetList, data['budget_id']) }}
{% else %}
{{ ExpandedForm.select('budget_id', budgetList, data['budget_id'], {helpText: trans('firefly.no_budget_pointer', {link: route('budgets.index')})}) }}
{% endif %}
{% endif %}
{{ ExpandedForm.text('category',data['category']) }}
{{ ExpandedForm.text('tags') }}
{% if data.bill_id != null %}
{{ ExpandedForm.checkbox('keep_bill_id',1,true, {'helpText': trans('firefly.journal_link_bill', {name: data.bill_name,route: route('bills.show', [data.bill_id])})} ) }}
{% endif %}
{# NO PIGGY BANK #}
</div>
</div>
{% 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 %}
<p class="text-center text-success"><i class="fa fa-info-circle"></i>
<em>{{ trans('firefly.hidden_fields_preferences', {link: route('preferences.index')})|raw }}</em></p>
{% endif %}
{% if
optionalFields.interest_date or
optionalFields.book_date or
optionalFields.process_date or
optionalFields.due_date or
optionalFields.payment_date or
optionalFields.invoice_date or
data.interest_date or
data.book_date or
data.process_date or
data.due_date or
data.payment_date %}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optional_field_meta_dates'|_ }}</h3>
</div>
<div class="box-body">
{% if optionalFields.interest_date or data['interest_date'] %}
{{ ExpandedForm.date('interest_date',data['interest_date']) }}
{% endif %}
{% if optionalFields.book_date or data['book_date'] %}
{{ ExpandedForm.date('book_date',data['book_date']) }}
{% endif %}
{% if optionalFields.process_date or data['process_date'] %}
{{ ExpandedForm.date('process_date',data['process_date']) }}
{% endif %}
{% if optionalFields.due_date or data['due_date'] %}
{{ ExpandedForm.date('due_date',data['due_date']) }}
{% endif %}
{% if optionalFields.payment_date or data['payment_date'] %}
{{ ExpandedForm.date('payment_date',data['payment_date']) }}
{% endif %}
{% if optionalFields.invoice_date or data['invoice_date'] %}
{{ ExpandedForm.date('invoice_date',data['invoice_date']) }}
{% endif %}
</div>
</div>
{% endif %}
{% if
optionalFields.internal_reference or
optionalFields.notes or
data['interal_reference'] or
data['notes'] %}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optional_field_meta_business'|_ }}</h3>
</div>
<div class="box-body">
{% if optionalFields.internal_reference or data['interal_reference'] %}
{{ ExpandedForm.text('internal_reference', data['interal_reference']) }}
{% endif %}
{% if optionalFields.notes or data['notes'] %}
{{ ExpandedForm.textarea('notes', data['notes'], {helpText: trans('firefly.field_supports_markdown')}) }}
{% endif %}
</div>
</div>
{% endif %}
{% if optionalFields.attachments or journal.attachments|length > 0 %}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optional_field_attachments'|_ }}</h3>
</div>
<div class="box-body">
{% if journal.attachments|length > 0 %}
<div id="att_holder_attachments" class="form-group">
<label class="col-sm-4 control-label">
{{ trans('form.existing_attachments') }}
</label>
<div class="col-sm-8">
{% for att in journal.attachments %}
<div class="row att_row" data-id="{{ att.id }}">
<div class="col-lg-1"><a href="{{ route('attachments.delete', att.id) }}" data-id="{{ att.id }}" class="del_att btn btn-danger btn-xs"><i class="fa fa-trash"></i></a></div>
<div class="col-lg-11">
<a href="{{ route('attachments.view', att.id) }}" title="{{ att.filename }}">
{% if att.title %}
{{ att.title }} ({{ att.filename }})
{% else %}
{{ att.filename }}
{% endif %}
</a>
({{ att.size|filesize }})
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
</div>
</div>
{% endif %}
{# 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','transaction') }}
<div class="form-group" id="do_split_holder">
<label for="ffInput_do_split" class="col-sm-4 control-label">{{ 'do_split'|_ }}</label>
<div class="col-sm-8">
<p class="form-control-static">
<a href="{{ route('transactions.split.edit', journal.id) }}">{{ ('split_this_'~what)|_ }}</a>
</p>
</div>
</div>
</div>
<div class="box-footer">
<button type="submit" class="pull-right btn btn-success">{{ ('update_' ~ what)|_ }}</button>
</div>
</div>
</div>
</div>
<input type="hidden" name="source_account_currency" value="0"/>
<input type="hidden" name="destination_account_currency" value="0"/>
</form>
{% endblock %}
{% block scripts %}
<script type="text/javascript">
var what = "{{ what }}";
</script>
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="v1/js/ff/common/autocomplete.js?v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="v1/js/lib/bootstrap-tagsinput.min.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/lib/modernizr-custom.js?v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="v1/jscript/accounts?ext=.js&amp;v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="v1/jscript/currencies?ext=.js&amp;v={{ FF_VERSION }}"></script>
<script type="text/javascript">
var journal = {{ journal.toArray()|json_encode|raw }};
var journalData = {{ data|json_encode|raw }};
var exchangeRateInstructions = "{{ 'exchange_rate_instructions'|_|escape('js') }}";
var transferInstructions = "{{ 'transfer_exchange_rate_instructions'|_|escape('js') }}";
</script>
<script type="text/javascript" src="v1/js/ff/transactions/single/common.js?v={{ FF_VERSION }}"></script>
<script type="text/javascript" src="v1/js/ff/transactions/single/edit.js?v={{ FF_VERSION }}"></script>
{% endblock %}
{% block styles %}
<link href="v1/css/bootstrap-tagsinput.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all">
<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">
{% endblock %}
<!-- do not use -->