HummingBirdAnimeClient/app/views/collection/_media-list.php
Timothy J Warren 52b562f455
All checks were successful
timw4mail/HummingBirdAnimeClient/pipeline/head This commit looks good
Improve anime collection with multiple media selections
2020-04-23 18:57:22 -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>