From 79cc26b7e594403b416bdd9e108704685124592c Mon Sep 17 00:00:00 2001 From: coolneng Date: Thu, 16 Jul 2020 05:17:07 +0200 Subject: [PATCH] Hide text input when country is Spain --- README.md | 2 +- src/change_input_type.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 709a578..420b895 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ This project consists of an Information System for a Medical Institution. ## Installation -1. Install Nix (compatible with Nix and Linux): +1. Install Nix (compatible with MacOS and Linux): ``` {.shell} curl -L https://nixos.org/nix/install | sh diff --git a/src/change_input_type.js b/src/change_input_type.js index 72aad06..ef111f7 100644 --- a/src/change_input_type.js +++ b/src/change_input_type.js @@ -2,16 +2,18 @@ function changeInputType() { country = document.getElementById("pais").value; region = document.getElementById("provincia"); city = document.getElementById("localidad"); + region_input = document.getElementById("provincia2"); + city_input = document.getElementById("localidad2"); if (country == 73) { region.hidden = false; city.hidden = false; + region_input.type = "hidden"; + city_input.type = "hidden"; } else { region.hidden = true; city.hidden = true; - region_input = document.getElementById("provincia2"); - city_input = document.getElementById("localidad2"); region_input.type = "text"; city_input.type = "text"; } -} \ No newline at end of file +}