diff --git a/static/app.js b/static/app.js index 15b4503..486ade4 100755 --- a/static/app.js +++ b/static/app.js @@ -1647,3 +1647,33 @@ function showWeatherP() { } +// Disable adding cities when no API key detected + + + if(document.getElementById("api-key1").value==="") { + document.getElementById('inputTextBtn6').disabled = true; + } + + else if (document.getElementById("api-key1").value==="Weather API Key") { + document.getElementById('inputTextBtn6').disabled = true; + } + + else { + document.getElementById('inputTextBtn6').disabled = false; + } + + + + + if(document.getElementById("api-key").value==="") { + document.getElementById('inputTextBtn7').disabled = true; + } + + else if (document.getElementById("api-key").value==="Weather API Key") { + document.getElementById('inputTextBtn7').disabled = true; + } + + else { + document.getElementById('inputTextBtn7').disabled = false; + } +