Fix warp columns at end

This commit is contained in:
Hash Borgir 2023-09-12 00:45:12 -06:00
parent d5b69ba317
commit d794031fd8

View File

@ -127,14 +127,21 @@ unset($output[0]);
<?php for ($i = 0; $i <= 7; $i++): ?> <?php for ($i = 0; $i <= 7; $i++): ?>
<td class="warp"> <td class="warp">
<select name="Warp<?php echo $i; ?>" data-id="<?php echo $level['Id']; ?>"> <select name="Warp<?php echo $i; ?>" data-id="<?php echo $level['Id']; ?>">
<?php
// Check if the Warp value is -1 and add the custom option for it
if (isset($level["Warp$i"]) && $level["Warp$i"] == -1) {
echo '<option value="-1" selected>-1</option>';
}
?>
<?php foreach ($lvlwarp as $key => $value): ?> <?php foreach ($lvlwarp as $key => $value): ?>
<option value="<?php echo $key; ?>"> <option value="<?php echo $key; ?>" <?php if (isset($level["Warp$i"]) && $level["Warp$i"] == $key) echo 'selected'; ?>>
<?php echo "$key - $value"; ?> <?php echo "$key - $value"; ?>
</option> </option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
</td> </td>
<?php endfor; ?> <?php endfor; ?>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>