This is a piece of legacy code that probably nobody uses and was broken unnoticed long ago.
Reason: toggle is a custom function that hide/shows an element. However that is not the intent here, for toggle is also a jQuery function that calls 2 handlers alternatively as the element is clicked (see https://api.jquery.com/toggle-event/)
- Sites::LegalTermsHelper#insert_legal_terms_snippet_button
- app/views/shared/_legal_terms.html.erb
- doc/liquid/snippets/legal_terms.md
- is related to
-
THREESCALE-9335 Developer portal: builtin toggling code for legal terms contains a Javascript bug
- To Test (QE)