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();
|
$this->createDefaultRule();
|
||||||
$bill = null;
|
$bill = null;
|
||||||
$billId = (int)$request->get('fromBill');
|
$billId = (int)$request->get('fromBill');
|
||||||
$preFilled = [];
|
$preFilled = [
|
||||||
|
'strict' => true,
|
||||||
|
];
|
||||||
$groups = ExpandedForm::makeSelectList($ruleGroupRepository->get());
|
$groups = ExpandedForm::makeSelectList($ruleGroupRepository->get());
|
||||||
$oldTriggers = [];
|
$oldTriggers = [];
|
||||||
$oldActions = [];
|
$oldActions = [];
|
||||||
|
@ -169,11 +169,17 @@ class ExpandedForm
|
|||||||
*/
|
*/
|
||||||
public function checkbox(string $name, $value = 1, $checked = null, $options = []): string
|
public function checkbox(string $name, $value = 1, $checked = null, $options = []): string
|
||||||
{
|
{
|
||||||
$options['checked'] = true === $checked ? true : null;
|
$options['checked'] = true === $checked ? true : false;
|
||||||
$label = $this->label($name, $options);
|
|
||||||
$options = $this->expandOptionArray($name, $label, $options);
|
if (Session::has('preFilled')) {
|
||||||
$classes = $this->getHolderClasses($name);
|
$preFilled = session('preFilled');
|
||||||
$value = $this->fillFieldValue($name, $value);
|
$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']);
|
unset($options['placeholder'], $options['autocomplete'], $options['class']);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user