spree_backend 4.2.0.rc5 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 661c4ea54cb3f641be07d818710678496c47b7c52740291b6ed53083e28fb830
4
- data.tar.gz: e4eb12865f64f1dd5de03dd5a70548556f588a0646c81776757b6b8d50b0aec8
3
+ metadata.gz: 0a77e87c4b85d35709151d5f3e17ed234d4575c3d7cf8d9ba25406271471cee9
4
+ data.tar.gz: 03b7a255af3e75e9b0376dd92f844db6ec9cc7acd714b0c586f87ad31fa5fe5e
5
5
  SHA512:
6
- metadata.gz: a0438029b7fc2caa555ede1118025e7e5a47187052702089f2dc908eb4661c06171a3f421462a2764d93c27f5fc149a5d65882261609d3b2634dd4d058c8b5cc
7
- data.tar.gz: f5c360a0f0a24849ab80171eddb29b2631ac5cb86fa51299c27710ac14b77a9a0b6078d3f4b40cebab4c167403f58f5303e228f6f3151c88049c615969b6d2ea
6
+ metadata.gz: ac1ea6505ba5b55b63ffe801062503660190ee11bac23dab2084b67d4e79f424f19a6fba6ab804d0d1c357e1bb62726377afaee1f9d9a47289ee7ff9823d8db9
7
+ data.tar.gz: a50b60c3e76c03b17297f33a96b6599f98c9a6746011bc0aec0d056f917d68499b51c70a1e4eba4e194c6e5f99be4772c479e9cb1a77d041316646825cd953a1
@@ -11,7 +11,7 @@
11
11
  //= require jquery.jstree/jquery.jstree
12
12
  //= require jquery_ujs
13
13
  //= require jquery-ui/widgets/autocomplete
14
- //= require select2
14
+ //= require select2-full
15
15
  //= require underscore-min.js
16
16
 
17
17
  //= require spree
@@ -120,7 +120,7 @@ jQuery(function ($) {
120
120
  $('.js-filterable').each(function () {
121
121
  var $this = $(this)
122
122
 
123
- if ($this.val() !== null && $this.val() !== '' && $this.val().length !== 0) {
123
+ if ($this.val() !== null && $this.val() !== '' && $this.val().length !== 0 && !$this.hasClass('flatpickr-alt-input')) {
124
124
  var ransackValue, filter
125
125
  var ransackFieldId = $this.attr('id')
126
126
  var label = $('label[for="' + ransackFieldId + '"]')
@@ -223,29 +223,26 @@ $.fn.radioControlsVisibilityOfElement = function (dependentElementSelector) {
223
223
  }
224
224
 
225
225
  document.addEventListener('DOMContentLoaded', function() {
226
- var dateFrom = flatpickr('.datePickerFrom', {
227
- locale: Spree.translations.flatpickr_locale,
226
+ flatpickr.setDefaults({
227
+ altInput: true,
228
228
  time_24hr: true,
229
- monthSelectorType: 'static',
229
+ altInputClass: 'flatpickr-alt-input',
230
+ locale: Spree.translations.flatpickr_locale
231
+ })
232
+
233
+ var dateFrom = flatpickr('.datePickerFrom', {
230
234
  onChange: function(selectedDates) {
231
235
  dateTo.set('minDate', selectedDates[0])
232
236
  }
233
237
  })
234
238
 
235
239
  var dateTo = flatpickr('.datePickerTo', {
236
- locale: Spree.translations.flatpickr_locale,
237
- monthSelectorType: 'static',
238
- time_24hr: true,
239
240
  onChange: function(selectedDates) {
240
241
  dateFrom.set('maxDate', selectedDates[0])
241
242
  }
242
243
  })
243
244
 
244
- flatpickr('.datepicker', {
245
- locale: Spree.translations.flatpickr_locale,
246
- monthSelectorType: 'static',
247
- time_24hr: true
248
- })
245
+ flatpickr('.datepicker', { })
249
246
  })
250
247
 
251
248
  $(document).ready(function() {
@@ -0,0 +1,19 @@
1
+ // Mixin to prefix several properties at once
2
+
3
+ // EXAMPLE
4
+ // @include prefix((
5
+ // appearance: none,
6
+ // touch-callout: none,
7
+ // user-select: none
8
+ // ), webkit moz ms khtml);
9
+
10
+ @mixin prefix($declarations, $prefixes: ()) {
11
+ @each $property, $value in $declarations {
12
+ @each $prefix in $prefixes {
13
+ #{'-' + $prefix + '-' + $property}: $value;
14
+ }
15
+
16
+ // Output standard non-prefixed declaration
17
+ #{$property}: $value;
18
+ }
19
+ }
@@ -1,95 +1,113 @@
1
- // Adaptive icon from calendar to close.
2
- @mixin swith-appended-icon {
3
- &:placeholder-shown:not(:focus) + * {
4
- @content;
1
+ .flatpickr-calendar {
2
+ // Custom Flatpickr styling for Spree + BS4.
3
+ .flatpickr-current-month {
4
+ span.cur-month:hover {
5
+ background: transparent;
6
+ }
7
+ .numInputWrapper {
8
+ margin-left: 3px;
9
+ border-radius: $border-radius;
10
+ overflow: hidden;
11
+ }
12
+
13
+ .flatpickr-monthDropdown-months {
14
+ @include prefix((
15
+ appearance: none
16
+ ), webkit moz ms khtml);
17
+
18
+ padding: 0.2em;
19
+ border-radius: $border-radius;
20
+ }
5
21
  }
6
- }
7
22
 
8
- input.flatpickr-input {
9
- -webkit-appearance: none;
10
- -moz-appearance: none;
11
- appearance: none;
12
- background-color: white !important;
13
- }
23
+ .numInputWrapper span.arrowUp {
24
+ border-color: transparent;
25
+ border-radius: 0;
26
+ }
14
27
 
15
- .flatpickr-current-month .numInputWrapper {
16
- margin-left: 3px;
17
- border-radius: $border-radius;
18
- overflow: hidden;
19
- }
20
- .flatpickr-current-month span.cur-month:hover {
21
- background: transparent;
22
- }
23
- .numInputWrapper span.arrowUp {
24
- border-color: transparent;
25
- border-radius: 0;
26
- }
27
- .numInputWrapper span.arrowDown {
28
- border-color: transparent;
29
- border-radius: 0;
30
- }
28
+ .numInputWrapper span.arrowDown {
29
+ border-color: transparent;
30
+ border-radius: 0;
31
+ }
31
32
 
32
- .input-group {
33
- input.flatpickr-input{
34
- @include swith-appended-icon {
35
- opacity: 0;
36
- }
33
+ .flatpickr-day {
34
+ margin: 2px 0;
35
+ border-radius: $border-radius ;
37
36
  }
38
- }
39
37
 
40
- .append_under {
41
- position: absolute;
42
- right: 0;
43
- top: 0;
44
- z-index: 0;
45
- height: 100%;
46
- }
38
+ .flatpickr-months .flatpickr-prev-month:hover svg,
39
+ .flatpickr-months .flatpickr-next-month:hover svg {
40
+ fill: $primary;
41
+ }
47
42
 
48
- .flatpickr-day {
49
- margin: 2px 0;
50
- border-radius: $border-radius ;
51
- }
43
+ .flatpickr-time {
44
+ border-radius: 0 0 5px 5px;
45
+ &:after {
46
+ display: none;
47
+ }
48
+ .numInputWrapper {
49
+ span {
50
+ border-color: transparent;
51
+ border-radius: 0;
52
+ }
53
+ }
54
+ }
52
55
 
53
- // Fix Flatpickr bug where things jusy highlight for no reason.
54
- input.flatpickr-input[readonly] {
55
- -webkit-touch-callout: none; /* iOS Safari */
56
- -webkit-user-select: none; /* Safari */
57
- -khtml-user-select: none; /* Konqueror HTML */
58
- -moz-user-select: none; /* Old versions of Firefox */
59
- -ms-user-select: none; /* Internet Explorer/Edge */
60
- user-select: none; /* Non-prefixed version, currently
61
- supported by Chrome, Edge, Opera and Firefox */
56
+ // Required to stop an opened cal showing above the nav bar.
57
+ &.open {
58
+ z-index: $zindex-dropdown;
59
+ }
62
60
  }
63
61
 
64
- .flatpickr-months .flatpickr-prev-month:hover svg,
65
- .flatpickr-months .flatpickr-next-month:hover svg {
66
- fill: $primary;
62
+ // Mixin for calendar toggle icon show/hide.
63
+ @mixin swith-appended-icon {
64
+ &:placeholder-shown:not(:focus) + * {
65
+ @content;
66
+ }
67
67
  }
68
68
 
69
- // Force rounded corner for the toggle cal and close icons.
70
- .input-group >
71
- .input-group-append:not(:last-child) >
72
- .force-round {
73
- z-index: 5;
74
- border-top-right-radius: $border-radius !important;
75
- border-bottom-right-radius: $border-radius !important;
76
- }
69
+ .input-group.datePickerFrom,
70
+ .input-group.datePickerTo,
71
+ .input-group.datepicker {
72
+ input.flatpickr-alt-input[readonly] {
73
+ // Flatpickr alternate input is read-only,
74
+ // style it as an active input field.
75
+ background-color: white !important;
77
76
 
78
- div.flatpickr-calendar.open {
79
- z-index: $zindex-dropdown;
80
- }
77
+ // Fix a bug where occasionally the whole screen will highlight
78
+ // if you clicked the Flatpcikr input box while moving the cursor.
79
+ @include prefix((
80
+ appearance: none,
81
+ touch-callout: none,
82
+ user-select: none
83
+ ), webkit moz ms khtml);
81
84
 
82
- .flatpickr-time {
83
- border-radius: 0 0 5px 5px;
84
- &:after {
85
- display: none;
85
+ @include swith-appended-icon {
86
+ opacity: 0;
87
+ }
86
88
  }
87
- .numInputWrapper {
88
- span {
89
- border-color: transparent;
90
- border-radius: 0;
91
89
 
92
- }
90
+ // Required for calendar toggle icon show/hide.
91
+ .append_under {
92
+ position: absolute;
93
+ right: 0;
94
+ top: 0;
95
+ z-index: 0;
96
+ height: 100%;
97
+ }
98
+
99
+ // Styling for calendar toggle icon toggle
100
+ .input-group-append:not(:last-child) >
101
+ .force-round {
102
+ z-index: 5;
103
+ border-top-right-radius: $border-radius !important;
104
+ border-bottom-right-radius: $border-radius !important;
105
+ }
93
106
 
107
+ // Styling for calendar toggle icon toggle
108
+ .form-control:not(:first-child),
109
+ .input-group >.flatpickr-alt-input:not(:first-child) {
110
+ border-top-left-radius: $border-radius !important;
111
+ border-bottom-left-radius: $border-radius !important;
94
112
  }
95
113
  }
@@ -1,4 +1,5 @@
1
1
  @import 'global/variables';
2
+ @import 'global/mixins';
2
3
 
3
4
  @import 'bootstrap';
4
5
  @import 'glyphicons';
@@ -3,6 +3,7 @@ module Spree
3
3
  class BaseController < Spree::BaseController
4
4
  helper 'spree/admin/navigation'
5
5
  helper 'spree/locale'
6
+ helper 'spree/currency'
6
7
  layout 'spree/layouts/admin'
7
8
 
8
9
  before_action :authorize_admin
@@ -5,6 +5,7 @@ module Spree
5
5
  before_action :set_default_currency, only: :new
6
6
  before_action :set_default_locale, only: :new
7
7
  before_action :normalize_supported_currencies, only: [:create, :update]
8
+ before_action :normalize_supported_locales, only: [:create, :update]
8
9
  before_action :set_default_country_id, only: :new
9
10
  before_action :load_all_countries, only: [:new, :edit, :update, :create]
10
11
  before_action :load_all_zones, only: %i[new edit]
@@ -127,6 +128,12 @@ module Spree
127
128
  end
128
129
  end
129
130
 
131
+ def normalize_supported_locales
132
+ if params[:store][:supported_locales]&.is_a?(Array)
133
+ params[:store][:supported_locales] = params[:store][:supported_locales].compact.uniq.reject(&:blank?).join(',')
134
+ end
135
+ end
136
+
130
137
  def set_default_country_id
131
138
  @store.default_country_id = Spree::Config[:default_country_id]
132
139
  end
@@ -58,7 +58,7 @@ module Spree
58
58
 
59
59
  def datepicker_field_value(date)
60
60
  unless date.blank?
61
- l(date, format: Spree.t('date_picker.format', default: '%Y/%m/%d'))
61
+ l(date, format: '%Y/%m/%d')
62
62
  end
63
63
  end
64
64
 
@@ -23,7 +23,7 @@
23
23
  <div class="col-12 col-md-6 mb-3 mb-md-0">
24
24
  <div class="input-group datePickerFrom"
25
25
  data-wrap="true"
26
- data-date-format="<%= Spree.t(:js_format, scope: 'date_picker', default: 'Y/m/d') %>"
26
+ data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>"
27
27
  data-max-date="<%= params[:q][:created_at_lt] %>">
28
28
  <%= f.text_field :created_at_gt,
29
29
  class: 'form-control js-filterable shadow-none',
@@ -37,7 +37,7 @@
37
37
  <div class="col-12 col-md-6 mt-3 mt-md-0">
38
38
  <div class="input-group datePickerTo"
39
39
  data-wrap="true"
40
- data-date-format="<%= Spree.t(:js_format, scope: 'date_picker', default: 'Y/m/d') %>"
40
+ data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>"
41
41
  data-min-date="<%= params[:q][:created_at_gt] %>">
42
42
 
43
43
  <%= f.text_field :created_at_lt,
@@ -6,11 +6,10 @@
6
6
  </div>
7
7
  <div class="form-group previous_cards card-body mb-0" data-hook="previous_cards">
8
8
  <ul class="m-0 p-0">
9
-
10
9
  <% previous_cards.each do |card| %>
11
10
  <li>
12
11
  <label>
13
- <%= radio_button_tag :card, card.id, card == previous_cards.first %> <%= card.brand.upcase + ' - ' + card.display_number %>
12
+ <%= radio_button_tag :card, card.id, card == previous_cards.first %> <%= card.display_brand + ' - ' + card.display_number %>
14
13
  </label>
15
14
  </li>
16
15
  <% end %>
@@ -8,7 +8,7 @@
8
8
  </tr>
9
9
  <tr>
10
10
  <th><%= Spree.t(:card_type) %>:</th>
11
- <td><%= payment.source.cc_type %></td>
11
+ <td><%= payment.source.display_brand %></td>
12
12
  </tr>
13
13
  <tr>
14
14
  <th><%= Spree.t(:card_number) %>:</th>
@@ -66,7 +66,7 @@
66
66
 
67
67
  <div class="input-group datePickerFrom"
68
68
  data-wrap="true"
69
- data-date-format="<%= Spree.t(:js_format, scope: 'date_picker', default: 'Y/m/d') %>"
69
+ data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>"
70
70
  data-max-date="<%= @product.discontinue_on %>">
71
71
 
72
72
  <%= f.text_field :available_on,
@@ -87,7 +87,7 @@
87
87
 
88
88
  <div class="input-group datePickerTo"
89
89
  data-wrap="true"
90
- data-date-format="<%= Spree.t(:js_format, scope: 'date_picker', default: 'Y/m/d') %>"
90
+ data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>"
91
91
  data-min-date="<%= @product.available_on %>">
92
92
 
93
93
  <%= f.text_field :discontinue_on,
@@ -46,7 +46,7 @@
46
46
 
47
47
  <div class="input-group datepicker"
48
48
  data-wrap="true"
49
- data-date-format="<%= Spree.t(:js_format, scope: 'date_picker', default: 'Y/m/d') %>">
49
+ data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>">
50
50
  <%= f.text_field :available_on,
51
51
  value: datepicker_field_value(@product.available_on),
52
52
  placeholder: Spree.t(:select_a_date),
@@ -1,7 +1,7 @@
1
1
  <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @promotion } %>
2
2
 
3
3
  <div class="row" id="general_fields">
4
- <div class="col-12 col-md-3">
4
+ <div class="col-12 col-lg-4">
5
5
  <%= f.field_container :name, class: ['form-group'] do %>
6
6
  <%= f.label :name %>
7
7
  <%= f.text_field :name, class: 'form-control' %>
@@ -35,7 +35,7 @@
35
35
  <% end %>
36
36
  </div>
37
37
 
38
- <div class="col-12 col-md-6">
38
+ <div class="col-12 col-lg-4">
39
39
  <%= f.field_container :description, class: ['form-group'] do %>
40
40
  <%= f.label :description %>
41
41
  <%= f.text_area :description, rows: 7, class: 'form-control' %>
@@ -47,7 +47,7 @@
47
47
  <% end %>
48
48
  </div>
49
49
 
50
- <div id="expiry_fields" class="col-12 col-md-3">
50
+ <div id="expiry_fields" class="col-12 col-lg-4">
51
51
  <div class="form-group">
52
52
  <%= f.field_container :usage_limit do %>
53
53
  <%= f.label :usage_limit, Spree.t('limit_usage_to') %>
@@ -57,13 +57,12 @@
57
57
  <%= Spree.t(:current_promotion_usage, count: @promotion.credits_count) %>
58
58
  </small>
59
59
  </div>
60
-
61
60
  <div id="starts_at_field" class="form-group">
62
61
  <%= f.label :starts_at %>
63
62
  <div class="input-group datePickerFrom"
64
63
  data-wrap="true"
65
64
  data-enable-time="true"
66
- data-date-format="<%= Spree.t(:js_date_time, scope: 'date_picker', default: 'Y/m/d - H:i') %>"
65
+ data-alt-format="<%= Spree.t(:fpr_human_friendly_date_time_format, scope: 'date_picker', default: 'M j, Y H:i') %>"
67
66
  data-max-date="<%= @promotion.expires_at %>">
68
67
  <%= f.datetime_field :starts_at,
69
68
  class: 'form-control shadow-none',
@@ -79,7 +78,7 @@
79
78
  <div class="input-group datePickerTo"
80
79
  data-wrap="true"
81
80
  data-enable-time='true'
82
- data-date-format="<%= Spree.t(:js_date_time, scope: 'date_picker', default: 'Y/m/d - H:i') %>"
81
+ data-alt-format="<%= Spree.t(:fpr_human_friendly_date_time_format, scope: 'date_picker', default: 'M j, Y H:i') %>"
83
82
  data-min-date="<%= @promotion.starts_at %>">
84
83
  <%= f.datetime_field :expires_at,
85
84
  placeholder:Spree.t('ends_at'),
@@ -5,7 +5,7 @@
5
5
  <div class="col-12 col-md-6 mb-3 mb-md-0">
6
6
  <div class="input-group datePickerFrom"
7
7
  data-wrap="true"
8
- data-date-format="<%= Spree.t(:js_format, scope: 'date_picker', default: 'Y/m/d') %>"
8
+ data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>"
9
9
  data-max-date="<%= params[:q][:completed_at_lt] %>">
10
10
  <%= s.text_field :completed_at_gt,
11
11
  class: 'form-control shadow-none',
@@ -20,7 +20,7 @@
20
20
  <div class="col-12 col-md-6 mt-3 mt-md-0">
21
21
  <div class="input-group datePickerTo"
22
22
  data-wrap="true"
23
- data-date-format="<%= Spree.t(:js_format, scope: 'date_picker', default: 'Y/m/d') %>"
23
+ data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>"
24
24
  data-min-date="<%= params[:q][:completed_at_gt] %>">
25
25
 
26
26
  <%= s.text_field :completed_at_lt,
@@ -24,8 +24,6 @@
24
24
  no_results: Spree.t(:no_results),
25
25
  option_type_placeholder: Spree.t(:option_type_placeholder),
26
26
  paste: Spree.t(:paste),
27
- date_format: Spree.t(:js_format, scope: 'date_picker', default: 'Y/m/d'),
28
- date_time_format: Spree.t(:js_date_time, scope: 'date_picker', default: 'Y/m/d - H:i'),
29
27
  previous: Spree.t(:previous),
30
28
  remove: Spree.t(:remove),
31
29
  rename: Spree.t(:rename),
@@ -45,6 +43,7 @@
45
43
  # Substitute - for _ converting zh-tw to zh_tw
46
44
  # Flatpickr not making things easy here.
47
45
  flatpickr_locale: "#{flatpickr_local_fallback.sub("-", "_")}"
46
+
48
47
  }.to_json
49
48
  %>
50
49
  </script>
@@ -132,7 +132,7 @@
132
132
  </div>
133
133
  <div class="card-body">
134
134
  <%= f.field_container :default_currency, class: ['form-group'] do %>
135
- <%= f.label :default_currency, Spree.t(:currency) %>
135
+ <%= f.label :default_currency %>
136
136
  <%= f.select :default_currency, currency_options(@store.default_currency), {}, { class: 'select2' } %>
137
137
  <%= f.error_message_on :default_currency %>
138
138
  <% end %>
@@ -150,15 +150,20 @@
150
150
  <%= f.error_message_on :checkout_zone_id %>
151
151
  <% end %>
152
152
  <%= f.field_container :default_locale, class: ['form-group'] do %>
153
- <%= f.label :default_locale, Spree.t('i18n.language') %>
153
+ <%= f.label :default_locale %>
154
154
  <%= f.select :default_locale, options_from_collection_for_select(all_locales_options, :last, :first, @store.default_locale || I18n.locale), {}, { class: 'select2' } %>
155
155
  <%= f.error_message_on :default_locale %>
156
156
  <% unless defined?(SpreeI18n) %>
157
157
  <small class="form-text text-muted">
158
- <%= raw(Spree.t('store_form.languages_help')) %>
158
+ <%= raw(Spree.t('store_form.locales_help')) %>
159
159
  </small>
160
160
  <% end %>
161
161
  <% end %>
162
+ <%= f.field_container :supported_locales, class: ['form-group'] do %>
163
+ <%= f.label :supported_locales, Spree.t(:supported_locales) %>
164
+ <%= f.select :supported_locales, options_from_collection_for_select(all_locales_options, :last, :first, @store.supported_locales&.split(',')), {}, { multiple: true, class: 'select2' } %>
165
+ <%= f.error_message_on :supported_locales %>
166
+ <% end %>
162
167
  <%= f.field_container :default_country_id, class: ['form-group'] do %>
163
168
  <%= f.label :default_country_id, Spree.t('i18n.default_country') %>
164
169
  <%= f.select :default_country_id, options_from_collection_for_select(@countries, :id, :name, @store.default_country_id || Spree::Config[:default_country_id]), {}, { class: 'select2' } %>
@@ -12,7 +12,8 @@
12
12
  <thead>
13
13
  <th><%= Spree.t(:name) %></th>
14
14
  <th><%= Spree.t(:url) %></th>
15
- <th><%= Spree.t(:currency) %></th>
15
+ <th><%= Spree.t(:supported_currencies) %></th>
16
+ <th><%= Spree.t(:supported_locales) %></th>
16
17
  <th><%= Spree.t(:default) %>?</th>
17
18
  <th data-hook="admin_stores_index_header_actions" class="actions"></th>
18
19
  <thead>
@@ -21,7 +22,8 @@
21
22
  <tr>
22
23
  <td><%= store.unique_name %></td>
23
24
  <td><%= link_to store.url, store.formatted_url, target: :blank %></td>
24
- <td><%= store.default_currency %></td>
25
+ <td><%= store.supported_currencies_list.map(&:iso_code).join(', ') %></td>
26
+ <td><%= store.supported_locales_list.map {|l| locale_presentation(l).first }.join(', ') %></td>
25
27
  <td><%= active_badge(store.default) %></td>
26
28
  <td class="actions actions-2 text-right" data-hook="admin_stores_index_row_actions">
27
29
  <%= link_to_edit_url spree.edit_admin_store_path(store), no_text: true if can?(:edit, store) %>
@@ -44,7 +44,7 @@
44
44
  <%= f.error_message_on :discontinue_on %>
45
45
  <div class="input-group datepicker"
46
46
  data-wrap="true"
47
- data-date-format="<%= Spree.t(:js_format, scope: 'date_picker', default: 'Y/m/d') %>">
47
+ data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>">
48
48
  <%= f.text_field :discontinue_on,
49
49
  value: datepicker_field_value(@variant.discontinue_on),
50
50
  placeholder: Spree.t(:select_a_date),
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0.rc5
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-02-04 00:00:00.000000000 Z
12
+ date: 2021-02-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spree_api
@@ -17,28 +17,28 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 4.2.0.rc5
20
+ version: 4.2.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '='
26
26
  - !ruby/object:Gem::Version
27
- version: 4.2.0.rc5
27
+ version: 4.2.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: spree_core
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - '='
33
33
  - !ruby/object:Gem::Version
34
- version: 4.2.0.rc5
34
+ version: 4.2.0
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - '='
40
40
  - !ruby/object:Gem::Version
41
- version: 4.2.0.rc5
41
+ version: 4.2.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: bootstrap
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -270,6 +270,7 @@ files:
270
270
  - app/assets/stylesheets/spree/backend/components/_spinner.scss
271
271
  - app/assets/stylesheets/spree/backend/components/_tables.scss
272
272
  - app/assets/stylesheets/spree/backend/components/_taxon_products_view.scss
273
+ - app/assets/stylesheets/spree/backend/global/_mixins.scss
273
274
  - app/assets/stylesheets/spree/backend/global/_variables.scss
274
275
  - app/assets/stylesheets/spree/backend/plugins/_flatpickr.scss
275
276
  - app/assets/stylesheets/spree/backend/plugins/_jquery_ui.scss
@@ -337,7 +338,6 @@ files:
337
338
  - app/controllers/spree/admin/zones_controller.rb
338
339
  - app/helpers/spree/admin/adjustments_helper.rb
339
340
  - app/helpers/spree/admin/base_helper.rb
340
- - app/helpers/spree/admin/currency_helper.rb
341
341
  - app/helpers/spree/admin/customer_returns_helper.rb
342
342
  - app/helpers/spree/admin/images_helper.rb
343
343
  - app/helpers/spree/admin/navigation_helper.rb
@@ -652,9 +652,9 @@ licenses:
652
652
  - BSD-3-Clause
653
653
  metadata:
654
654
  bug_tracker_uri: https://github.com/spree/spree/issues
655
- changelog_uri: https://github.com/spree/spree/releases/tag/v4.2.0.rc5
655
+ changelog_uri: https://github.com/spree/spree/releases/tag/v4.2.0
656
656
  documentation_uri: https://guides.spreecommerce.org/
657
- source_code_uri: https://github.com/spree/spree/tree/v4.2.0.rc5
657
+ source_code_uri: https://github.com/spree/spree/tree/v4.2.0
658
658
  post_install_message:
659
659
  rdoc_options: []
660
660
  require_paths:
@@ -666,9 +666,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
666
666
  version: 2.5.0
667
667
  required_rubygems_version: !ruby/object:Gem::Requirement
668
668
  requirements:
669
- - - ">"
669
+ - - ">="
670
670
  - !ruby/object:Gem::Version
671
- version: 1.3.1
671
+ version: '0'
672
672
  requirements:
673
673
  - none
674
674
  rubygems_version: 3.1.4
@@ -1,14 +0,0 @@
1
- module Spree
2
- module Admin
3
- module CurrencyHelper
4
- def currency_options(selected_value = nil)
5
- selected_value ||= Spree::Config[:currency]
6
- currencies = ::Money::Currency.table.map do |_code, details|
7
- iso = details[:iso_code]
8
- [iso, "#{details[:name]} (#{iso})"]
9
- end
10
- options_from_collection_for_select(currencies, :first, :last, selected_value)
11
- end
12
- end
13
- end
14
- end