This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
devicehub-teal/ereuse_devicehub/static/js/create_device.js

24 lines
610 B
JavaScript
Raw Normal View History

2022-04-20 10:04:53 +00:00
$(document).ready(() => {
2022-01-19 12:40:40 +00:00
$("#type").on("change", deviceInputs);
deviceInputs();
2022-01-19 12:40:40 +00:00
})
function deviceInputs() {
2022-04-20 10:04:53 +00:00
if ($("#type").val() == "Monitor") {
2022-01-19 12:40:40 +00:00
$("#screen").show();
$("#resolution").show();
$("#imei").hide();
$("#meid").hide();
2022-04-20 10:04:53 +00:00
} else if (["Smartphone", "Cellphone", "Tablet"].includes($("#type").val())) {
2022-01-19 12:40:40 +00:00
$("#screen").hide();
$("#resolution").hide();
$("#imei").show();
$("#meid").show();
} else {
$("#screen").hide();
$("#resolution").hide();
$("#imei").hide();
$("#meid").hide();
}
}