guichet/static/javascript/lesgv.js

20 lines
785 B
JavaScript
Raw Normal View History

2023-07-17 13:09:53 +02:00
function addResDigitaOrg (id) {
2023-07-19 08:04:29 +02:00
if (document.getElementById(id).value.split("@")[1] && !["lesgrandsvoisins.com","resdigita.com","resdigita.org","lesgv.com","lesgv.org"].includes(document.getElementById(id).value.split("@")[1])) {
document.getElementById(id).value = document.getElementById(id).value.split("@")[0] + "@lesgrandsvoisins.com";
}
2023-07-17 13:09:53 +02:00
return document.getElementById(id).value;
}
2023-07-17 12:49:36 +02:00
function addResDigitaOrgIdValue () {
2023-07-17 13:09:53 +02:00
document.getElementById("mail").value = addResDigitaOrg("idvalue");
}
function addResDigitaOrgMail () {
document.getElementById("idvalue").value = addResDigitaOrg("mail");
2023-07-17 12:49:36 +02:00
}
2023-07-20 15:40:14 +02:00
let idvalueInput = document.querySelector("#idvalue");
if (idvalueInput != null) {
idvalueInput.addEventListener("change",addResDigitaOrgIdValue);
}
2023-07-21 07:52:22 +02:00