added some validation

This commit is contained in:
Jesse James Isler 2022-03-31 11:10:40 +02:00
parent 2c9451c666
commit 9e4441f78b

View File

@ -236,6 +236,23 @@
document.getElementById("carddescription").innerHTML = $('#description').val();
}
function updateColor() {
$('#strength').prop('disabled', false);
$('#modifier').prop('disabled', false);
if ($('#rolecolor').val() = "transparent" || $('#rolecolor').val() = "black" || $('#rolecolor').val() = "white") {
$('#modifier').val() = ""
$('#modifier').prop('disabled', 'disabled');
$('#strength').val() = ""
$('#strength').prop('disabled', 'disabled');
} else if ($('#rolecolor').val() = "brown" || $('#rolecolor').val() = "grey" || $('#rolecolor').val() = "blue-grey" ) {
}
document.getElementById("rolecard").className = "card " + $('#rolecolor').val() +" "+ $('#modifier').val() +"-"+ $('#strength').val() + " " + $('#tcolor').val();
}
</script>