spree_backend 3.1.3 → 3.1.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8295ae5ec9ae0ddb43d6fb2a00fd2728d2bada0a
|
4
|
+
data.tar.gz: 93a99d51c0ecdfd0bc93363b02360e1386057f10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4d10444fb2891b7e46e4c38f437bb39cf03f64ffb6bc9a8aac256f30470e07a8e87711671cd64eb3b93960a55ee3f41b997e6839c41be6403ea13e441695227
|
7
|
+
data.tar.gz: 6ae66b4e2e07953cd0ee68db276052b5d31ddc683474004a6daee9b5f4c913fe4383a9fef8a4b0e569f38f1bc3b6c1efb23614b772ac66b87bbb26d141b468bd
|
@@ -23,14 +23,16 @@
|
|
23
23
|
<div class="col-md-4">
|
24
24
|
<div class="form-group">
|
25
25
|
<strong><%= label_tag nil, Spree.t(:guest_checkout) %></strong>
|
26
|
+
<% guest = @order.user.nil? %>
|
27
|
+
|
26
28
|
<% if @order.completed? %>
|
27
29
|
<div>
|
28
30
|
<span class="badge">
|
29
|
-
<%=
|
31
|
+
<%= guest ? Spree.t(:say_yes) : Spree.t(:say_no) %>
|
32
|
+
<%= hidden_field_tag :guest_checkout, guest %>
|
30
33
|
</span>
|
31
34
|
</div>
|
32
35
|
<% else %>
|
33
|
-
<% guest = @order.user.nil? %>
|
34
36
|
<div class="radio no-margint">
|
35
37
|
<%= label_tag :guest_checkout_true do %>
|
36
38
|
<%= radio_button_tag :guest_checkout, true, guest %>
|
@@ -111,28 +111,28 @@
|
|
111
111
|
<div class="col-md-6">
|
112
112
|
<div id="shipping_specs_weight_field" data-hook="admin_product_form_weight" class="form-group">
|
113
113
|
<%= f.label :weight, Spree.t(:weight) %>
|
114
|
-
<%= f.text_field :weight, size: 4, class: 'form-control' %>
|
114
|
+
<%= f.text_field :weight, value: number_with_precision(@product.weight, precision: 2), size: 4, class: 'form-control' %>
|
115
115
|
</div>
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div class="col-md-6">
|
119
119
|
<div id="shipping_specs_height_field" data-hook="admin_product_form_height" class="form-group">
|
120
120
|
<%= f.label :height, Spree.t(:height) %>
|
121
|
-
<%= f.text_field :height, size: 4, class: 'form-control' %>
|
121
|
+
<%= f.text_field :height, value: number_with_precision(@product.height, precision: 2), size: 4, class: 'form-control' %>
|
122
122
|
</div>
|
123
123
|
</div>
|
124
124
|
|
125
125
|
<div class="col-md-6">
|
126
126
|
<div id="shipping_specs_width_field" data-hook="admin_product_form_width" class="form-group">
|
127
127
|
<%= f.label :width, Spree.t(:width) %>
|
128
|
-
<%= f.text_field :width, size: 4, class: 'form-control' %>
|
128
|
+
<%= f.text_field :width, value: number_with_precision(@product.width, precision: 2), size: 4, class: 'form-control' %>
|
129
129
|
</div>
|
130
130
|
</div>
|
131
131
|
|
132
132
|
<div class="col-md-6">
|
133
133
|
<div id="shipping_specs_depth_field" data-hook="admin_product_form_depth" class="form-group">
|
134
134
|
<%= f.label :depth, Spree.t(:depth) %>
|
135
|
-
<%= f.text_field :depth, size: 4, class: 'form-control' %>
|
135
|
+
<%= f.text_field :depth, value: number_with_precision(@product.depth, precision: 2), size: 4, class: 'form-control' %>
|
136
136
|
</div>
|
137
137
|
</div>
|
138
138
|
</div>
|
@@ -334,6 +334,55 @@ describe "Products", type: :feature do
|
|
334
334
|
expect(first('input[type=text]').value).to eq('baseball_cap_color')
|
335
335
|
end
|
336
336
|
end
|
337
|
+
|
338
|
+
context "using a locale with a different decimal format" do
|
339
|
+
before do
|
340
|
+
# change English locale’s separator and delimiter to match 19,99 format
|
341
|
+
I18n.backend.store_translations(
|
342
|
+
:en,
|
343
|
+
number: {
|
344
|
+
currency: {
|
345
|
+
format: {
|
346
|
+
separator: ",",
|
347
|
+
delimiter: "."
|
348
|
+
}
|
349
|
+
},
|
350
|
+
format: {
|
351
|
+
separator: ",",
|
352
|
+
delimiter: "."
|
353
|
+
}
|
354
|
+
}
|
355
|
+
)
|
356
|
+
end
|
357
|
+
|
358
|
+
after do
|
359
|
+
# revert changes to English locale
|
360
|
+
I18n.backend.store_translations(
|
361
|
+
:en,
|
362
|
+
number: {
|
363
|
+
currency: {
|
364
|
+
format: {
|
365
|
+
separator: ".",
|
366
|
+
delimiter: ","
|
367
|
+
}
|
368
|
+
},
|
369
|
+
format: {
|
370
|
+
separator: ".",
|
371
|
+
delimiter: ","
|
372
|
+
}
|
373
|
+
}
|
374
|
+
)
|
375
|
+
end
|
376
|
+
|
377
|
+
it 'should parse correctly decimal values like weight' do
|
378
|
+
visit spree.admin_product_path(product)
|
379
|
+
fill_in 'product_weight', with: '1'
|
380
|
+
click_button 'Update'
|
381
|
+
weight_prev = find('#product_weight').value
|
382
|
+
click_button 'Update'
|
383
|
+
expect(find('#product_weight').value).to eq(weight_prev)
|
384
|
+
end
|
385
|
+
end
|
337
386
|
end
|
338
387
|
|
339
388
|
context 'deleting a product', :js => true do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_api
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.1.
|
19
|
+
version: 3.1.4
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.1.
|
26
|
+
version: 3.1.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: spree_core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.1.
|
33
|
+
version: 3.1.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.1.
|
40
|
+
version: 3.1.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bootstrap-sass
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -649,7 +649,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
649
649
|
requirements:
|
650
650
|
- none
|
651
651
|
rubyforge_project: spree_backend
|
652
|
-
rubygems_version: 2.
|
652
|
+
rubygems_version: 2.6.10
|
653
653
|
signing_key:
|
654
654
|
specification_version: 4
|
655
655
|
summary: backend e-commerce functionality for the Spree project.
|