effective_addresses 1.8.1 → 1.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/effective_addresses/address_fields.js.coffee +1 -1
- data/app/views/effective/addresses/_form_with.html.haml +31 -23
- data/app/views/effective/addresses/_formtastic.html.haml +1 -1
- data/app/views/effective/addresses/_simple_form.html.haml +1 -1
- data/config/locales/simple_form.en.yml +1 -1
- data/config/routes.rb +5 -5
- data/lib/effective_addresses/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: 1f292affdc8035035a61ee0b6d1e3b15ca0c7adb
|
4
|
+
data.tar.gz: 09170969f01905b828ac95200cfe51a6ac024101
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edb89284ca5afc1d3600660b332387946861c6e7b5a718f147d991724d0da8cf3696f5c64ce7b423c97f5e00d0f37e22e4cf45e4ee4b474367d3b6390b7ae5e4
|
7
|
+
data.tar.gz: bd728ca42a5d26acfb0c6808eab6f5567b81c3999fdfb0d93e14305711de44c74840d42a8271e5533a912c3bd7d26893e4dae6df3a227a9fd8046f0d9e332d28
|
@@ -18,7 +18,7 @@ loadSubregions = ($countrySelect, clearPostalCode = false) ->
|
|
18
18
|
|
19
19
|
if countryCode.length == 0
|
20
20
|
$stateSelect.prop('disabled', true).addClass('disabled').parent('.form-group').addClass('disabled').find('label').addClass('disabled')
|
21
|
-
reinitialize($stateSelect, 'Please choose
|
21
|
+
reinitialize($stateSelect, 'Please choose country first')
|
22
22
|
else
|
23
23
|
$stateSelect.removeAttr('disabled').parent('.form-group').removeClass('disabled').find('.disabled').removeClass('disabled')
|
24
24
|
reinitialize($stateSelect, 'Loading...')
|
@@ -32,31 +32,39 @@
|
|
32
32
|
input_html: { 'data-effective-address-city' => uuid },
|
33
33
|
wrapper: wrapper_options
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
35
|
+
.row
|
36
|
+
.col-md-4
|
37
|
+
= fa.select :country_code, region_options_for_simple_form_select(),
|
38
|
+
label: 'Country',
|
39
|
+
required: required,
|
40
|
+
disabled: same_as_billing,
|
41
|
+
input_html: { 'data-effective-address-country' => uuid },
|
42
|
+
wrapper: wrapper_options
|
40
43
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
44
|
+
.col-md-5
|
45
|
+
- if fa.object.try(:country_code).present?
|
46
|
+
= fa.select :state_code, region_options_for_simple_form_select(Carmen::Country.coded(fa.object.country_code).subregions),
|
47
|
+
label: 'State / Province',
|
48
|
+
required: required,
|
49
|
+
disabled: same_as_billing,
|
50
|
+
input_html: { 'data-effective-address-state' => uuid },
|
51
|
+
wrapper: wrapper_options
|
52
|
+
- else
|
53
|
+
= fa.select :state_code, [],
|
54
|
+
label: 'State / Province',
|
55
|
+
required: required,
|
56
|
+
disabled: true,
|
57
|
+
input_html: { 'data-effective-address-state' => uuid },
|
58
|
+
input_js: { placeholder: 'Please choose country first' },
|
59
|
+
wrapper: wrapper_options
|
54
60
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
61
|
+
.col-md-3
|
62
|
+
= fa.text_field :postal_code,
|
63
|
+
label: 'Postal Code',
|
64
|
+
required: required,
|
65
|
+
disabled: same_as_billing,
|
66
|
+
input_html: { 'data-effective-address-postal-code' => uuid },
|
67
|
+
wrapper: wrapper_options
|
60
68
|
|
61
69
|
- if fa.object.category == 'shipping' && f.object.respond_to?(:shipping_address_same_as_billing?)
|
62
70
|
= fa.check_box :shipping_address_same_as_billing,
|
@@ -46,7 +46,7 @@
|
|
46
46
|
:collection => [],
|
47
47
|
:prompt => 'please select a country',
|
48
48
|
:input_html => {:disabled => 'disabled', 'data-effective-address-state' => uuid},
|
49
|
-
:input_js => { :placeholder => 'Please choose
|
49
|
+
:input_js => { :placeholder => 'Please choose country first' }
|
50
50
|
|
51
51
|
- when :postal_code
|
52
52
|
= fa.input :postal_code, :label => 'Postal / Zip code', :placeholder => 'Postal / Zip code'
|
@@ -64,7 +64,7 @@
|
|
64
64
|
collection: [],
|
65
65
|
prompt: 'Please choose a country first',
|
66
66
|
input_html: { 'data-effective-address-state' => uuid },
|
67
|
-
input_js: { placeholder: 'Please choose
|
67
|
+
input_js: { placeholder: 'Please choose country first' },
|
68
68
|
disabled: true,
|
69
69
|
wrapper_html: { style: ('display: none;' if shipping_address_same_as_billing) }
|
70
70
|
|
data/config/routes.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
Rails.application.routes.draw do
|
2
|
-
mount EffectiveAddresses::Engine => '/', :as => 'effective_addresses'
|
3
|
-
end
|
4
|
-
|
5
1
|
EffectiveAddresses::Engine.routes.draw do
|
6
|
-
scope module
|
2
|
+
scope :module => 'effective' do
|
7
3
|
match 'addresses/subregions/:country_code', to: 'addresses#subregions', as: 'address_subregions', via: :get
|
8
4
|
end
|
9
5
|
end
|
6
|
+
|
7
|
+
Rails.application.routes.draw do
|
8
|
+
mount EffectiveAddresses::Engine => '/', :as => 'effective_addresses'
|
9
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_addresses
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|