Hide text input when country is Spain

This commit is contained in:
coolneng 2020-07-16 05:17:07 +02:00
parent 997de5c4bf
commit 79cc26b7e5
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
2 changed files with 6 additions and 4 deletions

View File

@ -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

View File

@ -2,15 +2,17 @@ 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";
} }