solidus_backend 2.2.2 → 2.3.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of solidus_backend might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree/backend.js +1 -2
- data/app/assets/javascripts/spree/backend/address_states.js +1 -1
- data/app/assets/javascripts/spree/backend/adjustments.js.coffee +1 -1
- data/app/assets/javascripts/spree/backend/admin.js +37 -41
- data/app/assets/javascripts/spree/backend/components/editable_table.js.coffee +3 -0
- data/app/assets/javascripts/spree/backend/images/index.js.coffee +1 -1
- data/app/assets/javascripts/spree/backend/images/upload.js +13 -189
- data/app/assets/javascripts/spree/backend/models/image_upload.js +76 -0
- data/app/assets/javascripts/spree/backend/models/index.js +2 -0
- data/app/assets/javascripts/spree/backend/models/taxonomy.js +3 -0
- data/app/assets/javascripts/spree/backend/namespaces.js +3 -1
- data/app/assets/javascripts/spree/backend/payments/new.js +8 -36
- data/app/assets/javascripts/spree/backend/promotions.js.coffee +1 -1
- data/app/assets/javascripts/spree/backend/select_payments.js.coffee +0 -12
- data/app/assets/javascripts/spree/backend/shipments.js +1 -1
- data/app/assets/javascripts/spree/backend/spree-select2.js +1 -1
- data/app/assets/javascripts/spree/backend/taxonomy.js.coffee +101 -95
- data/app/assets/javascripts/spree/backend/templates/products/upload_progress.hbs +5 -3
- data/app/assets/javascripts/spree/backend/views/images/upload_progress.js +48 -0
- data/app/assets/javascripts/spree/backend/views/images/upload_zone.js +39 -0
- data/app/assets/javascripts/spree/backend/views/index.js +6 -0
- data/app/assets/javascripts/spree/backend/views/order/address.js +1 -5
- data/app/assets/javascripts/spree/backend/views/payment/edit_credit_card.js +23 -0
- data/app/assets/javascripts/spree/backend/views/payment/new.js +25 -0
- data/app/assets/javascripts/spree/backend/views/state_select.js +4 -4
- data/app/assets/javascripts/spree/backend/views/tables/editable_table.js.coffee +14 -0
- data/app/assets/javascripts/spree/backend/views/tables/editable_table_row.js.coffee +45 -0
- data/app/assets/stylesheets/spree/backend/components/_date-picker.scss +0 -1
- data/app/assets/stylesheets/spree/backend/components/_editable_table.scss +37 -0
- data/app/assets/stylesheets/spree/backend/plugins/_bootstrap_tooltip.scss +2 -2
- data/app/assets/stylesheets/spree/backend/sections/_products.scss +0 -8
- data/app/assets/stylesheets/spree/backend/sections/_style_guide.scss +15 -9
- data/app/assets/stylesheets/spree/backend/shared/_icons.scss +14 -14
- data/app/assets/stylesheets/spree/backend/shared/_tables.scss +1 -2
- data/app/assets/stylesheets/spree/backend/shared/_utilities.scss +13 -0
- data/app/assets/stylesheets/spree/backend/spree_admin.scss +1 -1
- data/app/controllers/spree/admin/cancellations_controller.rb +1 -1
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +1 -1
- data/app/controllers/spree/admin/orders_controller.rb +3 -10
- data/app/controllers/spree/admin/payment_methods_controller.rb +19 -6
- data/app/controllers/spree/admin/payments_controller.rb +2 -2
- data/app/controllers/spree/admin/products_controller.rb +3 -9
- data/app/controllers/spree/admin/promotion_rules_controller.rb +5 -1
- data/app/controllers/spree/admin/promotions_controller.rb +1 -1
- data/app/controllers/spree/admin/properties_controller.rb +1 -1
- data/app/controllers/spree/admin/reports_controller.rb +24 -21
- data/app/controllers/spree/admin/resource_controller.rb +25 -14
- data/app/controllers/spree/admin/style_guide_controller.rb +4 -0
- data/app/controllers/spree/admin/users_controller.rb +1 -1
- data/app/controllers/spree/admin/variants_controller.rb +5 -0
- data/app/helpers/spree/admin/navigation_helper.rb +6 -2
- data/app/helpers/spree/promotion_rules_helper.rb +2 -2
- data/app/models/spree/backend_configuration.rb +1 -0
- data/app/views/spree/admin/adjustments/_form.html.erb +1 -1
- data/app/views/spree/admin/customer_returns/_return_item_selection.html.erb +2 -2
- data/app/views/spree/admin/customer_returns/new.html.erb +1 -1
- data/app/views/spree/admin/images/_form.html.erb +1 -1
- data/app/views/spree/admin/images/_image_row.html.erb +22 -4
- data/app/views/spree/admin/images/create.js.erb +8 -5
- data/app/views/spree/admin/images/index.html.erb +4 -8
- data/app/views/spree/admin/orders/_risk_analysis.html.erb +6 -7
- data/app/views/spree/admin/orders/_shipment.html.erb +1 -1
- data/app/views/spree/admin/orders/confirm/_customer_details.html.erb +1 -1
- data/app/views/spree/admin/orders/confirm/_payments.html.erb +1 -1
- data/app/views/spree/admin/orders/index.html.erb +3 -3
- data/app/views/spree/admin/payment_methods/_form.html.erb +5 -5
- data/app/views/spree/admin/payments/_form.html.erb +2 -2
- data/app/views/spree/admin/payments/_list.html.erb +1 -1
- data/app/views/spree/admin/payments/show.html.erb +1 -1
- data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +2 -7
- data/app/views/spree/admin/prices/_form.html.erb +2 -2
- data/app/views/spree/admin/prices/edit.html.erb +2 -0
- data/app/views/spree/admin/prices/index.html.erb +5 -4
- data/app/views/spree/admin/prices/new.html.erb +4 -0
- data/app/views/spree/admin/product_properties/index.html.erb +1 -1
- data/app/views/spree/admin/products/_form.html.erb +4 -3
- data/app/views/spree/admin/products/index.html.erb +3 -3
- data/app/views/spree/admin/products/new.html.erb +2 -2
- data/app/views/spree/admin/products/new.js.erb +0 -3
- data/app/views/spree/admin/promotion_actions/create.js.erb +2 -6
- data/app/views/spree/admin/promotion_rules/create.js.erb +0 -8
- data/app/views/spree/admin/promotions/_actions.html.erb +2 -2
- data/app/views/spree/admin/promotions/_form.html.erb +1 -1
- data/app/views/spree/admin/promotions/_promotion_action.html.erb +3 -4
- data/app/views/spree/admin/promotions/_promotion_rule.html.erb +3 -3
- data/app/views/spree/admin/promotions/_rules.html.erb +1 -1
- data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +6 -2
- data/app/views/spree/admin/promotions/actions/_promotion_calculators_with_custom_fields.html.erb +1 -1
- data/app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb +54 -0
- data/app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb +33 -14
- data/app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb +33 -14
- data/app/views/spree/admin/promotions/index.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_first_repeat_purchase_since.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_item_total.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_landing_page.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_nth_order.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_product.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_taxon.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_user_role.html.erb +2 -2
- data/app/views/spree/admin/refunds/edit.html.erb +1 -1
- data/app/views/spree/admin/refunds/new.html.erb +1 -1
- data/app/views/spree/admin/reimbursements/edit.html.erb +2 -2
- data/app/views/spree/admin/reports/sales_total.html.erb +1 -1
- data/app/views/spree/admin/return_authorizations/_form.html.erb +4 -4
- data/app/views/spree/admin/shared/_address_form.html.erb +2 -2
- data/app/views/spree/admin/shared/_calculator_fields.html.erb +1 -1
- data/app/views/spree/admin/shared/_product_tabs.html.erb +4 -4
- data/app/views/spree/admin/shared/_report_order_criteria.html.erb +1 -1
- data/app/views/spree/admin/shared/_variant_search.html.erb +1 -1
- data/app/views/spree/admin/shipping_methods/_form.html.erb +1 -1
- data/app/views/spree/admin/states/index.html.erb +1 -1
- data/app/views/spree/admin/stock_items/_stock_management.html.erb +1 -1
- data/app/views/spree/admin/stock_locations/_form.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/edit.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/index.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/new.html.erb +1 -1
- data/app/views/spree/admin/store_credits/_form.html.erb +1 -1
- data/app/views/spree/admin/store_credits/_update_reason_field.html.erb +1 -1
- data/app/views/spree/admin/stores/_form.html.erb +1 -1
- data/app/views/spree/admin/style_guide/topics/forms/_building_forms.html.erb +4 -8
- data/app/views/spree/admin/style_guide/topics/forms/_buttons.html.erb +6 -0
- data/app/views/spree/admin/style_guide/topics/forms/_helper_text.html.erb +13 -0
- data/app/views/spree/admin/style_guide/topics/forms/_inputs.html.erb +96 -0
- data/app/views/spree/admin/style_guide/topics/forms/_labels.html.erb +6 -0
- data/app/views/spree/admin/style_guide/topics/forms/_validation.html.erb +8 -1
- data/app/views/spree/admin/style_guide/topics/layout/_full_width_table_layout.html.erb +10 -0
- data/app/views/spree/admin/style_guide/topics/layout/_helpful_layout.html.erb +0 -0
- data/app/views/spree/admin/style_guide/topics/layout/_sidebar_layout.html.erb +4 -0
- data/app/views/spree/admin/style_guide/topics/messaging/_flashes.html.erb +10 -4
- data/app/views/spree/admin/style_guide/topics/messaging/_tooltips.html.erb +45 -0
- data/app/views/spree/admin/style_guide/topics/tables/_forms_in_tables.html.erb +4 -0
- data/app/views/spree/admin/style_guide/topics/typography/_lists.html.erb +1 -1
- data/app/views/spree/admin/tax_rates/_form.html.erb +17 -3
- data/app/views/spree/admin/tax_rates/index.html.erb +12 -3
- data/app/views/spree/admin/taxonomies/edit.erb +1 -8
- data/app/views/spree/admin/taxons/_form.html.erb +6 -4
- data/app/views/spree/admin/taxons/edit.html.erb +0 -15
- data/app/views/spree/admin/taxons/index.html.erb +1 -1
- data/app/views/spree/admin/variants/_form.html.erb +8 -9
- data/app/views/spree/admin/variants/new.js.erb +0 -1
- data/config/routes.rb +1 -1
- data/spec/controllers/spree/admin/orders/customer_details_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/orders_controller_spec.rb +16 -4
- data/spec/controllers/spree/admin/payment_methods_controller_spec.rb +2 -2
- data/spec/controllers/spree/admin/payments_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/products_controller_spec.rb +33 -0
- data/spec/controllers/spree/admin/variants_controller_spec.rb +39 -13
- data/spec/features/admin/configuration/payment_methods_spec.rb +11 -11
- data/spec/features/admin/configuration/shipping_methods_spec.rb +1 -1
- data/spec/features/admin/configuration/states_spec.rb +4 -4
- data/spec/features/admin/configuration/store_spec.rb +3 -3
- data/spec/features/admin/configuration/tax_rates_spec.rb +1 -1
- data/spec/features/admin/orders/adjustments_spec.rb +1 -1
- data/spec/features/admin/orders/customer_details_spec.rb +10 -11
- data/spec/features/admin/orders/listing_spec.rb +1 -1
- data/spec/features/admin/orders/new_order_spec.rb +4 -11
- data/spec/features/admin/orders/order_details_spec.rb +20 -30
- data/spec/features/admin/orders/return_payment_state_spec.rb +60 -0
- data/spec/features/admin/orders/shipments_spec.rb +7 -0
- data/spec/features/admin/products/edit/images_spec.rb +48 -9
- data/spec/features/admin/products/edit/variants_spec.rb +1 -1
- data/spec/features/admin/products/option_types_spec.rb +2 -2
- data/spec/features/admin/products/products_spec.rb +49 -3
- data/spec/features/admin/products/stock_management_spec.rb +1 -3
- data/spec/features/admin/products/variant_spec.rb +20 -0
- data/spec/features/admin/promotion_adjustments_spec.rb +35 -34
- data/spec/features/admin/promotions/option_value_rule_spec.rb +2 -2
- data/spec/features/admin/promotions/product_rule_spec.rb +1 -1
- data/spec/features/admin/promotions/tiered_calculator_spec.rb +2 -2
- data/spec/features/admin/promotions/user_rule_spec.rb +2 -2
- data/spec/features/admin/stock_transfer_spec.rb +11 -8
- data/spec/helpers/admin/navigation_helper_spec.rb +23 -0
- metadata +26 -18
- data/app/assets/javascripts/spree/backend/images/new.js.coffee +0 -7
- data/app/assets/stylesheets/spree/backend/sections/_payments.scss +0 -14
- data/app/helpers/spree/admin/images_helper.rb +0 -17
- data/app/views/spree/admin/orders/_add_line_item.html.erb +0 -15
- data/app/views/spree/admin/prices/new.js.erb +0 -2
- data/app/views/spree/admin/products/_properties_form.erb +0 -10
- data/app/views/spree/admin/promotions/_tab.html.erb +0 -1
- data/app/views/spree/admin/shared/_report_criteria.html.erb +0 -17
- data/app/views/spree/admin/states/_new.html.erb +0 -7
- data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +0 -38
- data/app/views/spree/admin/stock_transfers/_stock_movements.html.erb +0 -27
- data/app/views/spree/admin/taxons/_taxon_table.html.erb +0 -23
@@ -32,26 +32,22 @@
|
|
32
32
|
<% end %>
|
33
33
|
</div>
|
34
34
|
|
35
|
-
|
36
|
-
<p id="filereader">File API & FileReader API not supported</p>
|
37
|
-
<p id="formdata">XHR2's FormData is not supported</p>
|
38
|
-
<p id="progress">XHR2's upload progress isn't supported</p>
|
39
|
-
|
40
35
|
<div id="progress-zone" class="row"></div>
|
41
36
|
</fieldset>
|
42
37
|
|
43
38
|
<% no_images = @product.images.empty? && @product.variant_images.empty? %>
|
44
39
|
|
45
|
-
<table class="index sortable <%= 'hidden' if no_images %>" id="images-table" data-hook="images_table" data-sortable-link="<%= update_positions_admin_product_images_url(@product) %>">
|
40
|
+
<table class="index sortable inline-editable-table <%= 'hidden' if no_images %>" id="images-table" data-hook="images_table" data-sortable-link="<%= update_positions_admin_product_images_url(@product) %>">
|
46
41
|
<colgroup>
|
47
42
|
<col style="width: 5%">
|
48
43
|
<col style="width: 10%">
|
49
44
|
<% if @product.has_variants? %>
|
50
|
-
<col style="width:
|
45
|
+
<col style="width: 40%">
|
51
46
|
<% end %>
|
52
|
-
<col style="width:
|
47
|
+
<col style="width: 30%">
|
53
48
|
<col style="width: 15%">
|
54
49
|
</colgroup>
|
50
|
+
|
55
51
|
<thead>
|
56
52
|
<tr data-hook="images_header">
|
57
53
|
<th colspan="2"><%= Spree.t(:thumbnail) %></th>
|
@@ -22,13 +22,12 @@
|
|
22
22
|
<tr>
|
23
23
|
<td><strong><%= Spree.t(:avs_response) %>:</strong></td>
|
24
24
|
<td class="align-center">
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
</span>
|
25
|
+
<% if latest_payment.is_avs_risky? %>
|
26
|
+
<span class="state void"><%= Spree.t(:error) %>:</span>
|
27
|
+
<%= avs_response_code[latest_payment.avs_response] %>
|
28
|
+
<% else %>
|
29
|
+
<span class="state complete"><%= Spree.t(:success) %></span>
|
30
|
+
<% end %>
|
32
31
|
</td>
|
33
32
|
</tr>
|
34
33
|
|
@@ -55,7 +55,7 @@
|
|
55
55
|
<%= label_tag 'selected_shipping_rate_id', Spree::ShippingMethod.model_name.human %>
|
56
56
|
<%= select_tag :selected_shipping_rate_id,
|
57
57
|
options_for_select(shipment.shipping_rates.map {|sr| ["#{sr.name} #{sr.display_price}", sr.id] }, shipment.selected_shipping_rate_id),
|
58
|
-
{class: '
|
58
|
+
{class: 'custom-select fullwidth', data: {'shipment-number' => shipment.number } } %>
|
59
59
|
</div>
|
60
60
|
</div>
|
61
61
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<fieldset class="no-border-bottom" data-hook="customer_details_total">
|
2
2
|
<legend><%= Spree.t(:customer) %></legend>
|
3
3
|
<div class="customer"><%= order.user.try(:email) %></div><br/>
|
4
|
-
</
|
4
|
+
</fieldset>
|
5
5
|
|
6
6
|
<fieldset class="no-border-bottom no-border-top">
|
7
7
|
<div class="row">
|
@@ -33,7 +33,7 @@
|
|
33
33
|
|
34
34
|
<div class="field">
|
35
35
|
<%= label_tag :q_state_eq, Spree.t(:status) %>
|
36
|
-
<%= f.select :state_eq, Spree::Order.state_machines[:state].states.collect {|s| [Spree.t("order_state.#{s.name}"), s.value]}, {include_blank: true}, class: '
|
36
|
+
<%= f.select :state_eq, Spree::Order.state_machines[:state].states.collect {|s| [Spree.t("order_state.#{s.name}"), s.value]}, {include_blank: true}, class: 'custom-select fullwidth' %>
|
37
37
|
</div>
|
38
38
|
|
39
39
|
<div class="field">
|
@@ -85,8 +85,8 @@
|
|
85
85
|
<div class="col-12 col-md-6 col-lg-4 col-xl-3">
|
86
86
|
<% if Spree::Store.count > 1 %>
|
87
87
|
<div class="field">
|
88
|
-
<%= label_tag
|
89
|
-
<%= f.select :store_id_eq, Spree::Store.all.map { |s| [s.name, s.id] }, { include_blank: true }, { class: "
|
88
|
+
<%= label_tag :q_store_id_eq, Spree.t(:store) %>
|
89
|
+
<%= f.select :store_id_eq, Spree::Store.all.map { |s| [s.name, s.id] }, { include_blank: true }, { class: "custom-select fullwidth" } %>
|
90
90
|
</div>
|
91
91
|
<% end %>
|
92
92
|
|
@@ -6,13 +6,13 @@
|
|
6
6
|
<div class="col-3">
|
7
7
|
<div id="preference-settings">
|
8
8
|
<div class="field">
|
9
|
-
<%=
|
10
|
-
<%= collection_select(:payment_method, :type, @
|
9
|
+
<%= label :payment_method, :type %>
|
10
|
+
<%= collection_select(:payment_method, :type, @payment_method_types, :to_s, :name, {}, {class: 'custom-select fullwidth js-gateway-type'}) %>
|
11
11
|
</div>
|
12
12
|
|
13
13
|
<div class="field js-preference-source-wrapper">
|
14
14
|
<%= f.label :preference_source %>
|
15
|
-
<%= f.select(:preference_source, [[Spree.t(:preference_source_none), nil]] + @object.class.available_preference_sources, {}, class: '
|
15
|
+
<%= f.select(:preference_source, [[Spree.t(:preference_source_none), nil]] + @object.class.available_preference_sources, {}, class: 'custom-select fullwidth js-preference-source') %>
|
16
16
|
</div>
|
17
17
|
|
18
18
|
<div class="gateway-settings js-gateway-settings">
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<% end %>
|
24
24
|
</div>
|
25
25
|
|
26
|
-
<div class="info warning js-gateway-settings-warning"><%= Spree.t(:
|
26
|
+
<div class="info warning js-gateway-settings-warning"><%= Spree.t(:payment_method_settings_warning) %></div>
|
27
27
|
</div>
|
28
28
|
<div data-hook="available_to_user" class="field">
|
29
29
|
<%= label_tag nil, Spree::PaymentMethod.human_attribute_name(:available_to_users) %>
|
@@ -35,7 +35,7 @@
|
|
35
35
|
</div>
|
36
36
|
<div data-hook="auto_capture" class="field">
|
37
37
|
<%= f.label :auto_capture %>
|
38
|
-
<%= select(:payment_method, :auto_capture, [["#{Spree.t(:use_app_default)} (#{Spree::Config[:auto_capture]})", ''], [Spree.t(:say_yes), true], [Spree.t(:say_no), false]], {}, {class: '
|
38
|
+
<%= select(:payment_method, :auto_capture, [["#{Spree.t(:use_app_default)} (#{Spree::Config[:auto_capture]})", ''], [Spree.t(:say_yes), true], [Spree.t(:say_no), false]], {}, {class: 'custom-select fullwidth'}) %>
|
39
39
|
</div>
|
40
40
|
<div data-hook="active" class="field">
|
41
41
|
<%= label_tag nil, Spree::PaymentMethod.human_attribute_name(:active) %>
|
@@ -24,10 +24,10 @@
|
|
24
24
|
<div class="payment-method-settings">
|
25
25
|
<% @payment_methods.each do |method| %>
|
26
26
|
|
27
|
-
<div class="payment-methods" id="payment_method_<%= method.id %>">
|
27
|
+
<div class="payment-methods" id="payment_method_<%= method.id %>" data-payment-method-id="<%= method.id %>">
|
28
28
|
<% if method.source_required? %>
|
29
29
|
<br />
|
30
|
-
<%= render partial: "spree/admin/payments/source_forms/#{method.
|
30
|
+
<%= render partial: "spree/admin/payments/source_forms/#{method.partial_name}",
|
31
31
|
locals: { payment_method: method, previous_cards: method.reusable_sources(@order) } %>
|
32
32
|
<% end %>
|
33
33
|
</div>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<td><%= link_to payment.number, spree.admin_order_payment_path(@order, payment) %></td>
|
17
17
|
<td><%= pretty_time(payment.created_at) %></td>
|
18
18
|
<td class="align-center amount">
|
19
|
-
<%= text_field_tag :amount, payment.amount, class: 'js-edit-amount
|
19
|
+
<%= text_field_tag :amount, payment.amount, class: 'js-edit-amount align-right editing-show' %>
|
20
20
|
<span class="js-display-amount editing-hide"><%= payment.display_amount.to_html %></span>
|
21
21
|
</td>
|
22
22
|
<td class="align-center"><%= payment_method_name(payment) %></td>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<li><%= button_link_to Spree.t(:logs), spree.admin_order_payment_log_entries_url(@order, @payment) %></li>
|
14
14
|
<% end %>
|
15
15
|
|
16
|
-
<%= render partial: "spree/admin/payments/source_views/#{@payment.payment_method.
|
16
|
+
<%= render partial: "spree/admin/payments/source_views/#{@payment.payment_method.partial_name}", locals: { payment: @payment.source.is_a?(Spree::Payment) ? @payment.source : @payment } %>
|
17
17
|
|
18
18
|
<div data-hook="amount" class="align-center">
|
19
19
|
<h5><%= label_tag nil, Spree::Payment.human_attribute_name(:amount) %>: <span class="green"><%= @payment.display_amount.to_html %></span> </h5>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<fieldset class="no-border-bottom">
|
1
|
+
<fieldset class="no-border-bottom js-edit-credit-card">
|
2
2
|
<div class="field" data-hook="previous_cards">
|
3
3
|
<% if previous_cards.any? %>
|
4
4
|
<% previous_cards.each do |card| %>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<% end %>
|
9
9
|
</div>
|
10
10
|
|
11
|
-
<div id="card_form<%= payment_method.id %>" data-hook>
|
11
|
+
<div id="card_form<%= payment_method.id %>" data-hook class="js-new-credit-card-form">
|
12
12
|
<% param_prefix = "payment_source[#{payment_method.id}]" %>
|
13
13
|
|
14
14
|
<div class="clear"></div>
|
@@ -20,11 +20,6 @@
|
|
20
20
|
<%= hidden_field_tag "#{param_prefix}[cc_type]", '', {class: 'ccType'} %>
|
21
21
|
<%= label_tag "card_number#{payment_method.id}", Spree::CreditCard.human_attribute_name(:number), class: 'required' %>
|
22
22
|
<%= text_field_tag "#{param_prefix}[number]", '', class: 'required fullwidth cardNumber', id: "card_number#{payment_method.id}", maxlength: 19 %>
|
23
|
-
<span id="card_type" style="display:none;">
|
24
|
-
( <span id="looks_like" ><%= Spree.t(:card_type_is) %> <span id="type"></span></span>
|
25
|
-
<span id="unrecognized"><%= Spree.t(:unrecognized_card_type) %></span>
|
26
|
-
)
|
27
|
-
</span>
|
28
23
|
</div>
|
29
24
|
</div>
|
30
25
|
</div>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<%= f.select :variant_id,
|
8
8
|
@product.variants_including_master.map { |v| [v.descriptive_name, v.id] },
|
9
9
|
{},
|
10
|
-
class: "
|
10
|
+
class: "custom-select fullwidth", disabled: !f.object.new_record? %>
|
11
11
|
<% end %>
|
12
12
|
</div>
|
13
13
|
|
@@ -20,7 +20,7 @@
|
|
20
20
|
include_blank: t(:any_country, scope: [:spree, :admin, :prices]),
|
21
21
|
selected: Spree::Config.admin_vat_country_iso
|
22
22
|
},
|
23
|
-
{ class: '
|
23
|
+
{ class: 'custom-select fullwidth', disabled: !f.object.new_record? } %>
|
24
24
|
<% end %>
|
25
25
|
</div>
|
26
26
|
|
@@ -1,4 +1,6 @@
|
|
1
1
|
<%= render 'spree/admin/shared/product_tabs', current: 'Prices' %>
|
2
|
+
<% admin_breadcrumb(link_to(plural_resource_name(Spree::Price), spree.admin_product_prices_url(@product))) %>
|
3
|
+
<% admin_breadcrumb(Spree.t('actions.edit')) %>
|
2
4
|
|
3
5
|
<%= form_for @price, url: spree.admin_product_price_path(@product, @price) do |f| %>
|
4
6
|
<fieldset>
|
@@ -1,8 +1,9 @@
|
|
1
1
|
<%= render 'spree/admin/shared/product_tabs', current: 'Prices' %>
|
2
|
+
<% admin_breadcrumb(plural_resource_name(Spree::Price)) %>
|
2
3
|
|
3
4
|
<% content_for :page_actions do %>
|
4
5
|
<li id="new_price_link">
|
5
|
-
<%= button_link_to t(".new_price"), new_object_url
|
6
|
+
<%= button_link_to t(".new_price"), new_object_url %>
|
6
7
|
</li>
|
7
8
|
<% end if can?(:create, Spree::Product) %>
|
8
9
|
|
@@ -21,7 +22,7 @@
|
|
21
22
|
<%= f.select :variant_id_eq,
|
22
23
|
@product.variants_including_master.map { |v| [v.descriptive_name, v.id] },
|
23
24
|
{include_blank: true},
|
24
|
-
class: "
|
25
|
+
class: "custom-select fullwidth" %>
|
25
26
|
</div>
|
26
27
|
</div>
|
27
28
|
|
@@ -31,7 +32,7 @@
|
|
31
32
|
<%= f.select :currency_eq,
|
32
33
|
@prices.map(&:currency).uniq,
|
33
34
|
{include_blank: true},
|
34
|
-
class: "
|
35
|
+
class: "custom-select fullwidth" %>
|
35
36
|
</div>
|
36
37
|
</div>
|
37
38
|
|
@@ -41,7 +42,7 @@
|
|
41
42
|
<%= f.select :country_iso_eq,
|
42
43
|
@prices.map(&:country).compact.uniq.map { |c| [c.name, c.iso]},
|
43
44
|
{include_blank: true},
|
44
|
-
class: "
|
45
|
+
class: "custom-select fullwidth" %>
|
45
46
|
</div>
|
46
47
|
</div>
|
47
48
|
|
@@ -1,3 +1,7 @@
|
|
1
|
+
<%= render 'spree/admin/shared/product_tabs', current: 'Prices' %>
|
2
|
+
<% admin_breadcrumb(link_to(plural_resource_name(Spree::Price), spree.admin_product_prices_url(@product))) %>
|
3
|
+
<% admin_breadcrumb(Spree.t('actions.new')) %>
|
4
|
+
|
1
5
|
<%= form_for [:admin, @product, @product.prices.build] do |f| %>
|
2
6
|
<fieldset data-hook="admin_product_price_new_form">
|
3
7
|
<legend><%= t('.new_price') %></legend>
|
@@ -48,7 +48,7 @@
|
|
48
48
|
<% @option_types.each do |option_type, option_values| %>
|
49
49
|
<div class="field">
|
50
50
|
<%= label :option_type_presentation, option_type.presentation %>
|
51
|
-
<%= select_tag "ovi[]", options_from_collection_for_select(option_values, :id, :presentation, params[:ovi]), class: '
|
51
|
+
<%= select_tag "ovi[]", options_from_collection_for_select(option_values, :id, :presentation, params[:ovi]), class: 'custom-select fullwidth', include_blank: true, id: "#{option_type.name}_option_type_select" %>
|
52
52
|
</div>
|
53
53
|
<% end %>
|
54
54
|
<div class="form-buttons filter-actions actions">
|
@@ -32,7 +32,8 @@
|
|
32
32
|
<div data-hook="admin_product_form_price">
|
33
33
|
<%= f.field_container :price do %>
|
34
34
|
<%= f.label :price, class: 'required' %>
|
35
|
-
<%= render "spree/admin/shared/number_with_currency", f: f, amount_attr: :price,
|
35
|
+
<%= render "spree/admin/shared/number_with_currency", f: f, amount_attr: :price,
|
36
|
+
currency: Spree::Config.default_pricing_options.currency %>
|
36
37
|
<%= f.error_message_on :price %>
|
37
38
|
<% end %>
|
38
39
|
</div>
|
@@ -120,7 +121,7 @@
|
|
120
121
|
<%= f.field_container :shipping_categories do %>
|
121
122
|
<%= f.label :shipping_category_id, Spree::ShippingCategory.model_name.human %>
|
122
123
|
<%= f.field_hint :shipping_category %>
|
123
|
-
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: '
|
124
|
+
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'custom-select' }) %>
|
124
125
|
<%= f.error_message_on :shipping_category %>
|
125
126
|
<% end %>
|
126
127
|
</div>
|
@@ -129,7 +130,7 @@
|
|
129
130
|
<%= f.field_container :tax_category do %>
|
130
131
|
<%= f.label :tax_category_id, Spree::TaxCategory.model_name.human %>
|
131
132
|
<%= f.field_hint :tax_category %>
|
132
|
-
<%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: '
|
133
|
+
<%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'custom-select' }) %>
|
133
134
|
<%= f.error_message_on :tax_category %>
|
134
135
|
<% end %>
|
135
136
|
</div>
|
@@ -26,15 +26,15 @@
|
|
26
26
|
|
27
27
|
<div class="col-4">
|
28
28
|
<div class="field">
|
29
|
-
<%= f.label :
|
30
|
-
<%= f.text_field :
|
29
|
+
<%= f.label :with_variant_sku_cont, Spree::Variant.human_attribute_name(:sku) %>
|
30
|
+
<%= f.text_field :with_variant_sku_cont, size: 15 %>
|
31
31
|
</div>
|
32
32
|
</div>
|
33
33
|
|
34
34
|
<div class="col-2">
|
35
35
|
<div class="field checkbox">
|
36
36
|
<label>
|
37
|
-
<%= f.check_box :
|
37
|
+
<%= f.check_box :with_deleted, { checked: params[:q][:with_deleted] == 'true' }, 'true', 'false' %>
|
38
38
|
<%= Spree.t(:show_deleted) %>
|
39
39
|
</label>
|
40
40
|
</div>
|
@@ -47,7 +47,7 @@
|
|
47
47
|
<%= f.label :shipping_category_id, Spree::ShippingCategory.
|
48
48
|
model_name.human, class: 'required' %>
|
49
49
|
<%= f.field_hint :shipping_category %><br />
|
50
|
-
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: '
|
50
|
+
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'custom-select fullwidth' }) %>
|
51
51
|
<%= f.error_message_on :shipping_category_id %>
|
52
52
|
<% end %>
|
53
53
|
</div>
|
@@ -56,7 +56,7 @@
|
|
56
56
|
<%= f.field_container :tax_category do %>
|
57
57
|
<%= f.label :tax_category_id, Spree::TaxCategory.model_name.human %>
|
58
58
|
<%= f.field_hint :tax_category %>
|
59
|
-
<%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: '
|
59
|
+
<%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'custom-select fullwidth' }) %>
|
60
60
|
<%= f.error_message_on :tax_category %>
|
61
61
|
<% end %>
|
62
62
|
</div>
|
@@ -1,7 +1,4 @@
|
|
1
1
|
$("#new_product_wrapper").html('<%= escape_javascript(render template: "spree/admin/products/new", formats: [:html], handlers: [:erb]) %>');
|
2
2
|
handle_date_picker_fields();
|
3
|
-
<% unless Rails.env.test? %>
|
4
|
-
$('.select2').select2();
|
5
|
-
<% end %>
|
6
3
|
$("#table-filter").hide();
|
7
4
|
$("#admin_new_product").parent().hide();
|
@@ -1,14 +1,10 @@
|
|
1
1
|
$('#actions').append('<%= escape_javascript( render(partial: 'spree/admin/promotions/promotion_action', object: @promotion_action) ) %>');
|
2
2
|
$('#actions .no-objects-found').hide();
|
3
|
-
$(
|
4
|
-
|
5
|
-
//enable select2 functions for recently added box
|
6
|
-
$('.type-select.select2').last().select2();
|
7
|
-
});
|
3
|
+
$(".variant_autocomplete").variantAutocomplete();
|
4
|
+
|
8
5
|
initPromotionActions();
|
9
6
|
|
10
7
|
|
11
8
|
$('#<%= dom_id @promotion_action %>').hide();
|
12
9
|
$('#<%= dom_id @promotion_action %>').fadeIn();
|
13
10
|
new Spree.CalculatorEditView({el: $('#<%= dom_id @promotion_action %> .js-calculator-fields')});
|
14
|
-
|
@@ -5,12 +5,4 @@ $('.product_picker').productAutocomplete();
|
|
5
5
|
$('.user_picker').userAutocomplete();
|
6
6
|
$('.taxon_picker').taxonAutocomplete();
|
7
7
|
|
8
|
-
$('select.select2').select2({
|
9
|
-
allowClear: true,
|
10
|
-
dropdownAutoWidth: true,
|
11
|
-
minimumResultsForSearch: 8
|
12
|
-
});
|
13
|
-
|
14
8
|
$('#promotion_rule_type').html('<%= escape_javascript options_for_promotion_rule_types(@promotion) %>');
|
15
|
-
$('#promotion_rule_type').select2();
|
16
|
-
|
@@ -1,13 +1,13 @@
|
|
1
1
|
<fieldset id="action_fields" class="no-border-top">
|
2
2
|
|
3
3
|
<%= form_tag spree.admin_promotion_promotion_actions_path(@promotion), remote: true, id: 'new_promotion_action_form' do %>
|
4
|
-
<% options = options_for_select( Rails.application.config.spree.promotions.actions.map
|
4
|
+
<% options = options_for_select( Rails.application.config.spree.promotions.actions.map {|action| [ action.model_name.human, action.name] } ) %>
|
5
5
|
<fieldset>
|
6
6
|
<legend align="center"><%= plural_resource_name(Spree::PromotionAction) %></legend>
|
7
7
|
<% if can?(:update, @promotion) %>
|
8
8
|
<div class="field">
|
9
9
|
<%= label_tag :action_type, Spree.t(:add_action_of_type)%>
|
10
|
-
<%= select_tag 'action_type', options, class: '
|
10
|
+
<%= select_tag 'action_type', options, class: 'custom-select fullwidth' %>
|
11
11
|
</div>
|
12
12
|
<div class="filter-actions actions">
|
13
13
|
<%= button Spree.t('actions.add') %>
|
@@ -25,7 +25,7 @@
|
|
25
25
|
|
26
26
|
<%= f.field_container :category do %>
|
27
27
|
<%= f.label :promotion_category_id, Spree::PromotionCategory.model_name.human %><br />
|
28
|
-
<%= f.collection_select(:promotion_category_id, @promotion_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: '
|
28
|
+
<%= f.collection_select(:promotion_category_id, @promotion_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'custom-select fullwidth' }) %>
|
29
29
|
<% end %>
|
30
30
|
</div>
|
31
31
|
</div>
|
@@ -1,6 +1,5 @@
|
|
1
|
-
<div class="promotion_action promotion-block <%= promotion_action.
|
2
|
-
|
3
|
-
<h6 class="promotion-title"><%= Spree.t("promotion_action_types.#{type_name}.description") %></h6>
|
1
|
+
<div class="promotion_action promotion-block <%= promotion_action.model_name.element %>" id="<%= dom_id promotion_action %>">
|
2
|
+
<h6 class="promotion-title"><%= promotion_action.class.human_attribute_name(:description) %></h6>
|
4
3
|
<% if can?(:destroy, promotion_action) %>
|
5
4
|
<%= link_to_with_icon 'trash', '', spree.admin_promotion_promotion_action_path(@promotion, promotion_action), remote: true, method: :delete, class: 'delete' %>
|
6
5
|
<% end %>
|
@@ -9,6 +8,6 @@
|
|
9
8
|
<%= hidden_field_tag "#{param_prefix}[id]", promotion_action.id %>
|
10
9
|
|
11
10
|
<%= render partial: "spree/shared/error_messages", locals: { target: promotion_action } %>
|
12
|
-
<%= render partial:
|
11
|
+
<%= render partial: promotion_action.to_partial_path,
|
13
12
|
locals: { promotion_action: promotion_action, param_prefix: param_prefix } %>
|
14
13
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="promotion_rule promotion-block col-12" id="<%= dom_id promotion_rule %>">
|
2
|
-
<% type_name = promotion_rule.
|
3
|
-
<h6 class='promotion-title <%= 'no-text' if type_name == 'user_logged_in' || type_name == 'first_order'%>'><%=
|
2
|
+
<% type_name = promotion_rule.model_name.element %>
|
3
|
+
<h6 class='promotion-title <%= 'no-text' if type_name == 'user_logged_in' || type_name == 'first_order'%>'><%= promotion_rule.class.human_attribute_name(:description) %></h6>
|
4
4
|
<% if can?(:destroy, promotion_rule) %>
|
5
5
|
<%= link_to_with_icon 'trash', '', spree.admin_promotion_promotion_rule_path(@promotion, promotion_rule), remote: true, method: :delete, class: 'delete' %>
|
6
6
|
<% end %>
|
@@ -8,5 +8,5 @@
|
|
8
8
|
<% param_prefix = "promotion[promotion_rules_attributes][#{promotion_rule.id}]" %>
|
9
9
|
<%= hidden_field_tag "#{param_prefix}[id]", promotion_rule.id %>
|
10
10
|
<%= render partial: "spree/shared/error_messages", locals: { target: promotion_rule } %>
|
11
|
-
<%= render partial:
|
11
|
+
<%= render partial: promotion_rule.to_partial_path, locals: { promotion_rule: promotion_rule, param_prefix: param_prefix } %>
|
12
12
|
</div>
|