-
-
Notifications
You must be signed in to change notification settings - Fork 659
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added activeAccordion method to Accordion.php (#2939)
* Added activeAccordion method to Accordion.php * Change activeAccordion method to Accordion.php * Fixed method * change open() method
- Loading branch information
Showing
2 changed files
with
25 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
<div id="accordion-{{$templateSlug}}" class="accordion mb-3"> | ||
@foreach($manyForms as $name => $forms) | ||
<div class="accordion-heading @if ($loop->index) collapsed @endif" | ||
<div class="accordion-heading @if (!in_array($name, $open)) collapsed @endif" | ||
id="heading-{{\Illuminate\Support\Str::slug($name)}}" | ||
data-bs-toggle="collapse" | ||
data-bs-target="#collapse-{{\Illuminate\Support\Str::slug($name)}}" | ||
aria-expanded="true" | ||
aria-expanded="{{ in_array($name, $open) ? 'true' : 'false' }}" | ||
aria-controls="collapse-{{\Illuminate\Support\Str::slug($name)}}"> | ||
<h6 class="btn btn-link btn-group-justified pt-2 pb-2 mb-0 pe-0 ps-0 d-flex align-items-center"> | ||
<x-orchid-icon path="bs.chevron-right" class="small me-2"/> {!! $name !!} | ||
</h6> | ||
</div> | ||
|
||
<div id="collapse-{{\Illuminate\Support\Str::slug($name)}}" | ||
class="mt-2 collapse @if (!$loop->index) show @endif" | ||
class="mt-2 collapse @if (in_array($name, $open)) show @endif" | ||
aria-labelledby="heading-{{\Illuminate\Support\Str::slug($name)}}" | ||
@if (!$stayOpen) | ||
data-bs-parent="#accordion-{{$templateSlug}}" | ||
@endif | ||
@endif | ||
> | ||
@foreach($forms as $form) | ||
{!! $form !!} | ||
@endforeach | ||
@foreach($forms as $form) | ||
{!! $form !!} | ||
@endforeach | ||
</div> | ||
@endforeach | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters