spree_backend 4.3.0 → 4.4.0
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 +64 -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/address_states.es6 +2 -0
- 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 +8 -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 +11 -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 +8 -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 +3 -4
- 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 -20
- data/app/views/spree/admin/products/index.html.erb +2 -1
- 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 +45 -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 +944 -0
- metadata +118 -36
- 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
@@ -1,5 +1,5 @@
|
|
1
1
|
<div data-hook="admin_named_type_form_fields">
|
2
|
-
<%= f.field_container :name
|
2
|
+
<%= f.field_container :name do %>
|
3
3
|
<%= f.label :name, Spree.t(:name) %> <span class="required">*</span>
|
4
4
|
<%= f.text_field :name, class: 'form-control' %>
|
5
5
|
<%= f.error_message_on :name %>
|
@@ -1,4 +1,7 @@
|
|
1
|
-
|
1
|
+
<% menu = parent_resource %>
|
2
|
+
<% item = child_resource %>
|
3
|
+
|
4
|
+
<div class="sortable-tree-item-row d-flex flex-nowrap">
|
2
5
|
<div class="move-handle d-flex align-items-center p-3">
|
3
6
|
<%= svg_icon(name: 'sort.svg', width: '20', height: '20') %>
|
4
7
|
</div>
|
@@ -14,13 +17,13 @@
|
|
14
17
|
<%= "| #{Spree.t('admin.navigation.code')}: #{item.code}" if item.code.present? %>
|
15
18
|
</small>
|
16
19
|
</div>
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
</div>
|
20
|
+
<% if item.icon.present? %>
|
21
|
+
<div class="ml-2">
|
22
|
+
<div class="item_image_holder">
|
23
|
+
<%= image_tag main_app.url_for(item.icon.attachment) %>
|
22
24
|
</div>
|
23
|
-
|
25
|
+
</div>
|
26
|
+
<% end %>
|
24
27
|
</div>
|
25
28
|
|
26
29
|
<div class="d-flex align-items-center space-buttons px-2">
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<% taxonomy = parent_resource %>
|
2
|
+
<% taxon = child_resource %>
|
3
|
+
|
4
|
+
<div class="sortable-tree-item-row d-flex flex-nowrap">
|
5
|
+
<div class="move-handle d-flex align-items-center p-3">
|
6
|
+
<%= svg_icon(name: 'sort.svg', width: '20', height: '20') %>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<div class="d-flex align-items-center overflow-hidden w-100">
|
10
|
+
<div class="overflow-hidden">
|
11
|
+
<%= taxon.name %>
|
12
|
+
<!-- TODO: Taxon Paths do not update in view, fix with Turbo Frames.
|
13
|
+
<h6 class="form-text text-muted mt-0 mb-1">
|
14
|
+
<span class="badge badge-light badge-light-muted-text"><%#= svg_icon(name: 'link.svg', width: '16', height: '16') %> <%= taxon.permalink %></span>
|
15
|
+
</h6>
|
16
|
+
-->
|
17
|
+
<small class="form-text text-muted mt-0 mb-1">
|
18
|
+
<%= Spree.t('admin.taxonomies.submenu') %>: <%= active_badge(!taxon.hide_from_nav) %>
|
19
|
+
</small>
|
20
|
+
</div>
|
21
|
+
<% if taxon.icon.present? %>
|
22
|
+
<div class="ml-2">
|
23
|
+
<div class="item_image_holder">
|
24
|
+
<%= image_tag main_app.url_for(taxon.icon.attachment) %>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<div class="d-flex align-items-center space-buttons px-2">
|
31
|
+
<%= link_to_edit(taxon, no_text: true, url: spree.edit_admin_taxonomy_taxon_path(taxonomy, taxon.id)) %>
|
32
|
+
<%= link_to_delete(taxon, no_text: true, url: spree.admin_taxonomy_taxon_path(taxonomy, taxon.id)) if can?(:destroy, taxon) %>
|
33
|
+
</div>
|
34
|
+
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div data-hook="admin_shipping_category_form_fields">
|
2
2
|
<div data-hook="name" class="form-group">
|
3
|
-
<%= f.field_container :name
|
3
|
+
<%= f.field_container :name do %>
|
4
4
|
<%= f.label :name, Spree.t(:name) %><br>
|
5
5
|
<%= f.text_field :name, class: 'form-control' %>
|
6
6
|
<%= f.error_message_on :name %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div data-hook="admin_shipping_method_form_fields">
|
2
2
|
<div class="row">
|
3
3
|
<div data-hook="admin_shipping_method_form_name_field" class="col-12 col-lg-6">
|
4
|
-
<%= f.field_container :name
|
4
|
+
<%= f.field_container :name do %>
|
5
5
|
<%= f.label :name, Spree.t(:name) %>
|
6
6
|
<%= f.text_field :name, class: 'form-control' %>
|
7
7
|
<%= f.error_message_on :name %>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
</div>
|
10
10
|
|
11
11
|
<div data-hook="admin_shipping_method_form_display_field" class="col-12 col-lg-6">
|
12
|
-
<%= f.field_container :display_on
|
12
|
+
<%= f.field_container :display_on do %>
|
13
13
|
<%= f.label :display_on, Spree.t(:display) %>
|
14
14
|
<%= select(:shipping_method, :display_on, Spree::ShippingMethod::DISPLAY.collect { |display| [Spree.t(display), display.to_s] }, { include_blank: true }, { class: 'select2-clear' }) %>
|
15
15
|
<%= f.error_message_on :display_on %>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
|
20
20
|
<div class="row">
|
21
21
|
<div data-hook="admin_shipping_method_form_internal_name_field" class="col-12 col-lg-4">
|
22
|
-
<%= f.field_container :admin_name
|
22
|
+
<%= f.field_container :admin_name do %>
|
23
23
|
<%= f.label :admin_name, Spree.t(:internal_name) %>
|
24
24
|
<%= f.text_field :admin_name, class: 'form-control', label: false %>
|
25
25
|
<%= f.error_message_on :admin_name %>
|
@@ -27,7 +27,7 @@
|
|
27
27
|
</div>
|
28
28
|
|
29
29
|
<div data-hook="admin_shipping_method_form_code" class="col-12 col-lg-4">
|
30
|
-
<%= f.field_container :code
|
30
|
+
<%= f.field_container :code do %>
|
31
31
|
<%= f.label :code, Spree.t(:code) %>
|
32
32
|
<%= f.text_field :code, class: 'form-control', label: false %>
|
33
33
|
<%= f.error_message_on :code %>
|
@@ -35,7 +35,7 @@
|
|
35
35
|
</div>
|
36
36
|
|
37
37
|
<div data-hook="admin_shipping_method_form_tracking_url_field" class="col-12 col-lg-4">
|
38
|
-
<%= f.field_container :tracking_url
|
38
|
+
<%= f.field_container :tracking_url do %>
|
39
39
|
<%= f.label :tracking_url, Spree.t(:tracking_url) %>
|
40
40
|
<%= f.text_field :tracking_url, class: 'form-control', placeholder: Spree.t(:tracking_url_placeholder) %>
|
41
41
|
<%= f.error_message_on :tracking_url %>
|
@@ -54,7 +54,7 @@
|
|
54
54
|
</div>
|
55
55
|
|
56
56
|
<div class="card-body">
|
57
|
-
<%= f.field_container :categories
|
57
|
+
<%= f.field_container :categories do %>
|
58
58
|
<% Spree::ShippingCategory.all.each do |category| %>
|
59
59
|
<div class="checkbox">
|
60
60
|
<%= label_tag do %>
|
@@ -78,7 +78,7 @@
|
|
78
78
|
</div>
|
79
79
|
|
80
80
|
<div class="card-body">
|
81
|
-
<%= f.field_container :zones
|
81
|
+
<%= f.field_container :zones do %>
|
82
82
|
<% shipping_method_zones = @shipping_method.zones.to_a %>
|
83
83
|
<% Spree::Zone.all.each do |zone| %>
|
84
84
|
<div class="checkbox">
|
@@ -109,7 +109,7 @@
|
|
109
109
|
</div>
|
110
110
|
|
111
111
|
<div class="card-body">
|
112
|
-
<%= f.field_container :categories
|
112
|
+
<%= f.field_container :categories do %>
|
113
113
|
<%= f.select :tax_category_id, @tax_categories.map { |tc| [tc.name, tc.id] }, { include_blank: true }, class: "select2-clear" %>
|
114
114
|
<%= f.error_message_on :tax_category_id %>
|
115
115
|
<% end %>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
<div data-hook="admin_state_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) %>
|
5
5
|
<%= f.text_field :name, class: 'form-control' %>
|
6
6
|
<%= f.error_message_on :name %>
|
7
7
|
<% end %>
|
8
8
|
</div>
|
9
9
|
<div class="col-12 col-md-6">
|
10
|
-
<%= f.field_container :abbr
|
10
|
+
<%= f.field_container :abbr do %>
|
11
11
|
<%= f.label :abbr, Spree.t(:abbreviation) %>
|
12
12
|
<%= f.text_field :abbr, class: 'form-control' %>
|
13
13
|
<% end %>
|
@@ -2,14 +2,14 @@
|
|
2
2
|
<div class="row">
|
3
3
|
<div class="col-12 col-md-9" data-hook="stock_location_names">
|
4
4
|
<div data-hook="stock_location_name">
|
5
|
-
<%= f.field_container :name
|
5
|
+
<%= f.field_container :name do %>
|
6
6
|
<%= f.label :name, Spree.t(:name) %> <span class="required">*</span><br>
|
7
7
|
<%= f.text_field :name, class: 'form-control', required: true %>
|
8
8
|
<%= f.error_message_on :name %>
|
9
9
|
<% end %>
|
10
10
|
</div>
|
11
11
|
<div data-hook="stock_location_admin_name">
|
12
|
-
<%= f.field_container :admin_name
|
12
|
+
<%= f.field_container :admin_name do %>
|
13
13
|
<%= f.label :admin_name, Spree.t(:internal_name) %>
|
14
14
|
<%= f.text_field :admin_name, class: 'form-control', label: false %>
|
15
15
|
<% end %>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<div data-hook="admin_stock_movements_form_fields">
|
2
|
-
<%= f.field_container :quantity
|
2
|
+
<%= f.field_container :quantity do %>
|
3
3
|
<%= f.label :quantity, Spree.t(:quantity) %>
|
4
4
|
<%= f.text_field :quantity, class: 'form-control' %>
|
5
5
|
<% end %>
|
6
|
-
<%= f.field_container :stock_item_id
|
6
|
+
<%= f.field_container :stock_item_id do %>
|
7
7
|
<%= f.label :stock_item_id, Spree.t(:stock_item_id) %>
|
8
|
-
<%= select_tag 'stock_movement[stock_item_id]', nil , class: '
|
8
|
+
<%= select_tag 'stock_movement[stock_item_id]', nil , id: 'stock_movement_stock_item_id', class: 'd-block w-100', :'data-stock-location-id' => params[:stock_location_id] %>
|
9
9
|
<% end %>
|
10
10
|
</div>
|
11
11
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div data-hook="admin_store_credit_category_form_fields">
|
2
|
-
<%= f.field_container :name,
|
2
|
+
<%= f.field_container :name, 'data-hook' => 'store_credit_category_name' do %>
|
3
3
|
<%= f.label :name, Spree.t(:name) %> <span class="required">*</span>
|
4
4
|
<%= f.text_field :name, class: 'form-control' %>
|
5
5
|
<%= f.error_message_on :name %>
|
@@ -1,21 +1,21 @@
|
|
1
1
|
<div data-hook='admin_store_credit_form_fields'>
|
2
|
-
<%= f.field_container :amount
|
2
|
+
<%= f.field_container :amount do %>
|
3
3
|
<%= f.label :amount, raw(Spree.t(:amount) + required_span_tag) %>
|
4
4
|
<%= f.text_field :amount, class: 'form-control' %>
|
5
5
|
<%= f.error_message_on :amount %>
|
6
6
|
<% end %>
|
7
|
-
<%= f.field_container :currency
|
7
|
+
<%= f.field_container :currency do %>
|
8
8
|
<%= f.label :currency, raw(Spree.t(:currency) + required_span_tag) %>
|
9
9
|
<%= f.select :currency, currency_options(f.object.currency) %>
|
10
10
|
<%= f.error_message_on :currency %>
|
11
11
|
<% end %>
|
12
|
-
<%= f.field_container :category
|
12
|
+
<%= f.field_container :category do %>
|
13
13
|
<%= f.label :category, raw(Spree.t(:category) + required_span_tag) %>
|
14
14
|
<%= f.select :category_id, options_from_collection_for_select(@credit_categories, :id, :name, f.object.category.try(:id)),
|
15
15
|
{ include_blank: true }, { class: 'select2 fullwidth', placeholder: Spree.t(:select_a_store_credit_reason) } %>
|
16
16
|
<%= f.error_message_on :category %>
|
17
17
|
<% end %>
|
18
|
-
<%= f.field_container :memo
|
18
|
+
<%= f.field_container :memo do %>
|
19
19
|
<%= f.label :memo, Spree.t(:memo) %>
|
20
20
|
<%= f.text_area :memo, class: 'form-control' %>
|
21
21
|
<%= f.error_message_on :memo %>
|