Update create.php
This commit is contained in:
parent
49dea27400
commit
033a5ad8b3
20
create.php
20
create.php
@ -237,30 +237,32 @@
|
||||
}
|
||||
function updateColor() {
|
||||
|
||||
strength = document.getElementById("carddescription");
|
||||
let color = document.getElementById('rolecolor');
|
||||
let strength = document.getElementById("carddescription");
|
||||
let modifier = document.getElementById("modifier");
|
||||
let textcolor = document.getElementById("tcolor");
|
||||
|
||||
|
||||
strength.removeAttribute('disabled');
|
||||
modifier = document.getElementById("modifier");
|
||||
modifier.removeAttribute('disabled');
|
||||
|
||||
if ($('#rolecolor').val() === "transparent" || $('#rolecolor').val() === "black" || $('#rolecolor').val() === "white") {
|
||||
|
||||
if (color.value === "transparent" || color.value === "black" || color.value === "white") {
|
||||
modifier.value = "";
|
||||
modifier.setAttribute('disabled', '');
|
||||
|
||||
strength.value = "";
|
||||
strength.setAttribute('disabled', '');
|
||||
|
||||
} else if ($('#rolecolor').val() === "brown" || $('#rolecolor').val() === "grey" || $('#rolecolor').val() === "blue-grey") {
|
||||
} else if (color.value === "brown" || color.value === "grey" || color.value === "blue-grey") {
|
||||
|
||||
if ($('#modifier').val() === "accent") {
|
||||
if (modifier.value === "accent") {
|
||||
modifier.value = "";
|
||||
strength.value = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
document.getElementById("rolecard").className = "card " + $('#rolecolor').val() + " " + $('#modifier').val() + "-" + $('#strength').val() + " " + $('#tcolor').val();
|
||||
document.getElementById("rolecard").className = "card " + color.value + " " + color.value + "-" + strength.value + " " + textcolor.value;
|
||||
}
|
||||
|
||||
</script>
|
||||
<!-- Start Tab init -->
|
||||
<script>
|
||||
|
Loading…
Reference in New Issue
Block a user