mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-25 08:21:08 -06:00
Rename variable.
This commit is contained in:
parent
0a89af3c83
commit
1e0e5d0fe9
@ -119,10 +119,10 @@ class CreateController extends Controller
|
||||
$allowedOpposingTypes = config('firefly.allowed_opposing_types');
|
||||
$accountToTypes = config('firefly.account_to_transaction');
|
||||
$defaultCurrency = app('amount')->getDefaultCurrency();
|
||||
$previousUri = $this->rememberPreviousUri('transactions.create.uri');
|
||||
$parts = parse_url($previousUri);
|
||||
$previousUrl = $this->rememberPreviousUri('transactions.create.uri');
|
||||
$parts = parse_url($previousUrl);
|
||||
$search = sprintf('?%s', $parts['query'] ?? '');
|
||||
$previousUri = str_replace($search, '', $previousUri);
|
||||
$previousUrl = str_replace($search, '', $previousUrl);
|
||||
|
||||
session()->put('preFilled', $preFilled);
|
||||
|
||||
@ -134,7 +134,7 @@ class CreateController extends Controller
|
||||
'objectType',
|
||||
'subTitle',
|
||||
'defaultCurrency',
|
||||
'previousUri',
|
||||
'previousUrl',
|
||||
'optionalFields',
|
||||
'preFilled',
|
||||
'allowedOpposingTypes',
|
||||
|
@ -80,16 +80,16 @@ class EditController extends Controller
|
||||
|
||||
$defaultCurrency = app('amount')->getDefaultCurrency();
|
||||
$cash = $repository->getCashAccount();
|
||||
$previousUri = $this->rememberPreviousUri('transactions.edit.uri');
|
||||
$parts = parse_url($previousUri);
|
||||
$previousUrl = $this->rememberPreviousUri('transactions.edit.uri');
|
||||
$parts = parse_url($previousUrl);
|
||||
$search = sprintf('?%s', $parts['query'] ?? '');
|
||||
$previousUri = str_replace($search, '', $previousUri);
|
||||
$previousUrl = str_replace($search, '', $previousUrl);
|
||||
|
||||
return prefixView(
|
||||
'transactions.edit',
|
||||
compact(
|
||||
'cash', 'allowedSourceDests', 'expectedSourceTypes', 'transactionGroup', 'allowedOpposingTypes', 'accountToTypes', 'defaultCurrency',
|
||||
'previousUri'
|
||||
'previousUrl'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
2
public/v1/js/create_transaction.js
vendored
2
public/v1/js/create_transaction.js
vendored
File diff suppressed because one or more lines are too long
2
public/v1/js/edit_transaction.js
vendored
2
public/v1/js/edit_transaction.js
vendored
File diff suppressed because one or more lines are too long
@ -519,8 +519,8 @@ export default {
|
||||
let button = $('#submitButton');
|
||||
button.removeAttr('disabled');
|
||||
} else {
|
||||
// console.log('Will redirect to previous URL. (' + previousUri + ')');
|
||||
window.location.href = window.previousUri + '?transaction_group_id=' + groupId + '&message=created';
|
||||
//console.log('Will redirect to previous URL. (' + previousUrl + ')');
|
||||
window.location.href = window.previousUrl + '?transaction_group_id=' + groupId + '&message=created';
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -718,9 +718,9 @@ export default {
|
||||
}
|
||||
} else {
|
||||
if (this.storeAsNew) {
|
||||
window.location.href = window.previousUri + '?transaction_group_id=' + groupId + '&message=created';
|
||||
window.location.href = window.previousUrl + '?transaction_group_id=' + groupId + '&message=created';
|
||||
} else {
|
||||
window.location.href = window.previousUri + '?transaction_group_id=' + groupId + '&message=updated';
|
||||
window.location.href = window.previousUrl + '?transaction_group_id=' + groupId + '&message=updated';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -13,7 +13,7 @@
|
||||
var accountToTypes = {{ accountToTypes|json_encode|raw }};
|
||||
var defaultCurrency = {{ defaultCurrency.toArray()|json_encode|raw }};
|
||||
var cashAccountId = {{ cash.id }};
|
||||
var previousUri = '{{ previousUri }}';
|
||||
var previousUrl = '{{ previousUrl }}';
|
||||
window.sourceId = {{ sourceId }};
|
||||
window.destinationId = {{ destinationId }};
|
||||
</script>
|
||||
|
@ -17,7 +17,7 @@
|
||||
var allowedSourceDests = {{ allowedSourceDests|json_encode|raw }};
|
||||
var expectedSourceTypes = {{ expectedSourceTypes|json_encode|raw }};
|
||||
var cashAccountId = {{ cash.id }};
|
||||
var previousUri = '{{ previousUri }}';
|
||||
var previousUrl = '{{ previousUrl }}';
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user