spree_terms_and_conditions 2.1.5 → 2.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/store/terms_and_conditions.scss +4 -10
- data/app/views/spree/checkout/_terms_and_conditions_checkbox.haml +4 -9
- data/spree_terms_and_conditions.gemspec +1 -1
- metadata +2 -5
- data/app/models/spree/order_decorator.rb +0 -12
- data/spec/models/order_spec.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e19522352849fc3a96c4a72adb2e15a501972509
|
4
|
+
data.tar.gz: 60bc578de3a4cfe8b70b1ed9987b258f43b7536f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34aa6d52bb535b081d5160ad365340a22f7a2f4b11cbea3b3c8b35925573939e28480cea1f64811dd90d4fec52beb1dbe023a642633fae30afe2199c087630b3
|
7
|
+
data.tar.gz: 91f780212c6b8ffe980c93fe31f899ad380dae4259098622eebf85e70c8445f3e7f0a6e2770dc2b6601ff3fa1e0483dfdef560f9e87f11a69b94472a1b9cb1c5
|
@@ -1,13 +1,7 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
text-transform: uppercase;
|
4
|
-
font-weight: bold;
|
5
|
-
font-size: 14px;
|
6
|
-
padding: 5px;
|
7
|
-
margin-left: 15px;
|
8
|
-
}
|
1
|
+
#terms-and-conditions {
|
2
|
+
margin: 0;
|
9
3
|
|
10
|
-
|
11
|
-
|
4
|
+
a {
|
5
|
+
text-decoration: underline !important;
|
12
6
|
}
|
13
7
|
}
|
@@ -1,10 +1,5 @@
|
|
1
|
-
%
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
= form.check_box :terms_and_conditions
|
6
|
-
= form.label :terms_and_conditions do
|
7
|
-
I accept the
|
8
|
-
= link_to('terms and conditions', '/terms_and_conditions', target: '_blank').html_safe
|
9
|
-
for the website
|
1
|
+
%p#terms-and-conditions
|
2
|
+
By clicking 'Save and Continue', you are accepting the
|
3
|
+
= link_to('terms and conditions', '/terms_and_conditions', target: '_blank').html_safe
|
4
|
+
for the website
|
10
5
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.platform = Gem::Platform::RUBY
|
4
4
|
s.name = 'spree_terms_and_conditions'
|
5
|
-
s.version = '2.1.
|
5
|
+
s.version = '2.1.6'
|
6
6
|
s.summary = 'Add terms and conditions checkbox in delivery stage of checkout'
|
7
7
|
s.description = ''
|
8
8
|
s.required_ruby_version = '>= 2.0.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_terms_and_conditions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francisco Trindade
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_core
|
@@ -251,7 +251,6 @@ files:
|
|
251
251
|
- app/assets/stylesheets/admin/spree_terms_and_conditions.css
|
252
252
|
- app/assets/stylesheets/store/spree_terms_and_conditions.css
|
253
253
|
- app/assets/stylesheets/store/terms_and_conditions.scss
|
254
|
-
- app/models/spree/order_decorator.rb
|
255
254
|
- app/overrides/terms_and_conditions_checkbox.rb
|
256
255
|
- app/views/spree/checkout/_terms_and_conditions_checkbox.haml
|
257
256
|
- bin/rails
|
@@ -265,7 +264,6 @@ files:
|
|
265
264
|
- lib/spree_terms_and_conditions.rb
|
266
265
|
- lib/spree_terms_and_conditions/engine.rb
|
267
266
|
- lib/spree_terms_and_conditions/factories.rb
|
268
|
-
- spec/models/order_spec.rb
|
269
267
|
- spec/spec_helper.rb
|
270
268
|
- spree_terms_and_conditions.gemspec
|
271
269
|
homepage:
|
@@ -296,5 +294,4 @@ test_files:
|
|
296
294
|
- features/spree/terms_and_conditions.feature
|
297
295
|
- features/step_definitions/terms_and_conditions.rb
|
298
296
|
- features/support/env.rb
|
299
|
-
- spec/models/order_spec.rb
|
300
297
|
- spec/spec_helper.rb
|
@@ -1,12 +0,0 @@
|
|
1
|
-
Spree::Order.class_eval do
|
2
|
-
|
3
|
-
def valid_terms_and_conditions?
|
4
|
-
self.errors[:terms_and_conditions] << 'must be accepted' unless self.terms_and_conditions == true
|
5
|
-
self.errors[:terms_and_conditions].empty? ? true : false
|
6
|
-
end
|
7
|
-
|
8
|
-
end
|
9
|
-
|
10
|
-
Spree::PermittedAttributes.checkout_attributes << :terms_and_conditions
|
11
|
-
|
12
|
-
Spree::Order.state_machine.before_transition :to => :payment, :do => :valid_terms_and_conditions?
|
data/spec/models/order_spec.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Spree::Order do
|
4
|
-
|
5
|
-
let(:order){Spree::Order.new}
|
6
|
-
|
7
|
-
it 'should validate presence of tc_accepted' do
|
8
|
-
order.valid_terms_and_conditions?.should be_false
|
9
|
-
order.errors[:terms_and_conditions].should == ["must be accepted"]
|
10
|
-
end
|
11
|
-
|
12
|
-
it 'should be valid if terms and conditions are accepted' do
|
13
|
-
order.terms_and_conditions = true
|
14
|
-
order.valid_terms_and_conditions?.should be_true
|
15
|
-
order.errors[:terms_and_conditions].should be_empty
|
16
|
-
end
|
17
|
-
|
18
|
-
end
|