mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-17 15:18:05 +00:00
Various code to fix checkboxes.
This commit is contained in:
@@ -161,10 +161,13 @@ class BillController extends Controller
|
||||
$bill->amount_max = round($bill->amount_max, $currency->decimal_places);
|
||||
$defaultCurrency = app('amount')->getDefaultCurrency();
|
||||
|
||||
// code to handle active-checkboxes
|
||||
$hasOldInput = null !== $request->old('_token');
|
||||
|
||||
$preFilled = [
|
||||
'notes' => $this->billRepository->getNoteText($bill),
|
||||
'transaction_currency_id' => $bill->transaction_currency_id,
|
||||
'active' => $bill->active,
|
||||
'active' => $hasOldInput ? (bool)$request->old('active') : $bill->active,
|
||||
];
|
||||
|
||||
$request->session()->flash('preFilled', $preFilled);
|
||||
|
||||
Reference in New Issue
Block a user