spree_backend 4.3.0 → 4.4.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +222 -0
- data/.codeclimate.yml +36 -0
- data/.editorconfig +22 -0
- data/.eslintignore +7 -0
- data/.eslintrc.cjs +29 -0
- data/.gem_release.yml +4 -0
- data/.github/CONTRIBUTING.md +1 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +47 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- data/.github/ISSUE_TEMPLATE.md +39 -0
- data/.github/dependabot.yml +7 -0
- data/.github/workflows/spelling_lint.yml +34 -0
- data/.gitignore +63 -0
- data/.rubocop.yml +197 -0
- data/.solargraph.yml +20 -0
- data/.stylelintignore +4 -0
- data/.stylelintrc +6 -0
- data/CODE_OF_CONDUCT.md +22 -0
- data/Gemfile +59 -3
- data/README.md +123 -0
- data/SECURITY.md +1 -0
- data/app/assets/config/spree_backend_manifest.js +1 -1
- data/app/assets/images/backend-cloud-arrow-up.svg +4 -0
- data/app/assets/images/backend-eye-open.svg +1 -1
- data/app/assets/images/backend-file-earmark-font.svg +4 -0
- data/app/assets/images/backend-file-earmark-image.svg +4 -0
- data/app/assets/images/backend-file-earmark-music.svg +4 -0
- data/app/assets/images/backend-file-earmark-pdf.svg +4 -0
- data/app/assets/images/backend-file-earmark-play.svg +4 -0
- data/app/assets/images/backend-file-earmark-spreadsheet.svg +3 -0
- data/app/assets/images/backend-file-earmark-zip.svg +4 -0
- data/app/assets/images/backend-file-earmark.svg +3 -0
- data/app/assets/images/backend-hdd.svg +4 -0
- data/app/assets/images/backend-link.svg +4 -0
- data/app/assets/images/backend-view.svg +1 -1
- data/app/assets/javascripts/spree/backend/adjustments.js +5 -5
- data/app/assets/javascripts/spree/backend/admin.js +4 -6
- data/app/assets/javascripts/spree/backend/calculator.js +1 -1
- data/app/assets/javascripts/spree/backend/checkouts/edit.js +1 -1
- data/app/assets/javascripts/spree/backend/cms/links.es6 +1 -1
- data/app/assets/javascripts/spree/backend/cms/live_preview.es6 +1 -1
- data/app/assets/javascripts/spree/backend/cms/page.es6 +22 -40
- data/app/assets/javascripts/spree/backend/cms/section.es6 +1 -1
- data/app/assets/javascripts/spree/backend/gateway.js +1 -1
- data/app/assets/javascripts/spree/backend/general_settings.js +1 -1
- data/app/assets/javascripts/spree/backend/global/_index.js +3 -1
- data/app/assets/javascripts/spree/backend/global/alerts.es6 +1 -1
- data/app/assets/javascripts/spree/backend/global/animate_css.es6 +19 -0
- data/app/assets/javascripts/spree/backend/global/fetch_request_utility.es6 +114 -0
- data/app/assets/javascripts/spree/backend/global/flatpickr.es6 +2 -1
- data/app/assets/javascripts/spree/backend/global/info_alert.es6 +1 -1
- data/app/assets/javascripts/spree/backend/global/radio_panel_toggle.es6 +1 -1
- data/app/assets/javascripts/spree/backend/global/ransack.es6 +7 -5
- data/app/assets/javascripts/spree/backend/global/responsive_menus.es6 +1 -1
- data/app/assets/javascripts/spree/backend/global/select2_autocomplete.es6 +4 -4
- data/app/assets/javascripts/spree/backend/global/select2_populate.es6 +2 -2
- data/app/assets/javascripts/spree/backend/global/side_scroll_indication.es6 +2 -2
- data/app/assets/javascripts/spree/backend/global/sortable.es6 +1 -1
- data/app/assets/javascripts/spree/backend/global/tinymce.es6 +3 -2
- data/app/assets/javascripts/spree/backend/line_items.js +7 -9
- data/app/assets/javascripts/spree/backend/line_items_on_order_edit.js +23 -28
- data/app/assets/javascripts/spree/backend/menus/_index.es6 +0 -1
- data/app/assets/javascripts/spree/backend/menus/menu_item.es6 +1 -1
- data/app/assets/javascripts/spree/backend/multi_currency.js +2 -2
- data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +1 -1
- data/app/assets/javascripts/spree/backend/orders/edit.js +1 -1
- data/app/assets/javascripts/spree/backend/payments/edit.js +32 -22
- data/app/assets/javascripts/spree/backend/payments/new.js +1 -1
- data/app/assets/javascripts/spree/backend/product_picker.js +16 -25
- data/app/assets/javascripts/spree/backend/progress.js +5 -3
- data/app/assets/javascripts/spree/backend/promotions.js +3 -1
- data/app/assets/javascripts/spree/backend/returns/expedited_exchanges_warning.js +1 -1
- data/app/assets/javascripts/spree/backend/returns/return_item_selection.js +1 -1
- data/app/assets/javascripts/spree/backend/shipments.js +80 -79
- data/app/assets/javascripts/spree/backend/spree-select2.js +1 -1
- data/app/assets/javascripts/spree/backend/states.js +1 -1
- data/app/assets/javascripts/spree/backend/stock_location.js +1 -1
- data/app/assets/javascripts/spree/backend/stock_management.js +1 -1
- data/app/assets/javascripts/spree/backend/stock_movement.js +58 -13
- data/app/assets/javascripts/spree/backend/stock_transfer.js +62 -32
- data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +9 -8
- data/app/assets/javascripts/spree/backend/taxons.js +17 -14
- data/app/assets/javascripts/spree/backend/user_picker.js +1 -1
- data/app/assets/javascripts/spree/backend/users/edit.js +1 -1
- data/app/assets/javascripts/spree/backend/variant_autocomplete.js +19 -11
- data/app/assets/javascripts/spree/backend/variant_management.js +1 -1
- data/app/assets/javascripts/spree/backend/zone.js +1 -1
- data/app/assets/javascripts/spree/backend.js +13 -33
- data/app/assets/javascripts/spree.js +2 -9
- data/app/assets/stylesheets/spree/backend/components/_main.scss +8 -0
- data/app/assets/stylesheets/spree/backend/plugins/_nav_x.scss +1 -1
- data/app/assets/stylesheets/spree/backend/plugins/_select2_custom.scss +1 -1
- data/app/assets/stylesheets/spree/backend/shared/_forms.scss +1 -1
- data/app/assets/stylesheets/spree/backend/shared/_sortable_tree.scss +62 -0
- data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +3 -0
- data/app/assets/stylesheets/spree/backend/views/_digitals.scss +33 -0
- data/app/assets/stylesheets/spree/backend/views/{prototypes.scss → _prototypes.scss} +0 -0
- data/app/assets/stylesheets/spree/backend/views/_taxonomies.scss +3 -0
- data/app/controllers/spree/admin/base_controller.rb +4 -13
- data/app/controllers/spree/admin/digitals_controller.rb +33 -0
- data/app/controllers/spree/admin/general_settings_controller.rb +0 -5
- data/app/controllers/spree/admin/images_controller.rb +1 -1
- data/app/controllers/spree/admin/oauth_applications_controller.rb +17 -0
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +2 -2
- data/app/controllers/spree/admin/orders_controller.rb +10 -2
- data/app/controllers/spree/admin/payment_methods_controller.rb +2 -2
- data/app/controllers/spree/admin/payments_controller.rb +1 -1
- data/app/controllers/spree/admin/products_controller.rb +4 -2
- 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/resource_controller.rb +9 -4
- data/app/controllers/spree/admin/return_index_controller.rb +1 -1
- data/app/controllers/spree/admin/stock_transfers_controller.rb +2 -2
- data/app/controllers/spree/admin/store_credits_controller.rb +2 -2
- data/app/controllers/spree/admin/stores_controller.rb +2 -2
- data/app/controllers/spree/admin/taxons_controller.rb +23 -38
- data/app/controllers/spree/admin/users_controller.rb +6 -19
- data/app/controllers/spree/admin/variants_controller.rb +1 -2
- data/app/controllers/spree/admin/webhooks_subscribers_controller.rb +48 -0
- data/app/helpers/spree/admin/base_helper.rb +27 -9
- data/app/helpers/spree/admin/digital_helper.rb +28 -0
- data/app/helpers/spree/admin/menu_helper.rb +0 -21
- data/app/helpers/spree/admin/navigation_helper.rb +19 -9
- data/app/helpers/spree/admin/sortable_tree_helper.rb +31 -0
- data/app/helpers/spree/admin/stores_helper.rb +1 -1
- data/app/helpers/spree/admin/webhooks_subscribers_helper.rb +31 -0
- data/app/javascript/spree/dashboard/controllers/clipboard_controller.js +12 -0
- data/app/javascript/spree/dashboard/controllers/password_toggle_controller.js +14 -0
- data/app/javascript/spree/dashboard/controllers/sortable_tree_controller.js +55 -0
- data/app/javascript/spree/dashboard/controllers/spree_controller.js +25 -0
- data/app/javascript/spree/dashboard/controllers/upload_button_controller.js +13 -0
- data/app/javascript/spree/dashboard/controllers/webhooks_subscriber_events_controller.js +19 -0
- data/app/javascript/spree/dashboard/index.js +49 -0
- data/app/{assets/javascripts/spree/backend/global/bootstrap.es6 → javascript/spree/dashboard/utilities/bootstrap.js} +6 -2
- data/app/javascript/spree/dashboard/utilities/request_utility.js +54 -0
- data/app/models/spree/backend_configuration.rb +11 -0
- data/app/views/spree/admin/adjustments/_form.html.erb +2 -2
- data/app/views/spree/admin/adjustments/index.html.erb +1 -0
- data/app/views/spree/admin/cms_pages/_form.html.erb +8 -8
- data/app/views/spree/admin/cms_pages/edit.html.erb +1 -6
- data/app/views/spree/admin/cms_sections/_form.html.erb +2 -2
- data/app/views/spree/admin/cms_sections/types/_featured_article.html.erb +6 -6
- data/app/views/spree/admin/cms_sections/types/_hero_image.html.erb +6 -6
- data/app/views/spree/admin/cms_sections/types/_image_gallery.html.erb +12 -12
- data/app/views/spree/admin/cms_sections/types/_rich_text_content.html.erb +1 -1
- data/app/views/spree/admin/cms_sections/types/_side_by_side_images.html.erb +12 -12
- data/app/views/spree/admin/countries/_form.html.erb +4 -4
- data/app/views/spree/admin/customer_returns/new.html.erb +1 -1
- data/app/views/spree/admin/digitals/_form.html.erb +35 -0
- data/app/views/spree/admin/digitals/index.html.erb +25 -0
- data/app/views/spree/admin/general_settings/edit.html.erb +1 -22
- data/app/views/spree/admin/menu_items/_form.html.erb +6 -6
- data/app/views/spree/admin/menus/_form.html.erb +3 -3
- data/app/views/spree/admin/menus/edit.html.erb +18 -18
- data/app/views/spree/admin/oauth_applications/_form.html.erb +22 -0
- data/app/views/spree/admin/oauth_applications/create.turbo_stream.erb +38 -0
- data/app/views/spree/admin/oauth_applications/edit.html.erb +13 -0
- data/app/views/spree/admin/oauth_applications/index.html.erb +51 -0
- data/app/views/spree/admin/oauth_applications/new.html.erb +15 -0
- data/app/views/spree/admin/option_types/_form.html.erb +3 -3
- data/app/views/spree/admin/option_types/_option_value_fields.html.erb +2 -2
- data/app/views/spree/admin/orders/_channel_form.html.erb +1 -1
- data/app/views/spree/admin/orders/_form.html.erb +1 -0
- data/app/views/spree/admin/orders/_line_items_edit_form.html.erb +1 -0
- data/app/views/spree/admin/orders/_order_actions.html.erb +6 -0
- data/app/views/spree/admin/orders/_search.html.erb +151 -0
- data/app/views/spree/admin/orders/index.html.erb +2 -151
- data/app/views/spree/admin/payment_methods/_form.html.erb +2 -2
- data/app/views/spree/admin/payments/_list.html.erb +1 -1
- data/app/views/spree/admin/products/_form.html.erb +19 -19
- data/app/views/spree/admin/products/index.html.erb +2 -0
- data/app/views/spree/admin/products/new.html.erb +6 -6
- data/app/views/spree/admin/promotion_actions/create.js.erb +1 -1
- data/app/views/spree/admin/promotion_categories/_form.html.erb +2 -2
- data/app/views/spree/admin/promotions/_form.html.erb +5 -5
- data/app/views/spree/admin/properties/_form.html.erb +3 -3
- data/app/views/spree/admin/prototypes/_form.html.erb +4 -4
- data/app/views/spree/admin/refunds/new.html.erb +2 -2
- data/app/views/spree/admin/reimbursement_types/_form.html.erb +2 -2
- data/app/views/spree/admin/return_authorizations/_form.html.erb +3 -3
- data/app/views/spree/admin/roles/_form.html.erb +1 -1
- data/app/views/spree/admin/shared/_account_nav.html.erb +1 -1
- data/app/views/spree/admin/shared/_address_form.html.erb +4 -4
- data/app/views/spree/admin/shared/_head.html.erb +4 -8
- data/app/views/spree/admin/shared/_main_menu.html.erb +12 -0
- data/app/views/spree/admin/shared/_new_resource_links.html.erb +1 -1
- data/app/views/spree/admin/shared/_product_tabs.html.erb +8 -0
- data/app/views/spree/admin/shared/_version.html.erb +1 -1
- data/app/views/spree/admin/shared/cms/_spree_product.html.erb +2 -2
- data/app/views/spree/admin/shared/cms/_spree_taxon.html.erb +2 -2
- data/app/views/spree/admin/shared/linkables/_spree_cms_page.erb +2 -2
- data/app/views/spree/admin/shared/linkables/_spree_product.html.erb +2 -2
- data/app/views/spree/admin/shared/linkables/_spree_taxon.html.erb +2 -2
- data/app/views/spree/admin/shared/linkables/_url.html.erb +1 -1
- data/app/views/spree/admin/shared/named_types/_form.html.erb +1 -1
- data/app/views/spree/admin/{menus/nested_menu_items/_item_bar.html.erb → shared/sortable_tree/_menu.html.erb} +10 -7
- data/app/views/spree/admin/shared/sortable_tree/_taxonomy.html.erb +34 -0
- data/app/views/spree/admin/shared/sub_menu/_apps.html.erb +3 -0
- data/app/views/spree/admin/shared/sub_menu/_integrations.html.erb +3 -0
- data/app/views/spree/admin/shipping_categories/_form.html.erb +1 -1
- data/app/views/spree/admin/shipping_methods/_form.html.erb +8 -8
- data/app/views/spree/admin/states/_form.html.erb +2 -2
- data/app/views/spree/admin/stock_locations/_form.html.erb +2 -2
- data/app/views/spree/admin/stock_movements/_form.html.erb +3 -3
- data/app/views/spree/admin/store_credit_categories/_form.html.erb +1 -1
- data/app/views/spree/admin/store_credits/_form.html.erb +4 -4
- data/app/views/spree/admin/stores/_form.html.erb +280 -227
- data/app/views/spree/admin/tax_categories/_form.html.erb +4 -4
- data/app/views/spree/admin/tax_rates/_form.html.erb +4 -3
- data/app/views/spree/admin/taxonomies/_form.html.erb +2 -2
- data/app/views/spree/admin/taxonomies/edit.html.erb +34 -29
- data/app/views/spree/admin/taxons/_form.html.erb +101 -57
- data/app/views/spree/admin/taxons/edit.html.erb +6 -3
- data/app/views/spree/admin/taxons/index.html.erb +1 -1
- data/app/views/spree/admin/taxons/new.html.erb +16 -0
- data/app/views/spree/admin/users/_form.html.erb +3 -3
- data/app/views/spree/admin/users/edit.html.erb +0 -40
- data/app/views/spree/admin/variants/_autocomplete.js.erb +5 -5
- data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +2 -2
- data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +6 -6
- data/app/views/spree/admin/variants/_split.js.erb +1 -1
- data/app/views/spree/admin/variants/index.html.erb +4 -1
- data/app/views/spree/admin/webhooks_subscribers/_form.html.erb +101 -0
- data/app/views/spree/admin/webhooks_subscribers/edit.html.erb +13 -0
- data/app/views/spree/admin/webhooks_subscribers/index.html.erb +47 -0
- data/app/views/spree/admin/webhooks_subscribers/new.html.erb +13 -0
- data/app/views/spree/admin/webhooks_subscribers/show.html.erb +59 -0
- data/app/views/spree/admin/zones/_country_members.html.erb +1 -1
- data/app/views/spree/admin/zones/_form.html.erb +2 -2
- data/app/views/spree/admin/zones/_state_members.html.erb +1 -1
- data/app/views/spree/layouts/admin.html.erb +1 -11
- data/codespell.txt +8 -0
- data/config/locales/en.yml +273 -0
- data/config/routes.rb +6 -2
- data/lib/generators/spree/backend/install/install_generator.rb +4 -2
- data/lib/generators/spree/backend/install/templates/app/javascript/spree-dashboard.js +7 -0
- data/lib/spree/backend/engine.rb +2 -1
- data/lib/spree/backend/testing_support/capybara_utils.rb +53 -0
- data/lib/spree/backend/testing_support/flash.rb +38 -0
- data/lib/spree/backend/testing_support/flatpickr_capybara.rb +126 -0
- data/lib/spree/backend/version.rb +9 -0
- data/lib/spree/backend.rb +2 -1
- data/lib/spree_backend.rb +17 -0
- data/license.md +13 -0
- data/package.json +46 -0
- data/rollup.config.js +41 -0
- data/spree_backend.gemspec +17 -16
- data/vendor/assets/javascripts/purify.js +1 -1
- data/vendor/assets/stylesheets/animate.css +2 -4
- data/yarn.lock +959 -0
- metadata +120 -38
- data/app/assets/javascripts/spree/backend/menus/menu.es6 +0 -57
- data/app/assets/javascripts/spree/backend/taxon_permalink_preview.js +0 -11
- data/app/assets/javascripts/spree/backend/taxon_tree_menu.js +0 -35
- data/app/assets/javascripts/spree/backend/taxonomy.js +0 -178
- data/app/views/spree/admin/taxonomies/_js_head.html.erb +0 -7
- data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +0 -4564
- data/vendor/assets/javascripts/js.cookie.js +0 -163
- data/vendor/assets/javascripts/modernizr.js +0 -3
- data/vendor/assets/stylesheets/jquery.jstree/themes/spree/style.scss +0 -230
- data/vendor/assets/stylesheets/jquery.jstree/themes/spree/throbber.gif +0 -0
@@ -0,0 +1,51 @@
|
|
1
|
+
<% content_for :page_title do %>
|
2
|
+
<%= Spree.t('admin.oauth_applications.list') %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :page_actions do %>
|
6
|
+
<%= button_link_to Spree.t('admin.oauth_applications.new'), new_object_url, class: "btn-success", icon: 'add.svg', id: 'admin_new_role_link' %>
|
7
|
+
<% end if can? :create, Spree::OauthApplication %>
|
8
|
+
|
9
|
+
<% if @oauth_applications.any? %>
|
10
|
+
<div class="table-responsive mt-4">
|
11
|
+
<table class="table">
|
12
|
+
<thead>
|
13
|
+
<tr data-hook="admin_roles_index_headers">
|
14
|
+
<th><%= Spree.t(:name) %></th>
|
15
|
+
<th><%= Spree.t('admin.oauth_applications.uid') %></th>
|
16
|
+
<th><%= Spree.t('admin.oauth_applications.scopes') %></th>
|
17
|
+
<th class="actions"></th>
|
18
|
+
</tr>
|
19
|
+
</thead>
|
20
|
+
<tbody>
|
21
|
+
<% @oauth_applications.each do |application| %>
|
22
|
+
<tr id="<%= spree_dom_id application %>" data-hook="admin_roles_index_rows">
|
23
|
+
<td><%= application.name %></td>
|
24
|
+
<td>
|
25
|
+
<div class="input-group" data-controller="password-toggle">
|
26
|
+
<%= password_field_tag :password, application.uid, class: 'form-control unhide text-muted border-0 bg-transparent', data: { password_toggle_target: 'unhide' }, readonly: true %>
|
27
|
+
<div class="input-group-append">
|
28
|
+
<%= button_tag class: 'btn btn-link', data: { action: 'click->password-toggle#password' } do %>
|
29
|
+
<%= svg_icon name: "view.svg", width: '18', height: '18' %>
|
30
|
+
<% end %>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
</td>
|
34
|
+
<td><%= application.scopes %></td>
|
35
|
+
<td class="actions">
|
36
|
+
<span class="d-flex justify-content-end">
|
37
|
+
<%= link_to_edit(application, no_text: true) if can? :edit, application %>
|
38
|
+
<%= link_to_delete(application, no_text: true) if can? :destroy, application %>
|
39
|
+
</span>
|
40
|
+
</td>
|
41
|
+
</tr>
|
42
|
+
<% end %>
|
43
|
+
</tbody>
|
44
|
+
</table>
|
45
|
+
</div>
|
46
|
+
<% else %>
|
47
|
+
<div class="alert alert-warning">
|
48
|
+
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::OauthApplication)) %>,
|
49
|
+
<%= link_to(Spree.t(:add_one), new_object_url) if can? :create, Spree::OauthApplication %>!
|
50
|
+
</div>
|
51
|
+
<% end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% content_for :page_title do %>
|
2
|
+
<%= link_to Spree.t('admin.oauth_applications.list'), spree.admin_oauth_applications_url %> /
|
3
|
+
<%= Spree.t('admin.oauth_applications.new') %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @oauth_application } %>
|
7
|
+
|
8
|
+
<%= turbo_frame_tag 'new_oauth_application' do %>
|
9
|
+
<%= form_for [:admin, @oauth_application] do |f| %>
|
10
|
+
<fieldset>
|
11
|
+
<%= render partial: 'form', locals: { f: f } %>
|
12
|
+
<%= render partial: 'spree/admin/shared/new_resource_links' %>
|
13
|
+
</fieldset>
|
14
|
+
<% end %>
|
15
|
+
<% end %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div data-hook="admin_option_type_form_fields" class="row">
|
2
2
|
<div class="col-12 col-md-6">
|
3
|
-
<%= f.field_container :name
|
3
|
+
<%= f.field_container :name do %>
|
4
4
|
<%= f.label :name, Spree.t(:name) %> <span class="required">*</span>
|
5
5
|
<%= f.text_field :name, class: "form-control" %>
|
6
6
|
<%= f.error_message_on :name %>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
</div>
|
9
9
|
|
10
10
|
<div class="col-12 col-md-6">
|
11
|
-
<%= f.field_container :presentation
|
11
|
+
<%= f.field_container :presentation do %>
|
12
12
|
<%= f.label :presentation, Spree.t(:presentation) %> <span class="required">*</span>
|
13
13
|
<%= f.text_field :presentation, class: "form-control" %>
|
14
14
|
<%= f.error_message_on :presentation %>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
</div>
|
17
17
|
|
18
18
|
<div class="col-12 col-md-6">
|
19
|
-
<%= f.field_container :filterable
|
19
|
+
<%= f.field_container :filterable do %>
|
20
20
|
<%= label_tag :option_type_filterable do %>
|
21
21
|
<%= f.check_box :filterable %>
|
22
22
|
<%= Spree.t(:filterable) %>
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<%= svg_icon name: "sort.svg", width: '18', height: '18' %>
|
4
4
|
<%= f.hidden_field :id %>
|
5
5
|
</td>
|
6
|
-
<td class="name"><%= f.text_field :name, class: "form-control" %></td>
|
7
|
-
<td class="presentation"><%= f.text_field :presentation, class: "form-control" %></td>
|
6
|
+
<td class="name"><%= f.text_field :name, class: "form-control", required: true %></td>
|
7
|
+
<td class="presentation"><%= f.text_field :presentation, class: "form-control", required: true %></td>
|
8
8
|
<td class="actions">
|
9
9
|
<span class="d-flex justify-content-end">
|
10
10
|
<%= link_to_icon_remove_fields f %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= form_for [:admin, order], method: :put, url: set_channel_admin_order_url do |f| %>
|
3
3
|
<fieldset>
|
4
4
|
<div data-hook="admin_order_channel_field">
|
5
|
-
<%= f.field_container :channel
|
5
|
+
<%= f.field_container :channel do %>
|
6
6
|
<%= f.label :channel, Spree.t(:channel) %>
|
7
7
|
<%= f.text_field :channel, name: 'channel', class: 'form-control' %>
|
8
8
|
<%= f.error_message_on :channel %>
|
@@ -8,4 +8,10 @@
|
|
8
8
|
method: :post,
|
9
9
|
icon: 'envelope.svg' %>
|
10
10
|
<% end %>
|
11
|
+
|
12
|
+
<% if (can? :update, @order) && @order.some_digital? %>
|
13
|
+
<%= button_link_to Spree.t('admin.digitals.reset_download_links'),
|
14
|
+
reset_digitals_admin_order_url(@order),
|
15
|
+
icon: 'hdd.svg' %>
|
16
|
+
<% end %>
|
11
17
|
<% end %>
|
@@ -0,0 +1,151 @@
|
|
1
|
+
<% content_for :table_filter do %>
|
2
|
+
<div data-hook="admin_orders_index_search">
|
3
|
+
|
4
|
+
<%= search_form_for [:admin, @search] do |f| %>
|
5
|
+
<div class="row">
|
6
|
+
|
7
|
+
<div class="date-range-filter col-12 col-lg-8">
|
8
|
+
<div class="form-group">
|
9
|
+
<%= label_tag :q_created_at_gt, Spree.t(:date_range) %>
|
10
|
+
<div class="row pb-0">
|
11
|
+
<div class="col-12 col-md-6 mb-3 mb-md-0">
|
12
|
+
<div class="input-group datePickerFrom"
|
13
|
+
data-wrap="true"
|
14
|
+
data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>"
|
15
|
+
data-max-date="<%= params[:q][:created_at_lt] %>">
|
16
|
+
<%= f.text_field :created_at_gt,
|
17
|
+
class: 'form-control js-filterable shadow-none',
|
18
|
+
value: params[:q][:created_at_gt],
|
19
|
+
placeholder: Spree.t(:starting_from),
|
20
|
+
'data-input':'' %>
|
21
|
+
<%= render partial: 'spree/admin/shared/cal_close' %>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
<div class="col-12 col-md-6 mt-3 mt-md-0">
|
25
|
+
<div class="input-group datePickerTo"
|
26
|
+
data-wrap="true"
|
27
|
+
data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>"
|
28
|
+
data-min-date="<%= params[:q][:created_at_gt] %>">
|
29
|
+
|
30
|
+
<%= f.text_field :created_at_lt,
|
31
|
+
class: 'form-control js-filterable shadow-none',
|
32
|
+
value: params[:q][:created_at_lt],
|
33
|
+
placeholder: Spree.t(:ending_at),
|
34
|
+
'data-input':'' %>
|
35
|
+
<%= render partial: 'spree/admin/shared/cal_close' %>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
<div class="col-12 col-lg-4">
|
42
|
+
<div class="form-group">
|
43
|
+
<%= label_tag :q_number_cont, Spree.t(:search_order_number) %>
|
44
|
+
<%= f.text_field :number_cont, class: 'form-control js-quick-search-target js-filterable' %>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
</div>
|
49
|
+
|
50
|
+
<div class="row">
|
51
|
+
|
52
|
+
<div class="col-12 col-lg-4">
|
53
|
+
<div class="form-group">
|
54
|
+
<%= label_tag :q_state_eq, Spree.t(:status) %>
|
55
|
+
<%= f.select :state_eq,
|
56
|
+
Spree::Order.state_machines[:state].states.map {|s| [Spree.t("order_state.#{s.name}"), s.value]},
|
57
|
+
{ include_blank: true },
|
58
|
+
class: 'select2-clear js-filterable' %>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div class="col-12 col-lg-4">
|
63
|
+
<div class="form-group">
|
64
|
+
<%= label_tag :q_payment_state_eq, Spree.t(:payment_state) %>
|
65
|
+
<%= f.select :payment_state_eq, Spree::Order::PAYMENT_STATES.map {|s| [Spree.t("payment_states.#{s}"), s]}, { include_blank: true }, class: 'select2-clear js-filterable' %>
|
66
|
+
</div>
|
67
|
+
</div>
|
68
|
+
|
69
|
+
<div class="col-12 col-lg-4">
|
70
|
+
<div class="form-group">
|
71
|
+
<%= label_tag :q_shipment_state_eq, Spree.t(:shipment_state) %>
|
72
|
+
<%= f.select :shipment_state_eq, Spree::Order::SHIPMENT_STATES.map {|s| [Spree.t("shipment_states.#{s}"), s]}, { include_blank: true }, class: 'select2-clear js-filterable' %>
|
73
|
+
</div>
|
74
|
+
</div>
|
75
|
+
|
76
|
+
</div>
|
77
|
+
|
78
|
+
<div class="row">
|
79
|
+
|
80
|
+
<div class="col-12 col-lg-4">
|
81
|
+
<div class="form-group">
|
82
|
+
<%= label_tag :q_bill_address_firstname_start, Spree.t(:first_name_begins_with) %>
|
83
|
+
<%= f.text_field :bill_address_firstname_start, class: 'form-control js-filterable' %>
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div class="col-12 col-lg-4">
|
88
|
+
<div class="form-group">
|
89
|
+
<%= label_tag :q_bill_address_lastname_start, Spree.t(:last_name_begins_with) %>
|
90
|
+
<%= f.text_field :bill_address_lastname_start, class: 'form-control js-filterable' %>
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
|
94
|
+
<div class="col-12 col-lg-4">
|
95
|
+
<div class="form-group">
|
96
|
+
<%= label_tag :q_email_cont, Spree.t(:email) %>
|
97
|
+
<%= f.text_field :email_cont, class: 'form-control js-filterable' %>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
<div class="row">
|
104
|
+
|
105
|
+
<div class="col-12 col-lg-4">
|
106
|
+
<div class="form-group">
|
107
|
+
<%= label_tag :q_line_items_variant_sku_eq, Spree.t(:sku) %>
|
108
|
+
<%= f.text_field :line_items_variant_sku_eq, class: 'form-control js-filterable' %>
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
|
112
|
+
<div class="col-12 col-lg-4">
|
113
|
+
<div class="form-group">
|
114
|
+
<%= label_tag :q_promotions_id_in, Spree.t(:promotion) %>
|
115
|
+
<%= f.select :promotions_id_in, Spree::Promotion.applied.pluck(:name, :id), { include_blank: true }, class: 'select2-clear js-filterable' %>
|
116
|
+
</div>
|
117
|
+
</div>
|
118
|
+
|
119
|
+
<div class="col-12 col-lg-4">
|
120
|
+
<div class="form-group">
|
121
|
+
<%= label_tag :q_channel_eq, Spree.t(:channel) %>
|
122
|
+
<%= f.select :channel_eq, Spree::Order.distinct.pluck(:channel), { include_blank: true }, class: 'select2-clear js-filterable' %>
|
123
|
+
</div>
|
124
|
+
</div>
|
125
|
+
|
126
|
+
<div class="col-12">
|
127
|
+
<%= f.field_container :completed_at_not_null do %>
|
128
|
+
<div class="custom-control custom-checkbox">
|
129
|
+
<%= f.check_box :completed_at_not_null, {checked: @show_only_completed, class: 'custom-control-input'}, '1', '0' %>
|
130
|
+
<%= f.label :completed_at_not_null, Spree.t(:show_only_complete_orders), class: 'custom-control-label' %>
|
131
|
+
</div>
|
132
|
+
<% end %>
|
133
|
+
|
134
|
+
<%= f.field_container :considered_risky_eq do %>
|
135
|
+
<div class="custom-control custom-checkbox">
|
136
|
+
<%= f.check_box :considered_risky_eq, {checked: params[:q][:considered_risky_eq] == '1', class: 'custom-control-input'}, '1', '' %>
|
137
|
+
<%= f.label :considered_risky_eq, Spree.t(:show_only_considered_risky), class: 'custom-control-label' %>
|
138
|
+
</div>
|
139
|
+
<% end %>
|
140
|
+
</div>
|
141
|
+
</div>
|
142
|
+
|
143
|
+
<div data-hook="admin_orders_index_search_buttons" class="form-actions">
|
144
|
+
<%= button Spree.t(:filter_results), 'search.svg' %>
|
145
|
+
</div>
|
146
|
+
|
147
|
+
<% end %>
|
148
|
+
|
149
|
+
</div>
|
150
|
+
|
151
|
+
<% end %>
|
@@ -10,159 +10,10 @@
|
|
10
10
|
id: 'admin_new_order' %>
|
11
11
|
<% end if can? :create, Spree::Order %>
|
12
12
|
|
13
|
-
|
14
|
-
<div data-hook="admin_orders_index_search">
|
15
|
-
|
16
|
-
<%= search_form_for [:admin, @search] do |f| %>
|
17
|
-
<div class="row">
|
18
|
-
|
19
|
-
<div class="date-range-filter col-12 col-lg-8">
|
20
|
-
<div class="form-group">
|
21
|
-
<%= label_tag :q_created_at_gt, Spree.t(:date_range) %>
|
22
|
-
<div class="row pb-0">
|
23
|
-
<div class="col-12 col-md-6 mb-3 mb-md-0">
|
24
|
-
<div class="input-group datePickerFrom"
|
25
|
-
data-wrap="true"
|
26
|
-
data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>"
|
27
|
-
data-max-date="<%= params[:q][:created_at_lt] %>">
|
28
|
-
<%= f.text_field :created_at_gt,
|
29
|
-
class: 'form-control js-filterable shadow-none',
|
30
|
-
value: params[:q][:created_at_gt],
|
31
|
-
placeholder: Spree.t(:starting_from),
|
32
|
-
'data-input':'' %>
|
33
|
-
<%= render partial: 'spree/admin/shared/cal_close' %>
|
34
|
-
</div>
|
35
|
-
</div>
|
36
|
-
<div class="col-12 col-md-6 mt-3 mt-md-0">
|
37
|
-
<div class="input-group datePickerTo"
|
38
|
-
data-wrap="true"
|
39
|
-
data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>"
|
40
|
-
data-min-date="<%= params[:q][:created_at_gt] %>">
|
41
|
-
|
42
|
-
<%= f.text_field :created_at_lt,
|
43
|
-
class: 'form-control js-filterable shadow-none',
|
44
|
-
value: params[:q][:created_at_lt],
|
45
|
-
placeholder: Spree.t(:ending_at),
|
46
|
-
'data-input':'' %>
|
47
|
-
<%= render partial: 'spree/admin/shared/cal_close' %>
|
48
|
-
</div>
|
49
|
-
</div>
|
50
|
-
</div>
|
51
|
-
</div>
|
52
|
-
</div>
|
53
|
-
<div class="col-12 col-lg-4">
|
54
|
-
<div class="form-group">
|
55
|
-
<%= label_tag :q_number_cont, Spree.t(:search_order_number) %>
|
56
|
-
<%= f.text_field :number_cont, class: 'form-control js-quick-search-target js-filterable' %>
|
57
|
-
</div>
|
58
|
-
</div>
|
59
|
-
|
60
|
-
</div>
|
61
|
-
|
62
|
-
<div class="row">
|
63
|
-
|
64
|
-
<div class="col-12 col-lg-4">
|
65
|
-
<div class="form-group">
|
66
|
-
<%= label_tag :q_state_eq, Spree.t(:status) %>
|
67
|
-
<%= f.select :state_eq,
|
68
|
-
Spree::Order.state_machines[:state].states.map {|s| [Spree.t("order_state.#{s.name}"), s.value]},
|
69
|
-
{ include_blank: true },
|
70
|
-
class: 'select2-clear js-filterable' %>
|
71
|
-
</div>
|
72
|
-
</div>
|
73
|
-
|
74
|
-
<div class="col-12 col-lg-4">
|
75
|
-
<div class="form-group">
|
76
|
-
<%= label_tag :q_payment_state_eq, Spree.t(:payment_state) %>
|
77
|
-
<%= f.select :payment_state_eq, Spree::Order::PAYMENT_STATES.map {|s| [Spree.t("payment_states.#{s}"), s]}, { include_blank: true }, class: 'select2-clear js-filterable' %>
|
78
|
-
</div>
|
79
|
-
</div>
|
80
|
-
|
81
|
-
<div class="col-12 col-lg-4">
|
82
|
-
<div class="form-group">
|
83
|
-
<%= label_tag :q_shipment_state_eq, Spree.t(:shipment_state) %>
|
84
|
-
<%= f.select :shipment_state_eq, Spree::Order::SHIPMENT_STATES.map {|s| [Spree.t("shipment_states.#{s}"), s]}, { include_blank: true }, class: 'select2-clear js-filterable' %>
|
85
|
-
</div>
|
86
|
-
</div>
|
87
|
-
|
88
|
-
</div>
|
89
|
-
|
90
|
-
<div class="row">
|
91
|
-
|
92
|
-
<div class="col-12 col-lg-4">
|
93
|
-
<div class="form-group">
|
94
|
-
<%= label_tag :q_bill_address_firstname_start, Spree.t(:first_name_begins_with) %>
|
95
|
-
<%= f.text_field :bill_address_firstname_start, class: 'form-control js-filterable' %>
|
96
|
-
</div>
|
97
|
-
</div>
|
98
|
-
|
99
|
-
<div class="col-12 col-lg-4">
|
100
|
-
<div class="form-group">
|
101
|
-
<%= label_tag :q_bill_address_lastname_start, Spree.t(:last_name_begins_with) %>
|
102
|
-
<%= f.text_field :bill_address_lastname_start, class: 'form-control js-filterable' %>
|
103
|
-
</div>
|
104
|
-
</div>
|
105
|
-
|
106
|
-
<div class="col-12 col-lg-4">
|
107
|
-
<div class="form-group">
|
108
|
-
<%= label_tag :q_email_cont, Spree.t(:email) %>
|
109
|
-
<%= f.text_field :email_cont, class: 'form-control js-filterable' %>
|
110
|
-
</div>
|
111
|
-
</div>
|
112
|
-
|
113
|
-
</div>
|
114
|
-
|
115
|
-
<div class="row">
|
116
|
-
|
117
|
-
<div class="col-12 col-lg-4">
|
118
|
-
<div class="form-group">
|
119
|
-
<%= label_tag :q_line_items_variant_sku_eq, Spree.t(:sku) %>
|
120
|
-
<%= f.text_field :line_items_variant_sku_eq, class: 'form-control js-filterable' %>
|
121
|
-
</div>
|
122
|
-
</div>
|
123
|
-
|
124
|
-
<div class="col-12 col-lg-4">
|
125
|
-
<div class="form-group">
|
126
|
-
<%= label_tag :q_promotions_id_in, Spree.t(:promotion) %>
|
127
|
-
<%= f.select :promotions_id_in, Spree::Promotion.applied.pluck(:name, :id), { include_blank: true }, class: 'select2-clear js-filterable' %>
|
128
|
-
</div>
|
129
|
-
</div>
|
130
|
-
|
131
|
-
<div class="col-12 col-lg-4">
|
132
|
-
<div class="form-group">
|
133
|
-
<%= label_tag :q_channel_eq, Spree.t(:channel) %>
|
134
|
-
<%= f.select :channel_eq, Spree::Order.distinct.pluck(:channel), { include_blank: true }, class: 'select2-clear js-filterable' %>
|
135
|
-
</div>
|
136
|
-
</div>
|
137
|
-
|
138
|
-
<div class="col-12">
|
139
|
-
<%= f.field_container :completed_at_not_null do %>
|
140
|
-
<div class="custom-control custom-checkbox">
|
141
|
-
<%= f.check_box :completed_at_not_null, {checked: @show_only_completed, class: 'custom-control-input'}, '1', '0' %>
|
142
|
-
<%= f.label :completed_at_not_null, Spree.t(:show_only_complete_orders), class: 'custom-control-label' %>
|
143
|
-
</div>
|
144
|
-
<% end %>
|
145
|
-
|
146
|
-
<%= f.field_container :considered_risky_eq do %>
|
147
|
-
<div class="custom-control custom-checkbox">
|
148
|
-
<%= f.check_box :considered_risky_eq, {checked: params[:q][:considered_risky_eq] == '1', class: 'custom-control-input'}, '1', '' %>
|
149
|
-
<%= f.label :considered_risky_eq, Spree.t(:show_only_considered_risky), class: 'custom-control-label' %>
|
150
|
-
</div>
|
151
|
-
<% end %>
|
152
|
-
</div>
|
153
|
-
</div>
|
154
|
-
|
155
|
-
<div data-hook="admin_orders_index_search_buttons" class="form-actions">
|
156
|
-
<%= button Spree.t(:filter_results), 'search.svg' %>
|
157
|
-
</div>
|
158
|
-
|
159
|
-
<% end %>
|
160
|
-
|
161
|
-
</div>
|
162
|
-
|
163
|
-
<% end %>
|
13
|
+
<%= render "search" if @orders.any? || params[:q].present? %>
|
164
14
|
|
165
15
|
<% if @orders.any? %>
|
16
|
+
|
166
17
|
<div data-nav-x-wrapper>
|
167
18
|
<div data-nav-x-container>
|
168
19
|
<table class="table" id="listing_orders" data-hook data-nav-x-content>
|
@@ -13,13 +13,13 @@
|
|
13
13
|
<%= collection_select(:payment_method, :type, @providers, :to_s, :name, {}, {id: 'gtwy-type', class: 'select2'}) %>
|
14
14
|
</div>
|
15
15
|
<hr class="my-4">
|
16
|
-
<%= field_container :payment_method, :name,
|
16
|
+
<%= field_container :payment_method, :name, 'data-hook' => 'name' do %>
|
17
17
|
<%= label_tag :payment_method_name, Spree.t(:name) %>
|
18
18
|
<%= text_field :payment_method, :name, class: 'form-control' %>
|
19
19
|
<%= error_message_on :payment_method, :name %>
|
20
20
|
<% end %>
|
21
21
|
|
22
|
-
<%= field_container :payment_method, :description,
|
22
|
+
<%= field_container :payment_method, :description, 'data-hook' => 'description' do %>
|
23
23
|
<%= label_tag :payment_method_description, Spree.t(:description) %>
|
24
24
|
<%= text_area :payment_method, :description, { cols: 60, rows: 6, class: 'form-control' } %>
|
25
25
|
<% end %>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
</thead>
|
14
14
|
<tbody>
|
15
15
|
<% payments.each do |payment| %>
|
16
|
-
<tr id="<%= dom_id(payment) %>" data-hook="payments_row" data-number="<%= payment.number %>">
|
16
|
+
<tr id="<%= dom_id(payment) %>" data-hook="payments_row" data-number="<%= payment.number %>" data-id="<%= payment.id %>">
|
17
17
|
<td><%= link_to payment.number, spree.admin_order_payment_path(@order, payment) %></td>
|
18
18
|
<td><%= pretty_time(payment.created_at) %></td>
|
19
19
|
<td class="amount text-center"><%= payment.display_amount %></td>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
<div class="col-12 col-md-8" data-hook="admin_product_form_left">
|
5
5
|
<div data-hook="admin_product_form_name">
|
6
|
-
<%= f.field_container :name
|
6
|
+
<%= f.field_container :name do %>
|
7
7
|
<%= f.label :name, raw(Spree.t(:name) + required_span_tag) %>
|
8
8
|
<%= f.text_field :name, class: 'form-control title' %>
|
9
9
|
<%= f.error_message_on :name %>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
</div>
|
12
12
|
|
13
13
|
<div data-hook="admin_product_form_slug">
|
14
|
-
<%= f.field_container :slug
|
14
|
+
<%= f.field_container :slug do %>
|
15
15
|
<%= f.label :slug, raw(Spree.t(:slug) + required_span_tag) %>
|
16
16
|
<%= f.text_field :slug, class: 'form-control title' %>
|
17
17
|
<%= f.error_message_on :slug %>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
</div>
|
20
20
|
|
21
21
|
<div data-hook="admin_product_form_description">
|
22
|
-
<%= f.field_container :description
|
22
|
+
<%= f.field_container :description do %>
|
23
23
|
<%= f.label :description, Spree.t(:description) %>
|
24
24
|
<%= f.text_area :description, { rows: "#{unless @product.has_variants? then '29' else '30' end}", class: "form-control #{"spree-rte" if product_wysiwyg_editor_enabled? }" } %>
|
25
25
|
<%= f.error_message_on :description %>
|
@@ -29,7 +29,7 @@
|
|
29
29
|
|
30
30
|
<div class="col-12 col-md-4" data-hook="admin_product_form_right">
|
31
31
|
<div data-hook="admin_product_form_price">
|
32
|
-
<%= f.field_container :price
|
32
|
+
<%= f.field_container :price do %>
|
33
33
|
<%= f.label :price, raw(Spree.t(:master_price) + required_span_tag) %>
|
34
34
|
<div class="input-group">
|
35
35
|
<div class="input-group-prepend">
|
@@ -42,7 +42,7 @@
|
|
42
42
|
</div>
|
43
43
|
|
44
44
|
<div>
|
45
|
-
<%= f.field_container :compare_at_price
|
45
|
+
<%= f.field_container :compare_at_price do %>
|
46
46
|
<%= f.label :compare_at_price, Spree.t(:compare_at_price) %>
|
47
47
|
<div class="input-group">
|
48
48
|
<div class="input-group-prepend">
|
@@ -55,14 +55,14 @@
|
|
55
55
|
</div>
|
56
56
|
|
57
57
|
<div data-hook="admin_product_form_cost_price" class="alpha two columns">
|
58
|
-
<%= f.field_container :cost_price
|
58
|
+
<%= f.field_container :cost_price do %>
|
59
59
|
<%= f.label :cost_price, Spree.t(:cost_price) %>
|
60
60
|
<%= f.text_field :cost_price, value: number_to_currency(@product.cost_price, unit: ''), class: 'form-control' %>
|
61
61
|
<%= f.error_message_on :cost_price %>
|
62
62
|
<% end %>
|
63
63
|
</div>
|
64
64
|
<div data-hook="admin_product_form_cost_currency" class="omega two columns">
|
65
|
-
<%= f.field_container :cost_currency
|
65
|
+
<%= f.field_container :cost_currency do %>
|
66
66
|
<%= f.label :cost_currency, Spree.t(:cost_currency) %>
|
67
67
|
<%= f.select :cost_currency, currency_options(@product.cost_currency), {}, { class: 'select2' } %>
|
68
68
|
<%= f.error_message_on :cost_currency %>
|
@@ -70,7 +70,7 @@
|
|
70
70
|
</div>
|
71
71
|
|
72
72
|
<div data-hook="admin_product_form_available_on">
|
73
|
-
<%= f.field_container :available_on
|
73
|
+
<%= f.field_container :available_on do %>
|
74
74
|
<%= f.label :available_on, Spree.t(:available_on) %>
|
75
75
|
<%= f.error_message_on :available_on %>
|
76
76
|
|
@@ -91,7 +91,7 @@
|
|
91
91
|
</div>
|
92
92
|
|
93
93
|
<div data-hook="admin_product_form_discontinue_on">
|
94
|
-
<%= f.field_container :discontinue_on
|
94
|
+
<%= f.field_container :discontinue_on do %>
|
95
95
|
<%= f.label :discontinue_on, Spree.t(:discontinue_on) %>
|
96
96
|
<%= f.error_message_on :discontinue_on %>
|
97
97
|
|
@@ -112,7 +112,7 @@
|
|
112
112
|
</div>
|
113
113
|
|
114
114
|
<div data-hook="admin_product_form_promotionable">
|
115
|
-
<%= f.field_container :promotionable
|
115
|
+
<%= f.field_container :promotionable do %>
|
116
116
|
<%= f.check_box :promotionable %>
|
117
117
|
<%= f.label :promotionable, Spree.t(:promotionable) %>
|
118
118
|
<%= f.error_message_on :promotionable %>
|
@@ -120,7 +120,7 @@
|
|
120
120
|
</div>
|
121
121
|
|
122
122
|
<div data-hook="admin_product_form_sku">
|
123
|
-
<%= f.field_container :master_sku
|
123
|
+
<%= f.field_container :master_sku do %>
|
124
124
|
<%= f.label :master_sku, Spree.t(:master_sku) %>
|
125
125
|
<%= f.text_field :sku, size: 16, class: 'form-control' %>
|
126
126
|
<% end %>
|
@@ -181,7 +181,7 @@
|
|
181
181
|
<% end %>
|
182
182
|
|
183
183
|
<div data-hook="admin_product_form_shipping_categories">
|
184
|
-
<%= f.field_container :shipping_category
|
184
|
+
<%= f.field_container :shipping_category do %>
|
185
185
|
<%= f.label :shipping_category_id, Spree.t(:shipping_category) %>
|
186
186
|
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2' }) %>
|
187
187
|
<%= f.error_message_on :shipping_category %>
|
@@ -189,7 +189,7 @@
|
|
189
189
|
</div>
|
190
190
|
|
191
191
|
<div data-hook="admin_product_form_tax_category">
|
192
|
-
<%= f.field_container :tax_category
|
192
|
+
<%= f.field_container :tax_category do %>
|
193
193
|
<%= f.label :tax_category_id, Spree.t(:tax_category) %>
|
194
194
|
<%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2' }) %>
|
195
195
|
<%= f.error_message_on :tax_category %>
|
@@ -200,7 +200,7 @@
|
|
200
200
|
</div>
|
201
201
|
|
202
202
|
<div data-hook="admin_product_form_taxons">
|
203
|
-
<%= f.field_container :taxons
|
203
|
+
<%= f.field_container :taxons do %>
|
204
204
|
<%= f.label :taxon_ids, Spree.t(:taxons) %>
|
205
205
|
|
206
206
|
<% if can? :modify, Spree::Classification %>
|
@@ -224,7 +224,7 @@
|
|
224
224
|
</div>
|
225
225
|
|
226
226
|
<div data-hook="admin_product_form_option_types">
|
227
|
-
<%= f.field_container :option_types
|
227
|
+
<%= f.field_container :option_types do %>
|
228
228
|
<%= f.label :option_type_ids, Spree.t(:option_types) %>
|
229
229
|
|
230
230
|
<% if can? :modify, Spree::ProductOptionType %>
|
@@ -250,7 +250,7 @@
|
|
250
250
|
|
251
251
|
<% if @stores.count > 1 %>
|
252
252
|
<div data-hook="admin_product_form_stores">
|
253
|
-
<%= f.field_container :stores
|
253
|
+
<%= f.field_container :stores do %>
|
254
254
|
<%= f.label :product_stores, Spree.t(:stores) %>
|
255
255
|
<%= collection_select(:product, :store_ids, @stores, :id, :unique_name, {}, { multiple: true, class: 'select2' }) %>
|
256
256
|
<% end %>
|
@@ -259,21 +259,21 @@
|
|
259
259
|
|
260
260
|
<div data-hook="admin_product_form_meta">
|
261
261
|
<div data-hook="admin_product_form_meta_title">
|
262
|
-
<%= f.field_container :meta_title
|
262
|
+
<%= f.field_container :meta_title do %>
|
263
263
|
<%= f.label :meta_title, Spree.t(:meta_title) %>
|
264
264
|
<%= f.text_field :meta_title, class: 'form-control' %>
|
265
265
|
<% end %>
|
266
266
|
</div>
|
267
267
|
|
268
268
|
<div data-hook="admin_product_form_meta_keywords">
|
269
|
-
<%= f.field_container :meta_keywords
|
269
|
+
<%= f.field_container :meta_keywords do %>
|
270
270
|
<%= f.label :meta_keywords, Spree.t(:meta_keywords) %>
|
271
271
|
<%= f.text_field :meta_keywords, class: 'form-control' %>
|
272
272
|
<% end %>
|
273
273
|
</div>
|
274
274
|
|
275
275
|
<div data-hook="admin_product_form_meta_description">
|
276
|
-
<%= f.field_container :meta_description
|
276
|
+
<%= f.field_container :meta_description do %>
|
277
277
|
<%= f.label :meta_description, Spree.t(:meta_description) %>
|
278
278
|
<%= f.text_area :meta_description, class: 'form-control' %>
|
279
279
|
<% end %>
|