JS for Sent to
This commit is contained in:
parent
eeaa4af5fb
commit
83beefd23d
1 changed files with 11 additions and 5 deletions
|
@ -1,21 +1,27 @@
|
||||||
|
|
||||||
function showHideAviary() {
|
function showBirdEditFields() {
|
||||||
let statusField = document.getElementById("id_status");
|
let statusField = document.getElementById("id_status");
|
||||||
let aviaryField = document.getElementById("div_id_aviary");
|
|
||||||
let statusText = statusField.options[statusField.selectedIndex].text;
|
let statusText = statusField.options[statusField.selectedIndex].text;
|
||||||
|
let aviaryField = document.getElementById("div_id_aviary");
|
||||||
|
let sentToField = document.getElementById("div_id_sent_to");
|
||||||
|
|
||||||
|
|
||||||
if (statusText == 'In Auswilderung') {
|
if (statusText == 'In Auswilderung') {
|
||||||
aviaryField.hidden = false
|
aviaryField.hidden = false
|
||||||
} else {
|
} else if (statusText == 'Übermittelt') {
|
||||||
|
sentToField.hidden = false
|
||||||
|
}
|
||||||
|
else {
|
||||||
aviaryField.hidden = true
|
aviaryField.hidden = true
|
||||||
|
sentToField.hidden = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Load function on windows load.
|
// Load function on windows load.
|
||||||
(showHideAviary)();
|
(showBirdEditFields)();
|
||||||
|
|
||||||
// Load function on change.
|
// Load function on change.
|
||||||
document.getElementById("id_status").addEventListener("change", (event) => {
|
document.getElementById("id_status").addEventListener("change", (event) => {
|
||||||
showHideAviary()
|
showBirdEditFields()
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue