Button Update

the button will not work if the skin is not selected which fixes possible bugs in the plugin.
This commit is contained in:
Nilsu Derinder
2023-12-12 23:33:05 +03:00
committed by GitHub
parent 7f41607d54
commit 969d40b970

View File

@@ -136,9 +136,20 @@ if (isset($_SESSION['steamid'])) {
?>
</select>
<br></br>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#weaponModal<?php echo $defindex ?>">
Settings
</button>
<?php if ($selectedSkinInfo !== null): ?>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#weaponModal<?php echo $defindex ?>">
Settings
</button>
<?php else: ?>
<button type="button" class="btn btn-primary" onclick="showSkinSelectionAlert()">
Settings
</button>
<script>
function showSkinSelectionAlert() {
alert("You need to select a skin first.");
}
</script>
<?php endif; ?>
</div>
<?php