diff --git a/bookwyrm/static/css/format.css b/bookwyrm/static/css/format.css index 72b435bd..f10549ed 100644 --- a/bookwyrm/static/css/format.css +++ b/bookwyrm/static/css/format.css @@ -23,7 +23,7 @@ } .hidden { - display: none; + display: none !important; } /* --- STARS --- */ diff --git a/bookwyrm/static/js/shared.js b/bookwyrm/static/js/shared.js index d95e7706..55a5c1b2 100644 --- a/bookwyrm/static/js/shared.js +++ b/bookwyrm/static/js/shared.js @@ -27,8 +27,20 @@ window.onload = function() { // update localstorage Array.from(document.getElementsByClassName('set-display')) .forEach(t => t.onclick = updateDisplay); + + // hidden submit button in a form + document.querySelectorAll('.hidden-form input') + .forEach(t => t.onchange = revealForm); }; +function revealForm(e) { + var hidden = e.currentTarget.closest('.hidden-form').getElementsByClassName('hidden')[0]; + if (hidden) { + removeClass(hidden, 'hidden'); + } +} + + function updateDisplay(e) { // used in set reading goal var key = e.target.getAttribute('data-id'); diff --git a/bookwyrm/templates/snippets/privacy_select.html b/bookwyrm/templates/snippets/privacy_select.html index d648ce8b..a771c3d6 100644 --- a/bookwyrm/templates/snippets/privacy_select.html +++ b/bookwyrm/templates/snippets/privacy_select.html @@ -1,5 +1,5 @@ {% load bookwyrm_tags %} -