From 89e53744edf0b36edfdd411a8a68eb7641314348 Mon Sep 17 00:00:00 2001
From: Rimian Perkins
Date: Tue, 8 Oct 2019 11:36:48 +1100
Subject: [PATCH] Hide disabled
* Do not show the form if the plugin is disabled
* Upgrade Stripe Gem
---
.../discourse/templates/patrons/index.hbs | 16 +++++++++-------
plugin.rb | 6 +++---
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/assets/javascripts/discourse/templates/patrons/index.hbs b/assets/javascripts/discourse/templates/patrons/index.hbs
index f131386..fb9e813 100644
--- a/assets/javascripts/discourse/templates/patrons/index.hbs
+++ b/assets/javascripts/discourse/templates/patrons/index.hbs
@@ -5,10 +5,12 @@
{{cook-text siteSettings.discourse_patrons_payment_page}}
-
- {{donation-form
- billing=model
- paymentSuccessHandler=(action "paymentSuccessHandler")
- stripePaymentHandler=(action "stripePaymentHandler")
- }}
-
+{{#if siteSettings.discourse_patrons_enabled}}
+
+ {{donation-form
+ billing=model
+ paymentSuccessHandler=(action "paymentSuccessHandler")
+ stripePaymentHandler=(action "stripePaymentHandler")
+ }}
+
+{{/if}}
diff --git a/plugin.rb b/plugin.rb
index 681e598..8074f10 100644
--- a/plugin.rb
+++ b/plugin.rb
@@ -2,13 +2,13 @@
# name: discourse-patrons
# about: Integrates Stripe into Discourse to allow visitors to make payments
-# version: 1.2.1
+# version: 1.2.2
# url: https://github.com/rimian/discourse-patrons
# authors: Rimian Perkins
enabled_site_setting :discourse_patrons_enabled
-gem 'stripe', '5.2.0'
+gem 'stripe', '5.6.0'
register_asset "stylesheets/common/discourse-patrons.scss"
register_asset "stylesheets/mobile/discourse-patrons.scss"
@@ -29,7 +29,7 @@ end
after_initialize do
::Stripe.api_version = "2019-08-14"
- ::Stripe.set_app_info('Discourse Patrons', version: '1.2.1', url: 'https://github.com/rimian/discourse-patrons')
+ ::Stripe.set_app_info('Discourse Patrons', version: '1.2.2', url: 'https://github.com/rimian/discourse-patrons')
[
"../lib/discourse_patrons/engine",