mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-03 19:41:54 +00:00
Add button to remove unused accounts.
This commit is contained in:
@@ -1344,6 +1344,9 @@ return [
|
||||
'delete_data_title' => 'Delete data from Firefly III',
|
||||
'permanent_delete_stuff' => 'You can delete stuff from Firefly III. Using the buttons below means that your items will be removed from view and hidden. There is no undo-button for this, but the items may remain in the database where you can salvage them if necessary.',
|
||||
'other_sessions_logged_out' => 'All your other sessions have been logged out.',
|
||||
'delete_unused_accounts' => 'Deleting unused accounts will clean your auto-complete lists.',
|
||||
'delete_all_unused_accounts' => 'Delete unused accounts',
|
||||
'deleted_all_unused_accounts' => 'All unused accounts are deleted',
|
||||
'delete_all_budgets' => 'Delete ALL your budgets',
|
||||
'delete_all_categories' => 'Delete ALL your categories',
|
||||
'delete_all_tags' => 'Delete ALL your tags',
|
||||
|
||||
@@ -257,6 +257,21 @@
|
||||
data-type="liabilities" class="confirm btn btn-warning btn-sm"><span
|
||||
class="fa fa-ticket"></span> {{ 'delete_all_liabilities'|_ }}</button>
|
||||
</div>
|
||||
<h4>{{ 'accounts'|_ }}</h4>
|
||||
<p>
|
||||
<em class="text-info">
|
||||
{{ 'delete_unused_accounts'|_ }}
|
||||
</em>
|
||||
</p>
|
||||
<div class="btn-group">
|
||||
<button type="button"
|
||||
data-success="{{ trans('firefly.deleted_all_unused_accounts')|escape('html') }}"
|
||||
data-type="unused_accounts" class="confirm btn btn-warning btn-sm"><span
|
||||
class="fa fa-credit-card"></span> {{ 'delete_all_unused_accounts'|_ }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<h4>{{ 'transactions'|_ }}</h4>
|
||||
<div class="btn-group">
|
||||
<button type="button"
|
||||
@@ -301,9 +316,12 @@
|
||||
var classes = link.find('i').attr('class');
|
||||
var url = deleteAPIRoute + '?objects=' + link.data('type');
|
||||
// different URL for purge route:
|
||||
if(link.data('type') === 'purge') {
|
||||
if (link.data('type') === 'purge') {
|
||||
url = '{{ route('api.v1.data.purge') }}';
|
||||
}
|
||||
if (link.data('type') === 'unused_accounts') {
|
||||
url = deleteAPIRoute + '?objects=accounts&unused=true';
|
||||
}
|
||||
|
||||
// replace icon with loading thing
|
||||
link.prop('disabled', true);
|
||||
|
||||
Reference in New Issue
Block a user