mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Link in clone.
This commit is contained in:
parent
b0f18a0419
commit
9ae41b1645
@ -71,8 +71,9 @@ class CreateController extends Controller
|
||||
app('preferences')->mark();
|
||||
|
||||
$title = $newGroup->title ?? $newGroup->transactionJournals->first()->description;
|
||||
|
||||
$link = route('transactions.show', [$newGroup->id]);
|
||||
session()->flash('success', trans('firefly.stored_journal', ['description' => $title]));
|
||||
session()->flash('success_uri', $link);
|
||||
|
||||
return redirect(route('transactions.show', [$newGroup->id]));
|
||||
}
|
||||
|
6
public/v1/js/ff/transactions/show.js
vendored
6
public/v1/js/ff/transactions/show.js
vendored
@ -27,14 +27,8 @@ $(function () {
|
||||
makeAutoComplete();
|
||||
})
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
|
||||
$('#clone_button').click(cloneNewFunction);
|
||||
});
|
||||
|
||||
function cloneNewFunction() {
|
||||
return confirm(newCloneInstructions);
|
||||
}
|
||||
|
||||
function getLinkModal(e) {
|
||||
var button = $(e.currentTarget);
|
||||
var journalId = parseInt(button.data('journal'));
|
||||
|
@ -59,7 +59,6 @@ return [
|
||||
'no_rules_for_bill' => 'This bill has no rules associated to it.',
|
||||
'go_to_asset_accounts' => 'View your asset accounts',
|
||||
'go_to_budgets' => 'Go to your budgets',
|
||||
'new_clone_instructions' => 'This button will automatically clone the transaction and set the date to today. Are you sure?',
|
||||
'clones_journal_x' => 'This transaction is a clone of ":description" (#:id)',
|
||||
'go_to_categories' => 'Go to your categories',
|
||||
'go_to_bills' => 'Go to your bills',
|
||||
|
@ -37,7 +37,7 @@
|
||||
{% if groupArray.transactions[0].type != 'opening balance' and groupArray.transactions[0].type != 'reconciliation' %}
|
||||
<!-- since 5.1.0 -->
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="{{ route('transactions.clone', [transactionGroup.id]) }}" id="clone_button"><i class="fa fa-copy"></i> {{ 'clone'|_ }}</a></li>
|
||||
<li><a href="{{ route('transactions.clone', [transactionGroup.id]) }}"><i class="fa fa-copy"></i> {{ 'clone'|_ }}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
@ -209,7 +209,7 @@
|
||||
{% if groupArray.transactions[0].type != 'opening balance' and groupArray.transactions[0].type != 'reconciliation' %}
|
||||
<!-- since 5.1.0 -->
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="{{ route('transactions.clone', [transactionGroup.id]) }}" id="clone_button"><i class="fa fa-copy"></i> {{ 'clone'|_ }}</a></li>
|
||||
<li><a href="{{ route('transactions.clone', [transactionGroup.id]) }}"><i class="fa fa-copy"></i> {{ 'clone'|_ }}</a></li>
|
||||
{% endif %}
|
||||
|
||||
<li><a href="#" class="link-modal" data-journal="{{ journal.transaction_journal_id }}"><i class="fa fa-fw fa-link"></i>{{ 'link_transaction'|_ }}</a></li>
|
||||
@ -425,7 +425,6 @@
|
||||
var modalDialogURI = '{{ route('transactions.link.modal', ['%JOURNAL%']) }}';
|
||||
var acURI = '{{ route('api.v1.autocomplete.transactions-with-id') }}';
|
||||
var groupURI = '{{ route('transactions.show',['%GROUP%']) }}';
|
||||
var newCloneInstructions = '{{ 'new_clone_instructions'|_|escape('js') }}';
|
||||
</script>
|
||||
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
|
||||
<script type="text/javascript" src="v1/js/ff/transactions/show.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user