Skip to content

Commit

Permalink
Merge pull request #3902 from wordhouse66/mybranch
Browse files Browse the repository at this point in the history
Disable 'Associate' membership payment buttons. "fixes #3840"
  • Loading branch information
mattlindsey authored Aug 11, 2023
2 parents 791779c + e2d3ac8 commit 178ee9f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 55 deletions.
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ GEM
libv8-node (16.10.0.0-aarch64-linux)
libv8-node (16.10.0.0-arm64-darwin)
libv8-node (16.10.0.0-x86_64-darwin)
libv8-node (16.10.0.0-x86_64-darwin-19)
libv8-node (16.10.0.0-x86_64-linux)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
Expand Down Expand Up @@ -772,6 +773,7 @@ PLATFORMS
arm64-darwin-22
x86_64-darwin-17
x86_64-darwin-18
x86_64-darwin-19
x86_64-darwin-20
x86_64-darwin-21
x86_64-linux
Expand Down
1 change: 1 addition & 0 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
//= link lolex.js
//= link disqus.js
//= link 404.js
//= link subscriptions.css
43 changes: 24 additions & 19 deletions app/views/subscriptions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<br/>
<a href='/<%= @plan.name.downcase.gsub(' ','_') %>'>Further details</a>
<label class="amount">
<p>The price for <%= @plan.name %> <%= type %> is £<%= number_to_currency(@plan.amount / 100.0, unit: '') %>/Month</p>
<h3>Subscription has been temporaily disabled.</h3>
<!--<p>The price for <%= @plan.name %> <%= type %> is £<%= number_to_currency(@plan.amount / 100.0, unit: '') %>/Month</p>
<% if @plan.free_trial? %>
<p><%= @plan.free_trial_length_days %> day free trial! No charge for <%= @plan.free_trial_length_days %> days</p>
<% end %>
<% end %>-->
</label>
<% if flash[:error].present? %>
<div id="error_explanation">
Expand All @@ -16,31 +17,35 @@
<br/>
</article>
<div class="row">
<div id="paypal_section" class="col-lg-5 well" style="margin: 10px; text-align: center;"> <!-- shiv because controller stylesheets now working in production mode see https://github.com/AgileVentures/WebsiteOne/issues/1450-->
<div style="margin-bottom: 15px;"><%= action_text %> <%= @plan.name %> via Paypal:</div>
<!--<div id="paypal_section" class="col-lg-5 well" style="margin: 10px; text-align: center;">--> <!-- shiv because controller stylesheets now working in production mode see https://github.com/AgileVentures/WebsiteOne/issues/1450-->
<!--<div style="margin-bottom: 15px;"><%= action_text %> <%= @plan.name %> via Paypal:</div>
<%= form_tag paypal_new_path(plan: @plan, user: @sponsee_slug), method: "post", data: { behavior: 'ajax-spin', target: '#target-element' } do %>
<input type="image" name="submit" src="https://www.paypalobjects.com/en_GB/i/btn/btn_subscribe_LG.gif" alt="Subscribe">
<input type="image" name="submit" src="https://www.paypalobjects.com/en_GB/i/btn/btn_subscribe_LG.gif" alt="Subscribe" disabled>
<img alt="" width="1" height="1" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" hidden="" style="display: none !important;">
<% end %>
</div>
</div>-->

<div id="card_section" class="col-lg-5 well" style="margin: 10px; text-align: center;"> <!-- shiv because controller stylesheets now working in production mode see https://github.com/AgileVentures/WebsiteOne/issues/1450-->
<!--<div id="card_section" class="col-lg-5 well" style="margin: 10px; text-align: center;">--> <!-- shiv because controller stylesheets now working in production mode see https://github.com/AgileVentures/WebsiteOne/issues/1450-->

<div style="margin-bottom: 15px;"><%= action_text %> <%= @plan.name %> via Credit/Debit Card:</div>
<!--<div style="margin-bottom: 15px;"><%= action_text %> <%= @plan.name %> via Credit/Debit Card:</div>
<%= form_tag subscriptions_path(plan: @plan.third_party_identifier, user: @sponsee_slug) do %>
<script src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="<%= Rails.configuration.stripe[:publishable_key] %>"
data-description="Monthly Subscription"
data-amount="<%= @plan.amount %>"
data-panel-label="Subscribe"
data-currency="GBP"
data-locale="en-US"
data-name="<%= @plan.name %> <%= type %>"
data-label="Subscribe"
data-image="/favicon.ico?v=2"></script>
<script src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="<%= Rails.configuration.stripe[:publishable_key] %>"
data-description="Monthly Subscription"
data-amount="<%= @plan.amount %>"
data-panel-label="Subscribe"
data-currency="GBP"
data-locale="en-US"
data-name="<%= @plan.name %> <%= type %>"
data-label="Subscribe"
data-image="/favicon.ico?v=2">
</script>
<% end %>
</div>
</div>-->
</div>

<!-- <%= stylesheet_link_tag params[:controller], 'data-turbolinks-track' => true %> -->
<script>
document.querySelector('.stripe-button-el').setAttribute('disabled', '')
</script>
40 changes: 4 additions & 36 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ debug@^3.1.0:
dependencies:
ms "^2.1.1"

debuglog@*, debuglog@^1.0.1:
debuglog@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
integrity sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==
Expand Down Expand Up @@ -1860,7 +1860,7 @@ import-lazy@^2.1.0:
resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43"
integrity sha512-m7ZEHgtw69qOGw+jwxXkHlrlIPdTGkyh66zXZ1ajZbxkDBNjSY/LGbmjc7h0s2ELsUDTAhFr55TrPSSqJGPG0A==

imurmurhash@*, imurmurhash@^0.1.4:
imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==
Expand Down Expand Up @@ -2208,11 +2208,6 @@ lockfile@~1.0.3:
dependencies:
signal-exit "^3.0.2"

lodash._baseindexof@*:
version "3.1.0"
resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c"
integrity sha512-bSYo8Pc/f0qAkr8fPJydpJjtrHiSynYfYBjtANIgXv5xEf1WlTC63dIDlgu0s9dmTvzRu1+JJTxcIAHe+sH0FQ==

lodash._baseuniq@~4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8"
Expand All @@ -2221,33 +2216,11 @@ lodash._baseuniq@~4.6.0:
lodash._createset "~4.0.0"
lodash._root "~3.0.0"

lodash._bindcallback@*:
version "3.0.1"
resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
integrity sha512-2wlI0JRAGX8WEf4Gm1p/mv/SZ+jLijpj0jyaE/AXeuQphzCgD8ZQW4oSpoN8JAopujOFGU3KMuq7qfHBWlGpjQ==

lodash._cacheindexof@*:
version "3.0.2"
resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92"
integrity sha512-S8dUjWr7SUT/X6TBIQ/OYoCHo1Stu1ZRy6uMUSKqzFnZp5G5RyQizSm6kvxD2Ewyy6AVfMg4AToeZzKfF99T5w==

lodash._createcache@*:
version "3.1.2"
resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093"
integrity sha512-ev5SP+iFpZOugyab/DEUQxUeZP5qyciVTlgQ1f4Vlw7VUcCD8fVnyIqVUEIaoFH9zjAqdgi69KiofzvVmda/ZQ==
dependencies:
lodash._getnative "^3.0.0"

lodash._createset@~4.0.0:
version "4.0.3"
resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26"
integrity sha512-GTkC6YMprrJZCYU3zcqZj+jkXkrXzq3IPBcF/fIPpNEAB4hZEtXU8zp/RwKOvZl43NUmwDbyRk3+ZTbeRdEBXA==

lodash._getnative@*, lodash._getnative@^3.0.0:
version "3.9.1"
resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
integrity sha512-RrL9VxMEPyDMHOd9uFbvMe8X55X16/cGM5IgOKgRElQZutpX89iS6vwl64duTV1/16w5JY7tuFNXqoekmh1EmA==

lodash._root@~3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
Expand All @@ -2258,11 +2231,6 @@ lodash.clonedeep@~4.5.0:
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==

lodash.restparam@*:
version "3.6.1"
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
integrity sha512-L4/arjjuq4noiUJpt3yS6KIKDtJwNe2fIYgMqyYYKoeIfV1iEqvPwhCx23o+R9dzouGihDAPN1dTIRWa7zk8tw==

lodash.union@~4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88"
Expand Down Expand Up @@ -3276,7 +3244,7 @@ readable-stream@~1.1.10:
isarray "0.0.1"
string_decoder "~0.10.x"

readdir-scoped-modules@*, readdir-scoped-modules@^1.0.0:
readdir-scoped-modules@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309"
integrity sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==
Expand Down Expand Up @@ -4064,7 +4032,7 @@ uuid@~3.1.0:
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04"
integrity sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==

validate-npm-package-license@*, validate-npm-package-license@^3.0.1:
validate-npm-package-license@^3.0.1:
version "3.0.4"
resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a"
integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==
Expand Down

0 comments on commit 178ee9f

Please sign in to comment.