added some validation
This commit is contained in:
parent
2c9451c666
commit
9e4441f78b
17
create.php
17
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();
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user