campaign: hide pp note w/ js
authorKai Michaelis <kai@gnupg.org>
Fri, 2 Jun 2017 11:57:46 +0000 (13:57 +0200)
committerKai Michaelis <kai@gnupg.org>
Fri, 2 Jun 2017 11:57:46 +0000 (13:57 +0200)
web/donate/donate.org
web/share/campaign/campaign.js

index 1320966..3c9c2ed 100644 (file)
               <input type="radio" name="paytype" id="pp"
                      value="pp" /><!--CHECK_PP-->
               PayPal
-              <span class="help-block help-inline">
+              <span class="help-block help-inline" id="paypal-note">
                 Please note that in certain countries recurring donations are not possible with PayPal.
               </span>
             </label>
index ba931c5..f71857b 100644 (file)
@@ -143,3 +143,15 @@ $(document).ready(function() {
                     + yt_id + '?autoplay=1&modestbranding=1&rel=0' + extra_parms + '"></iframe>');
     });
 });
+
+/* hide the note about recurring donations under the Paypal option.  */
+$(document).ready(function() {
+  $("#recur").change(function() {
+    if (this.value !== 0) {
+      $("#paypal-note").hide();
+    }
+    else {
+      $("#paypal-note").show();
+    }
+  });
+});