Skip to content

Commit

Permalink
fix: modal inputs
Browse files Browse the repository at this point in the history
ah-rahimi committed Apr 11, 2023

Verified

This commit was signed with the committer’s verified signature.
andersy005 Anderson Banihirwe
1 parent 042d6a2 commit 3dcbd65
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions resources/views/button/modal.blade.php
Original file line number Diff line number Diff line change
@@ -102,16 +102,15 @@ class="modal-dialog modal-dialog-scrollable modal-{{ $modal->size }} @if ($modal
}
}
if (in_array($value, ['0', '1'])) {
$body['input']->checked = $value;
} else {
$body['input']->value = $value;
}
$boolean = in_array($value, ['0', '1', 0, 1, true, false]);
}
@endphp
<div class="mb-3">
@include("panel::form.components.{$body['input']->file}", [
'input' => $body['input'],
'input' => (object) array_merge((array) $body['input'], [
'checked' => $boolean ? $value : false,
'value' => $boolean ? null : $value,
]),
])
</div>
@break

0 comments on commit 3dcbd65

Please sign in to comment.