mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Mass edit #241
This commit is contained in:
24
resources/views/form/amount-small.twig
Normal file
24
resources/views/form/amount-small.twig
Normal file
@@ -0,0 +1,24 @@
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<button type="button"
|
||||
class="btn btn-default dropdown-toggle currency-dropdown" id="currency_dropdown_{{ name }}" data-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<span id="currency_select_symbol_{{ name }}">{{ defaultCurrency.symbol|raw }}</span> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu currency-dropdown-menu" role="menu">
|
||||
{% for currency in currencies %}
|
||||
<li>
|
||||
<a href="#"
|
||||
class="currency-option"
|
||||
data-id="{{ currency.id }}"
|
||||
data-name="{{ name }}"
|
||||
data-currency="{{ currency.code }}"
|
||||
data-symbol="{{ currency.symbol|raw }}">{{ currency.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{{ Form.input('number', name, value, options) }}
|
||||
|
||||
|
||||
</div>
|
||||
<input type="hidden" name="amount_currency_id_{{ name }}" value="{{ defaultCurrency.id }}"/>
|
@@ -1,7 +1,7 @@
|
||||
{% extends "./layout/default.twig" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, journal) }}
|
||||
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
101
resources/views/transactions/mass-edit.twig
Normal file
101
resources/views/transactions/mass-edit.twig
Normal file
@@ -0,0 +1,101 @@
|
||||
{% extends "./layout/default.twig" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('transactions.mass-update')}) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'mass_edit_journals'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p>
|
||||
{{ 'cannot_edit_other_fields'|_ }}
|
||||
</p>
|
||||
<table class="table table-striped table-condensed">
|
||||
<tr>
|
||||
<th style="width: 5%;"> </th>
|
||||
<th style="width: 20%;">{{ trans('list.description') }}</th>
|
||||
<th style="width: 15%;">{{ trans('list.amount') }}</th>
|
||||
<th style="width: 20%;">{{ trans('list.date') }}</th>
|
||||
<th style="width: 20%;">{{ trans('list.from') }}</th>
|
||||
<th style="width: 20%;">{{ trans('list.to') }}</th>
|
||||
</tr>
|
||||
{% for journal in journals %}
|
||||
<tr>
|
||||
<td>
|
||||
<!-- LINK TO EDIT FORM -->
|
||||
<a href="{{ route('transactions.edit', journal.id) }}" class="btn btn-xs btn-default">
|
||||
<i class="fa fa-fw fa-pencil"></i>
|
||||
</a>
|
||||
<input type="hidden" name="journals[]" value="{{ journal.id }}"/>
|
||||
</td>
|
||||
<td>
|
||||
<!-- DESCRIPTION -->
|
||||
<input
|
||||
class="form-control"
|
||||
id="ffInput_description_{{ journal.id }}" autocomplete="off"
|
||||
placeholder="Description" name="description[{{ journal.id }}]"
|
||||
type="text" value="{{ journal.description }}">
|
||||
</td>
|
||||
<td>
|
||||
<!-- AMOUNT -->
|
||||
{% if journal.destination_amount > 0 %}
|
||||
{% set amount = journal.destination_amount %}
|
||||
{% else %}
|
||||
{% set amount = journal.source_amount %}
|
||||
{% endif %}
|
||||
|
||||
{{ ExpandedForm.amountSmall('amount_'~journal.id, amount, {'name' : 'amount['~journal.id~']', 'currency' : journal.transactionCurrency}) }}
|
||||
</td>
|
||||
<td>
|
||||
<!-- DATE -->
|
||||
<input
|
||||
class="form-control" id="ffInput_date_{{ journal.id }}"
|
||||
autocomplete="off" name="date[{{ journal.id }}]" type="date" value="{{ journal.date.format('Y-m-d') }}">
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<!-- SOURCE ACCOUNT FOR TRANSFER OR WITHDRAWAL -->
|
||||
{% if journal.transaction_type_type == 'Transfer' or journal.transaction_type_type == 'Withdrawal' %}
|
||||
{{ Form.select('source_account_id['~journal.id~']', accountList, journal.source_account_id, {'class': 'form-control'}) }}
|
||||
{% else %}
|
||||
<!-- if is income -->
|
||||
{{ Form.input('text', 'revenue_account['~journal.id~']', journal.source_account_name, {'class': 'form-control', 'placeholder': trans('form.revenue_account')}) }}
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
{% if journal.transaction_type_type == 'Transfer' or journal.transaction_type_type == 'Deposit' %}
|
||||
<!-- is is transfer or income -->
|
||||
{{ Form.select('destination_account_id['~journal.id~']', accountList, journal.destination_account_id, {'class': 'form-control'}) }}
|
||||
{% else %}
|
||||
<!-- if is expense -->
|
||||
{{ Form.input('text', 'expense_account['~journal.id~']', journal.destination_account_name, {'class': 'form-control', 'placeholder': trans('form.expense_account')}) }}
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<input type="submit" name="submit" value="{{ trans('form.update_all_journals') }}" class="btn btn-danger pull-right"/>
|
||||
<a href="{{ route('index') }}" class="btn-default btn">{{ trans('form.cancel') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form.close|raw }}
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript" src="js/lib/bootstrap3-typeahead.min.js"></script>
|
||||
<script type="text/javascript" src="js/ff/transactions/create-edit.js"></script>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user