HummingBirdAnimeClient/app/views/collection/media-select-list.php
Timothy J. Warren 1b74df5269
All checks were successful
timw4mail/HummingBirdAnimeClient/pipeline/pr-master This commit looks good
More components, resolve #31
2020-08-26 17:26:42 -04:00

11 lines
410 B
PHP

<select name="media_id[]" id="media_id" multiple size="13">
<?php foreach ($media_items as $group => $items): ?>
<optgroup label='<?= $group ?>'>
<?php foreach ($items as $id => $name): ?>
<option <?= in_array($id, ($item['media_id'] ?? []), FALSE) ? 'selected="selected"' : '' ?> value="<?= $id ?>">
<?= $name ?>
</option>
<?php endforeach ?>
</optgroup>
<?php endforeach ?>
</select>