mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Code for #1367
This commit is contained in:
parent
8f3e4a2dee
commit
c2e8a67330
@ -83,7 +83,9 @@ class RuleController extends Controller
|
||||
$this->createDefaultRule();
|
||||
$bill = null;
|
||||
$billId = (int)$request->get('fromBill');
|
||||
$preFilled = [];
|
||||
$preFilled = [
|
||||
'strict' => true,
|
||||
];
|
||||
$groups = ExpandedForm::makeSelectList($ruleGroupRepository->get());
|
||||
$oldTriggers = [];
|
||||
$oldActions = [];
|
||||
|
@ -169,11 +169,17 @@ class ExpandedForm
|
||||
*/
|
||||
public function checkbox(string $name, $value = 1, $checked = null, $options = []): string
|
||||
{
|
||||
$options['checked'] = true === $checked ? true : null;
|
||||
$label = $this->label($name, $options);
|
||||
$options = $this->expandOptionArray($name, $label, $options);
|
||||
$classes = $this->getHolderClasses($name);
|
||||
$value = $this->fillFieldValue($name, $value);
|
||||
$options['checked'] = true === $checked ? true : false;
|
||||
|
||||
if (Session::has('preFilled')) {
|
||||
$preFilled = session('preFilled');
|
||||
$options['checked'] = $preFilled[$name] ?? $options['checked'];
|
||||
}
|
||||
|
||||
$label = $this->label($name, $options);
|
||||
$options = $this->expandOptionArray($name, $label, $options);
|
||||
$classes = $this->getHolderClasses($name);
|
||||
$value = $this->fillFieldValue($name, $value);
|
||||
|
||||
unset($options['placeholder'], $options['autocomplete'], $options['class']);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user