diff --git a/static/css/linx.css b/static/css/linx.css index edb88c4..e47f48f 100644 --- a/static/css/linx.css +++ b/static/css/linx.css @@ -277,13 +277,6 @@ body { margin: 0; } -#access_key_checkbox:checked ~ #access_key_input { - display: inline-block; -} -#access_key_checkbox:checked ~ #access_key_text { - display: none; -} - #access_key_input { padding: 0; display: none; diff --git a/static/js/upload.js b/static/js/upload.js index c5ac28a..db2010c 100644 --- a/static/js/upload.js +++ b/static/js/upload.js @@ -141,8 +141,13 @@ document.onpaste = function (event) { }; document.getElementById("access_key_checkbox").onchange = function (event) { - if (event.target.checked == false) { + if (event.target.checked) { + document.getElementById("access_key_input").style.display = "inline-block"; + document.getElementById("access_key_text").style.display = "none"; + } else { document.getElementById("access_key_input").value = ""; + document.getElementById("access_key_input").style.display = "none"; + document.getElementById("access_key_text").style.display = "inline-block"; } }; diff --git a/templates/index.html b/templates/index.html index 9e73457..34e5d86 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,9 +4,10 @@ {% endblock %} -{% block content %} +{% block content %}