turnstile

Drupal paywall plugin
Log | Files | Refs | README | LICENSE

commit 5138716fcc390f5987ac1fd8de540b54a52b2919
parent fabc5a361f0a376840a937529414c68c87431491
Author: Florian Dold <florian@dold.me>
Date:   Tue, 25 Nov 2025 23:10:59 +0100

another attempt at hiding

Diffstat:
Mjs/payment-button.js | 4++--
Mtemplates/taler-turnstile-payment-button.html.twig | 10+++++++---
2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/js/payment-button.js b/js/payment-button.js @@ -155,9 +155,9 @@ }); window.talerCallback = (res) => { if (res.present) { - $('.show-if-taler-supported', context).attr("hidden", false); + $('.show-if-taler-supported', context).removeClass("hidden"); } else { - $('.show-if-taler-supported', context).hide("hidden", true); + $('.show-if-taler-supported', context).addClass("hidden"); } }; // Add taler-support meta tag diff --git a/templates/taler-turnstile-payment-button.html.twig b/templates/taler-turnstile-payment-button.html.twig @@ -13,13 +13,12 @@ <p class="taler-turnstile-qr-help">{{ 'Scan with your GNU Taler wallet'|t }}</p> </div> - <div class="taler-turnstile-payment-or show-if-taler-supported" hidden> + <div class="taler-turnstile-payment-or show-if-taler-supported hidden"> <span>{{ 'or'|t }}</span> </div> <a href="{{ payment_url }}" - class="button button--primary taler-turnstile-pay-button show-if-taler-supported" - hidden + class="button button--primary taler-turnstile-pay-button show-if-taler-supported hidden" data-order-id="{{ order_id }}" data-session-id="{{ session_id }}"> {{ 'Open GNU Taler payment Web page'|t }} @@ -149,6 +148,11 @@ background: linear-gradient(to bottom, transparent, white); } +/* Make sure we have a rule with high specificity. */ +.show-if-taler-supported.hidden { + display: none !important; +} + /* Responsive design */ @media (min-width: 768px) { .taler-turnstile-payment-actions {