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

@ -37,13 +37,13 @@ class RuleForm
use FormSupport; use FormSupport;
/** /**
* @param string $name * @param string $name
* @param mixed $value * @param mixed $value
* @param array|null $options * @param array|null $options
* *
* @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);
@ -60,9 +60,9 @@ class RuleForm
} }
/** /**
* @param string $name * @param string $name
* @param null $value * @param null $value
* @param array|null $options * @param array|null $options
* *
* @return HtmlString * @return HtmlString
*/ */

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 #}