Update create.php

This commit is contained in:
Jesse James Isler 2022-03-31 12:38:22 +02:00
parent 17c7909ebb
commit 3e731fce29

View File

@ -237,28 +237,29 @@
}
function updateColor() {
$('#strength').prop('disabled', false);
$('#modifier').prop('disabled', false);
strength = document.getElementById("carddescription");
strength.removeAttribute('disabled');
modifier = document.getElementById("modifier");
modifier.removeAttribute('disabled');
if ($('#rolecolor').val() = "transparent" || $('#rolecolor').val() = "black" || $('#rolecolor').val() = "white") {
if ($('#rolecolor').val() === "transparent" || $('#rolecolor').val() === "black" || $('#rolecolor').val() === "white") {
$('#modifier').val() = "";
$('#modifier').prop('disabled', 'disabled');
modifier.value = "";
modifier.setAttribute('disabled', '');
$('#strength').val() = "";
$('#strength').prop('disabled', 'disabled');
strength.value = "";
strength.setAttribute('disabled', '');
} else if ($('#rolecolor').val() = "brown" || $('#rolecolor').val() = "grey" || $('#rolecolor').val() = "blue-grey" ) {
} else if ($('#rolecolor').val() === "brown" || $('#rolecolor').val() === "grey" || $('#rolecolor').val() === "blue-grey") {
if ( $('#modifier').val() = "accent") {
$('#modifier').val() = "";
$('#strength').val() = "";
}
}
if ($('#modifier').val() === "accent") {
modifier.value = "";
strength.value = "";
}
}
document.getElementById("rolecard").className = "card " + $('#rolecolor').val() +" "+ $('#modifier').val() +"-"+ $('#strength').val() + " " + $('#tcolor').val();
document.getElementById("rolecard").className = "card " + $('#rolecolor').val() + " " + $('#modifier').val() + "-" + $('#strength').val() + " " + $('#tcolor').val();
}
</script>
<!-- Start Tab init -->