Skip to content

Commit 28a8b17

Browse files
committed
fix: validation on updating group autogroup
When `autogroup` was false, blade doesn't render anything (empty string). By rendering it as `false` using the `Js` facade, the value of `autogroup` is set. The value is synced with the checkbox in the form. When it was blank, the checkbox value was errored. With the error fixed, the correct value is submitted and the validation passes. Fixes #4401
1 parent 206b335 commit 28a8b17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

resources/views/Staff/group/edit.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
@section('page', 'page__groups--edit')
2323

2424
@section('main')
25-
<section class="panelV2" x-data="{ autogroup: {{ $group->autogroup }} }">
25+
<section class="panelV2" x-data="{ autogroup: {{ Js::from($group->autogroup) }} }">
2626
<h2 class="panel__heading">Edit Group: {{ $group->name }}</h2>
2727
<div class="panel__body">
2828
<form

0 commit comments

Comments
 (0)