diff --git a/create.php b/create.php index 1ab4553..3aecfd7 100644 --- a/create.php +++ b/create.php @@ -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(); }