caboose-cms 0.8.41 → 0.8.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 945c437e933d397c1638c61f648474f9144bfaa5
4
- data.tar.gz: 32696496ae665b5937f15cb846227c5db9ad4df9
3
+ metadata.gz: a2076b0bc20624465ba131782399551802f7cf86
4
+ data.tar.gz: 52d9bcde7f99280c503324b0263d9d0160c9873a
5
5
  SHA512:
6
- metadata.gz: 2d9873f6add7c68e6bc4c398c9cf7849e824f9dc285dcd1cd8a1fbcd4a54b5d2cd67b3c6aaee813f7cc23e90a29a1288604fdc5bfcc1771609727db90e6f30f0
7
- data.tar.gz: 9f8b80d544fb73d64a31fd18e89d7f3683e64493ff535cf27a5c3ed8667b0ad24a6c3248d0c7660bff5a1a6136abe88a2c2fc39695786545f55add7d85403dd3
6
+ metadata.gz: 94899604fdbb18235561cbb3c4c73536ade2eaef9f2011e3d64d85a5ff3a184747cf96f018d3de325012cc2df2cba9fa2ea6404e2239dc891d381749d0093504
7
+ data.tar.gz: de8e7140f72583285126504ce04239bb0507c2f7ac54c840a0ee75943204474c3d59a3c3384d2685f382c3b1d11a6197b5b4905b4564e05b5c0bd552a2ba21ec
@@ -50,8 +50,7 @@ $(document).ready(function() {
50
50
 
51
51
  function caboose_modal(el)
52
52
  {
53
- var options = {
54
- iframe: true,
53
+ var options = {
55
54
  initialWidth: 400,
56
55
  initialHeight: 200,
57
56
  innerWidth: 400,
@@ -869,6 +869,7 @@ class Caboose::Schema < Caboose::Utilities::Schema
869
869
  [ :subscription_id , :integer ],
870
870
  [ :user_id , :integer ],
871
871
  [ :date_started , :date ],
872
+ [ :date_started_full, :date ],
872
873
  [ :status , :string ]
873
874
  ],
874
875
  Caboose::Variant => [
@@ -28,10 +28,10 @@ module Caboose
28
28
  s = self.subscription
29
29
  d = nil
30
30
  if s.interval == Subscription::INTERVAL_YEARLY
31
- d = Date(self.date_started.year, s.start_month, s.start_day)
31
+ d = Date.parse(self.date_started.year, s.start_month, s.start_day)
32
32
  d = d + 1.year if d < self.date_started
33
33
  elsif s.interval == Subscription::INTERVAL_MONTHLY
34
- d = Date(self.date_started.year, self.date_started.month, s.start_day)
34
+ d = Date.parse(self.date_started.year, self.date_started.month, s.start_day)
35
35
  d = d + 1.month if d < self.date_started
36
36
  end
37
37
  self.date_started_full = d
@@ -57,7 +57,7 @@ module Caboose
57
57
  unit_price = v.clearance && v.clearance_price ? v.clearance_price : (v.on_sale? ? v.sale_price : v.price)
58
58
 
59
59
  # Special case if the subscription starts on specific day
60
- if self.subscription.start_on_day && Date.today > self.date_started_full
60
+ if self.subscription.start_on_day && (Date.today > self.date_started_full)
61
61
  li = self.line_items.where("date_starts = ? date_ends = ?", self.date_started, self.date_started_full - 1.day).first
62
62
  if li.nil?
63
63
  prorated_unit_price = unit_price + 0.00
@@ -2,7 +2,7 @@
2
2
  <%
3
3
  site = @user.site
4
4
  pd = site.primary_domain
5
- url = "#{pd.domain}/modal/login/reset-password/#{@user.password_reset_id}"
5
+ url = "#{pd.domain}/login/reset-password/#{@user.password_reset_id}"
6
6
  %>
7
7
  <p>To reset your password for <%= site.description %>, click the link below:</p>
8
8
  <p><a href='<%= url %>'><%= url %></p>
@@ -1,5 +1,5 @@
1
1
  <%
2
- store_config = @invoice.site.store_config
2
+ store_config = @invoice.site.store_config if @invoice
3
3
  u = @logged_in_user
4
4
  %>
5
5
  <div id='my_account'>
@@ -10,7 +10,7 @@ u = @logged_in_user
10
10
  <p><div id='user_<%= @user.id %>_phone' ></div></p>
11
11
  <div id='message2'></div>
12
12
 
13
- <% if @site.use_store %>
13
+ <% if @site.use_store && store_config %>
14
14
  <h2>Billing</h2>
15
15
  <p id='card_details'>
16
16
  <% if u.card_brand && u.card_last4 %>You have a <%= u.card_brand %> ending in <%= u.card_last4 %> on file.<% else %>You have no card on file.<% end %>
@@ -29,7 +29,7 @@ u = @logged_in_user
29
29
 
30
30
  <p>
31
31
  <input type='button' value='Reset Password' class='btn' onclick="reset_user_password();" />
32
- <% if @site.use_store %>
32
+ <% if @site.use_store && store_config %>
33
33
  <input type='button' value='Invoice History' class='btn' onclick="window.location='/my-account/invoices';" />
34
34
  <% end %>
35
35
  </p>
@@ -62,7 +62,7 @@ $(document).ready(function() {
62
62
  }
63
63
  });
64
64
 
65
- <% if @site.use_store %>
65
+ <% if @site.use_store && store_config %>
66
66
  $('#stripe_form').submit(function(e) {
67
67
  e.preventDefault();
68
68
  update_card();
@@ -76,7 +76,7 @@ $(document).ready(function() {
76
76
  <% end %>
77
77
  });
78
78
 
79
- <% if @site.use_store %>
79
+ <% if @site.use_store && store_config %>
80
80
  function toggle_stripe_form()
81
81
  {
82
82
  if ($('#stripe_form').is(':visible'))
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.8.41'
2
+ VERSION = '0.8.42'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.41
4
+ version: 0.8.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-11 00:00:00.000000000 Z
11
+ date: 2016-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg