Hide text input when country is Spain
This commit is contained in:
parent
997de5c4bf
commit
79cc26b7e5
@ -17,7 +17,7 @@ This project consists of an Information System for a Medical Institution.
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Install Nix (compatible with Nix and Linux):
|
1. Install Nix (compatible with MacOS and Linux):
|
||||||
|
|
||||||
``` {.shell}
|
``` {.shell}
|
||||||
curl -L https://nixos.org/nix/install | sh
|
curl -L https://nixos.org/nix/install | sh
|
||||||
|
@ -2,16 +2,18 @@ function changeInputType() {
|
|||||||
country = document.getElementById("pais").value;
|
country = document.getElementById("pais").value;
|
||||||
region = document.getElementById("provincia");
|
region = document.getElementById("provincia");
|
||||||
city = document.getElementById("localidad");
|
city = document.getElementById("localidad");
|
||||||
|
region_input = document.getElementById("provincia2");
|
||||||
|
city_input = document.getElementById("localidad2");
|
||||||
|
|
||||||
if (country == 73) {
|
if (country == 73) {
|
||||||
region.hidden = false;
|
region.hidden = false;
|
||||||
city.hidden = false;
|
city.hidden = false;
|
||||||
|
region_input.type = "hidden";
|
||||||
|
city_input.type = "hidden";
|
||||||
} else {
|
} else {
|
||||||
region.hidden = true;
|
region.hidden = true;
|
||||||
city.hidden = true;
|
city.hidden = true;
|
||||||
region_input = document.getElementById("provincia2");
|
|
||||||
city_input = document.getElementById("localidad2");
|
|
||||||
region_input.type = "text";
|
region_input.type = "text";
|
||||||
city_input.type = "text";
|
city_input.type = "text";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user