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 +4 -4
- data/app/assets/javascripts/caboose/modal_integration.js +1 -2
- data/app/models/caboose/schema.rb +1 -0
- data/app/models/caboose/user_subscription.rb +3 -3
- data/app/views/caboose/login_mailer/forgot_password_email.html.erb +1 -1
- data/app/views/caboose/my_account/index.html.erb +5 -5
- data/lib/caboose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2076b0bc20624465ba131782399551802f7cf86
|
4
|
+
data.tar.gz: 52d9bcde7f99280c503324b0263d9d0160c9873a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94899604fdbb18235561cbb3c4c73536ade2eaef9f2011e3d64d85a5ff3a184747cf96f018d3de325012cc2df2cba9fa2ea6404e2239dc891d381749d0093504
|
7
|
+
data.tar.gz: de8e7140f72583285126504ce04239bb0507c2f7ac54c840a0ee75943204474c3d59a3c3384d2685f382c3b1d11a6197b5b4905b4564e05b5c0bd552a2ba21ec
|
@@ -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}/
|
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'))
|
data/lib/caboose/version.rb
CHANGED
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.
|
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
|
+
date: 2016-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|