2020-08-21 12:30:01 -04:00
|
|
|
<div class="tabs">
|
|
|
|
<?php $i = 0; foreach ($data as $tabName => $tabData): ?>
|
|
|
|
<?php if ( ! empty($tabData)): ?>
|
|
|
|
<?php $id = "{$name}-{$i}"; ?>
|
|
|
|
<input
|
|
|
|
role='tab'
|
|
|
|
aria-controls="_<?= $id ?>"
|
|
|
|
type="radio"
|
|
|
|
name="<?= $name ?>"
|
|
|
|
id="<?= $id ?>"
|
|
|
|
<?= ($i === 0) ? 'checked="checked"' : '' ?>
|
|
|
|
/>
|
|
|
|
<label for="<?= $id ?>"><?= ucfirst($tabName) ?></label>
|
2020-08-26 17:26:42 -04:00
|
|
|
|
|
|
|
<?php if ($hasSectionWrapper): ?>
|
|
|
|
<div class="content full-height">
|
|
|
|
<?php endif ?>
|
|
|
|
|
2020-08-21 12:30:01 -04:00
|
|
|
<section
|
|
|
|
id="_<?= $id ?>"
|
|
|
|
role="tabpanel"
|
|
|
|
class="<?= $className ?>"
|
|
|
|
>
|
|
|
|
<?= $callback($tabData, $tabName) ?>
|
|
|
|
</section>
|
2020-08-26 17:26:42 -04:00
|
|
|
|
|
|
|
<?php if ($hasSectionWrapper): ?>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
2020-08-21 12:30:01 -04:00
|
|
|
<?php endif ?>
|
|
|
|
<?php $i++; endforeach ?>
|
|
|
|
</div>
|