Only list available ids if there are some

This commit is contained in:
Isaac Connor 2021-11-06 09:58:31 -04:00 committed by Isaac Connor
parent 8868a0fc41
commit caeaf91cad
1 changed files with 6 additions and 3 deletions

View File

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