Rule edit form: rule group would always select the top one.

This commit is contained in:
James Cole 2023-06-21 07:30:08 +02:00
parent bd269eaadf
commit 9d057b853f
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80
2 changed files with 8 additions and 8 deletions

View File

@ -43,7 +43,7 @@ class RuleForm
* *
* @return string * @return string
*/ */
public function ruleGroupList(string $name, $value = null, array $options = null): string public function ruleGroupList(string $name, mixed $value = null, array $options = null): string
{ {
/** @var RuleGroupRepositoryInterface $groupRepos */ /** @var RuleGroupRepositoryInterface $groupRepos */
$groupRepos = app(RuleGroupRepositoryInterface::class); $groupRepos = app(RuleGroupRepositoryInterface::class);

View File

@ -18,7 +18,7 @@
</div> </div>
<div class="box-body"> <div class="box-body">
{{ ExpandedForm.text('title', rule.title) }} {{ ExpandedForm.text('title', rule.title) }}
{{ RuleForm.ruleGroupList('rule_group_id', ruleGroup.id) }} {{ RuleForm.ruleGroupList('rule_group_id', rule.rule_group_id) }}
{{ ExpandedForm.select('trigger',allJournalTriggers(), primaryTrigger) }} {{ ExpandedForm.select('trigger',allJournalTriggers(), primaryTrigger) }}
{# only correct way to do active checkbox #} {# only correct way to do active checkbox #}