Update create.php

This commit is contained in:
Jesse James Isler 2022-03-31 12:38:22 +02:00
parent 17c7909ebb
commit 3e731fce29
1 changed files with 16 additions and 15 deletions

View File

@ -237,28 +237,29 @@
} }
function updateColor() { function updateColor() {
$('#strength').prop('disabled', false); strength = document.getElementById("carddescription");
$('#modifier').prop('disabled', false); 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.value = "";
$('#modifier').prop('disabled', 'disabled'); modifier.setAttribute('disabled', '');
$('#strength').val() = ""; strength.value = "";
$('#strength').prop('disabled', 'disabled'); 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") { if ($('#modifier').val() === "accent") {
$('#modifier').val() = ""; modifier.value = "";
$('#strength').val() = ""; 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> </script>
<!-- Start Tab init --> <!-- Start Tab init -->