Only list available ids if there are some

This commit is contained in:
Isaac Connor 2021-11-06 09:58:31 -04:00
parent 364ae03195
commit f737e3e945
1 changed files with 6 additions and 3 deletions

View File

@ -461,9 +461,12 @@ switch ( $name ) {
<tr class="Id">
<td class="text-right pr-3"><?php echo translate('Id') ?></td>
<td><input type="number" step="1" min="1" name="newMonitor[Id]" placeholder="leave blank for auto"/><br/>
10 Available Ids:
<?php echo implode(', ', array_slice($available_monitor_ids, 0, 10)); ?>
</td>
<?php
if (count($available_monitor_ids)) {
echo 'Some available ids: '.implode(', ', array_slice($available_monitor_ids, 0, 10));
}
?>
</td>
</tr>
<?php