spree_backend 4.3.3 → 4.4.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (263) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +222 -0
  3. data/.codeclimate.yml +36 -0
  4. data/.editorconfig +22 -0
  5. data/.eslintignore +7 -0
  6. data/.eslintrc.cjs +29 -0
  7. data/.gem_release.yml +4 -0
  8. data/.github/CONTRIBUTING.md +1 -0
  9. data/.github/ISSUE_TEMPLATE/bug_report.md +47 -0
  10. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  11. data/.github/ISSUE_TEMPLATE.md +39 -0
  12. data/.github/dependabot.yml +7 -0
  13. data/.github/workflows/spelling_lint.yml +34 -0
  14. data/.gitignore +63 -0
  15. data/.rubocop.yml +197 -0
  16. data/.solargraph.yml +20 -0
  17. data/.stylelintignore +4 -0
  18. data/.stylelintrc +6 -0
  19. data/CODE_OF_CONDUCT.md +22 -0
  20. data/Gemfile +59 -3
  21. data/README.md +123 -0
  22. data/SECURITY.md +1 -0
  23. data/app/assets/config/spree_backend_manifest.js +1 -1
  24. data/app/assets/images/backend-cloud-arrow-up.svg +4 -0
  25. data/app/assets/images/backend-eye-open.svg +1 -1
  26. data/app/assets/images/backend-file-earmark-font.svg +4 -0
  27. data/app/assets/images/backend-file-earmark-image.svg +4 -0
  28. data/app/assets/images/backend-file-earmark-music.svg +4 -0
  29. data/app/assets/images/backend-file-earmark-pdf.svg +4 -0
  30. data/app/assets/images/backend-file-earmark-play.svg +4 -0
  31. data/app/assets/images/backend-file-earmark-spreadsheet.svg +3 -0
  32. data/app/assets/images/backend-file-earmark-zip.svg +4 -0
  33. data/app/assets/images/backend-file-earmark.svg +3 -0
  34. data/app/assets/images/backend-hdd.svg +4 -0
  35. data/app/assets/images/backend-link.svg +4 -0
  36. data/app/assets/images/backend-view.svg +1 -1
  37. data/app/assets/javascripts/spree/backend/adjustments.js +5 -5
  38. data/app/assets/javascripts/spree/backend/admin.js +4 -6
  39. data/app/assets/javascripts/spree/backend/calculator.js +1 -1
  40. data/app/assets/javascripts/spree/backend/checkouts/edit.js +1 -1
  41. data/app/assets/javascripts/spree/backend/cms/links.es6 +1 -1
  42. data/app/assets/javascripts/spree/backend/cms/live_preview.es6 +1 -1
  43. data/app/assets/javascripts/spree/backend/cms/page.es6 +22 -40
  44. data/app/assets/javascripts/spree/backend/cms/section.es6 +1 -1
  45. data/app/assets/javascripts/spree/backend/gateway.js +1 -1
  46. data/app/assets/javascripts/spree/backend/general_settings.js +1 -1
  47. data/app/assets/javascripts/spree/backend/global/_index.js +3 -1
  48. data/app/assets/javascripts/spree/backend/global/alerts.es6 +1 -1
  49. data/app/assets/javascripts/spree/backend/global/animate_css.es6 +19 -0
  50. data/app/assets/javascripts/spree/backend/global/fetch_request_utility.es6 +114 -0
  51. data/app/assets/javascripts/spree/backend/global/flatpickr.es6 +2 -1
  52. data/app/assets/javascripts/spree/backend/global/info_alert.es6 +1 -1
  53. data/app/assets/javascripts/spree/backend/global/radio_panel_toggle.es6 +1 -1
  54. data/app/assets/javascripts/spree/backend/global/ransack.es6 +7 -5
  55. data/app/assets/javascripts/spree/backend/global/responsive_menus.es6 +1 -1
  56. data/app/assets/javascripts/spree/backend/global/select2_autocomplete.es6 +4 -4
  57. data/app/assets/javascripts/spree/backend/global/select2_populate.es6 +2 -2
  58. data/app/assets/javascripts/spree/backend/global/side_scroll_indication.es6 +2 -2
  59. data/app/assets/javascripts/spree/backend/global/sortable.es6 +1 -1
  60. data/app/assets/javascripts/spree/backend/global/tinymce.es6 +3 -2
  61. data/app/assets/javascripts/spree/backend/line_items.js +7 -9
  62. data/app/assets/javascripts/spree/backend/line_items_on_order_edit.js +23 -28
  63. data/app/assets/javascripts/spree/backend/menus/_index.es6 +0 -1
  64. data/app/assets/javascripts/spree/backend/menus/menu_item.es6 +1 -1
  65. data/app/assets/javascripts/spree/backend/multi_currency.js +2 -2
  66. data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +1 -1
  67. data/app/assets/javascripts/spree/backend/orders/edit.js +1 -1
  68. data/app/assets/javascripts/spree/backend/payments/edit.js +32 -22
  69. data/app/assets/javascripts/spree/backend/payments/new.js +1 -1
  70. data/app/assets/javascripts/spree/backend/product_picker.js +16 -25
  71. data/app/assets/javascripts/spree/backend/progress.js +5 -3
  72. data/app/assets/javascripts/spree/backend/promotions.js +3 -1
  73. data/app/assets/javascripts/spree/backend/returns/expedited_exchanges_warning.js +1 -1
  74. data/app/assets/javascripts/spree/backend/returns/return_item_selection.js +1 -1
  75. data/app/assets/javascripts/spree/backend/shipments.js +80 -79
  76. data/app/assets/javascripts/spree/backend/spree-select2.js +1 -1
  77. data/app/assets/javascripts/spree/backend/states.js +1 -1
  78. data/app/assets/javascripts/spree/backend/stock_location.js +1 -1
  79. data/app/assets/javascripts/spree/backend/stock_management.js +1 -1
  80. data/app/assets/javascripts/spree/backend/stock_movement.js +58 -13
  81. data/app/assets/javascripts/spree/backend/stock_transfer.js +62 -32
  82. data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +9 -8
  83. data/app/assets/javascripts/spree/backend/taxons.js +17 -14
  84. data/app/assets/javascripts/spree/backend/user_picker.js +1 -1
  85. data/app/assets/javascripts/spree/backend/users/edit.js +1 -1
  86. data/app/assets/javascripts/spree/backend/variant_autocomplete.js +19 -11
  87. data/app/assets/javascripts/spree/backend/variant_management.js +1 -1
  88. data/app/assets/javascripts/spree/backend/zone.js +1 -1
  89. data/app/assets/javascripts/spree/backend.js +13 -33
  90. data/app/assets/javascripts/spree.js +2 -9
  91. data/app/assets/stylesheets/spree/backend/components/_main.scss +8 -0
  92. data/app/assets/stylesheets/spree/backend/plugins/_nav_x.scss +1 -1
  93. data/app/assets/stylesheets/spree/backend/plugins/_select2_custom.scss +1 -1
  94. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +1 -1
  95. data/app/assets/stylesheets/spree/backend/shared/_sortable_tree.scss +62 -0
  96. data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +3 -0
  97. data/app/assets/stylesheets/spree/backend/views/_digitals.scss +33 -0
  98. data/app/assets/stylesheets/spree/backend/views/_taxonomies.scss +3 -0
  99. data/app/controllers/spree/admin/base_controller.rb +4 -13
  100. data/app/controllers/spree/admin/digitals_controller.rb +33 -0
  101. data/app/controllers/spree/admin/general_settings_controller.rb +0 -5
  102. data/app/controllers/spree/admin/images_controller.rb +1 -1
  103. data/app/controllers/spree/admin/oauth_applications_controller.rb +17 -0
  104. data/app/controllers/spree/admin/orders/customer_details_controller.rb +2 -2
  105. data/app/controllers/spree/admin/orders_controller.rb +10 -2
  106. data/app/controllers/spree/admin/payment_methods_controller.rb +2 -2
  107. data/app/controllers/spree/admin/payments_controller.rb +1 -1
  108. data/app/controllers/spree/admin/products_controller.rb +4 -2
  109. data/app/controllers/spree/admin/promotions_controller.rb +1 -1
  110. data/app/controllers/spree/admin/properties_controller.rb +1 -1
  111. data/app/controllers/spree/admin/resource_controller.rb +9 -4
  112. data/app/controllers/spree/admin/return_index_controller.rb +1 -1
  113. data/app/controllers/spree/admin/stock_transfers_controller.rb +2 -2
  114. data/app/controllers/spree/admin/store_credits_controller.rb +2 -2
  115. data/app/controllers/spree/admin/stores_controller.rb +2 -2
  116. data/app/controllers/spree/admin/taxons_controller.rb +23 -38
  117. data/app/controllers/spree/admin/users_controller.rb +6 -19
  118. data/app/controllers/spree/admin/variants_controller.rb +1 -2
  119. data/app/controllers/spree/admin/webhooks_subscribers_controller.rb +48 -0
  120. data/app/helpers/spree/admin/base_helper.rb +27 -9
  121. data/app/helpers/spree/admin/digital_helper.rb +28 -0
  122. data/app/helpers/spree/admin/menu_helper.rb +0 -21
  123. data/app/helpers/spree/admin/navigation_helper.rb +19 -9
  124. data/app/helpers/spree/admin/sortable_tree_helper.rb +31 -0
  125. data/app/helpers/spree/admin/stores_helper.rb +1 -1
  126. data/app/helpers/spree/admin/webhooks_subscribers_helper.rb +31 -0
  127. data/app/javascript/spree/dashboard/controllers/clipboard_controller.js +12 -0
  128. data/app/javascript/spree/dashboard/controllers/password_toggle_controller.js +14 -0
  129. data/app/javascript/spree/dashboard/controllers/sortable_tree_controller.js +55 -0
  130. data/app/javascript/spree/dashboard/controllers/spree_controller.js +25 -0
  131. data/app/javascript/spree/dashboard/controllers/upload_button_controller.js +13 -0
  132. data/app/javascript/spree/dashboard/controllers/webhooks_subscriber_events_controller.js +19 -0
  133. data/app/javascript/spree/dashboard/index.js +49 -0
  134. data/app/{assets/javascripts/spree/backend/global/bootstrap.es6 → javascript/spree/dashboard/utilities/bootstrap.js} +6 -2
  135. data/app/javascript/spree/dashboard/utilities/request_utility.js +54 -0
  136. data/app/models/spree/backend_configuration.rb +11 -0
  137. data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +2 -2
  138. data/app/views/spree/admin/adjustments/_form.html.erb +2 -2
  139. data/app/views/spree/admin/adjustments/index.html.erb +1 -0
  140. data/app/views/spree/admin/cms_pages/_form.html.erb +8 -8
  141. data/app/views/spree/admin/cms_pages/edit.html.erb +1 -6
  142. data/app/views/spree/admin/cms_sections/_form.html.erb +2 -2
  143. data/app/views/spree/admin/cms_sections/types/_featured_article.html.erb +6 -6
  144. data/app/views/spree/admin/cms_sections/types/_hero_image.html.erb +6 -6
  145. data/app/views/spree/admin/cms_sections/types/_image_gallery.html.erb +12 -12
  146. data/app/views/spree/admin/cms_sections/types/_rich_text_content.html.erb +1 -1
  147. data/app/views/spree/admin/cms_sections/types/_side_by_side_images.html.erb +12 -12
  148. data/app/views/spree/admin/countries/_form.html.erb +4 -4
  149. data/app/views/spree/admin/customer_returns/new.html.erb +1 -1
  150. data/app/views/spree/admin/digitals/_form.html.erb +35 -0
  151. data/app/views/spree/admin/digitals/index.html.erb +25 -0
  152. data/app/views/spree/admin/general_settings/edit.html.erb +1 -22
  153. data/app/views/spree/admin/menu_items/_form.html.erb +6 -6
  154. data/app/views/spree/admin/menus/_form.html.erb +3 -3
  155. data/app/views/spree/admin/menus/edit.html.erb +18 -18
  156. data/app/views/spree/admin/oauth_applications/_form.html.erb +22 -0
  157. data/app/views/spree/admin/oauth_applications/create.turbo_stream.erb +38 -0
  158. data/app/views/spree/admin/oauth_applications/edit.html.erb +13 -0
  159. data/app/views/spree/admin/oauth_applications/index.html.erb +51 -0
  160. data/app/views/spree/admin/oauth_applications/new.html.erb +15 -0
  161. data/app/views/spree/admin/option_types/_form.html.erb +3 -3
  162. data/app/views/spree/admin/option_types/_option_value_fields.html.erb +2 -2
  163. data/app/views/spree/admin/orders/_channel_form.html.erb +1 -1
  164. data/app/views/spree/admin/orders/_form.html.erb +1 -0
  165. data/app/views/spree/admin/orders/_line_items_edit_form.html.erb +1 -0
  166. data/app/views/spree/admin/orders/_order_actions.html.erb +6 -0
  167. data/app/views/spree/admin/orders/_search.html.erb +151 -0
  168. data/app/views/spree/admin/orders/index.html.erb +2 -151
  169. data/app/views/spree/admin/payment_methods/_form.html.erb +2 -2
  170. data/app/views/spree/admin/payments/_list.html.erb +1 -1
  171. data/app/views/spree/admin/products/_form.html.erb +19 -19
  172. data/app/views/spree/admin/products/index.html.erb +2 -0
  173. data/app/views/spree/admin/products/new.html.erb +6 -6
  174. data/app/views/spree/admin/promotion_actions/create.js.erb +1 -1
  175. data/app/views/spree/admin/promotion_categories/_form.html.erb +2 -2
  176. data/app/views/spree/admin/promotions/_form.html.erb +5 -5
  177. data/app/views/spree/admin/properties/_form.html.erb +3 -3
  178. data/app/views/spree/admin/prototypes/_form.html.erb +4 -4
  179. data/app/views/spree/admin/refunds/new.html.erb +2 -2
  180. data/app/views/spree/admin/reimbursement_types/_form.html.erb +2 -2
  181. data/app/views/spree/admin/return_authorizations/_form.html.erb +3 -3
  182. data/app/views/spree/admin/roles/_form.html.erb +1 -1
  183. data/app/views/spree/admin/shared/_account_nav.html.erb +1 -1
  184. data/app/views/spree/admin/shared/_address_form.html.erb +4 -4
  185. data/app/views/spree/admin/shared/_head.html.erb +4 -8
  186. data/app/views/spree/admin/shared/_main_menu.html.erb +12 -0
  187. data/app/views/spree/admin/shared/_new_resource_links.html.erb +1 -1
  188. data/app/views/spree/admin/shared/_product_tabs.html.erb +8 -0
  189. data/app/views/spree/admin/shared/_version.html.erb +1 -1
  190. data/app/views/spree/admin/shared/cms/_spree_product.html.erb +2 -2
  191. data/app/views/spree/admin/shared/cms/_spree_taxon.html.erb +2 -2
  192. data/app/views/spree/admin/shared/linkables/_spree_cms_page.erb +2 -2
  193. data/app/views/spree/admin/shared/linkables/_spree_product.html.erb +2 -2
  194. data/app/views/spree/admin/shared/linkables/_spree_taxon.html.erb +2 -2
  195. data/app/views/spree/admin/shared/linkables/_url.html.erb +1 -1
  196. data/app/views/spree/admin/shared/named_types/_form.html.erb +1 -1
  197. data/app/views/spree/admin/{menus/nested_menu_items/_item_bar.html.erb → shared/sortable_tree/_menu.html.erb} +10 -7
  198. data/app/views/spree/admin/shared/sortable_tree/_taxonomy.html.erb +34 -0
  199. data/app/views/spree/admin/shared/sub_menu/_apps.html.erb +3 -0
  200. data/app/views/spree/admin/shared/sub_menu/_integrations.html.erb +3 -0
  201. data/app/views/spree/admin/shipping_categories/_form.html.erb +1 -1
  202. data/app/views/spree/admin/shipping_methods/_form.html.erb +8 -8
  203. data/app/views/spree/admin/states/_form.html.erb +2 -2
  204. data/app/views/spree/admin/stock_locations/_form.html.erb +2 -2
  205. data/app/views/spree/admin/stock_movements/_form.html.erb +3 -3
  206. data/app/views/spree/admin/store_credit_categories/_form.html.erb +1 -1
  207. data/app/views/spree/admin/store_credits/_form.html.erb +4 -4
  208. data/app/views/spree/admin/stores/_form.html.erb +280 -227
  209. data/app/views/spree/admin/tax_categories/_form.html.erb +4 -4
  210. data/app/views/spree/admin/tax_rates/_form.html.erb +4 -3
  211. data/app/views/spree/admin/taxonomies/_form.html.erb +2 -2
  212. data/app/views/spree/admin/taxonomies/edit.html.erb +34 -29
  213. data/app/views/spree/admin/taxons/_form.html.erb +101 -57
  214. data/app/views/spree/admin/taxons/edit.html.erb +6 -3
  215. data/app/views/spree/admin/taxons/index.html.erb +1 -1
  216. data/app/views/spree/admin/taxons/new.html.erb +16 -0
  217. data/app/views/spree/admin/users/_form.html.erb +3 -3
  218. data/app/views/spree/admin/users/edit.html.erb +0 -40
  219. data/app/views/spree/admin/variants/_autocomplete.js.erb +5 -5
  220. data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +2 -2
  221. data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +6 -6
  222. data/app/views/spree/admin/variants/_split.js.erb +1 -1
  223. data/app/views/spree/admin/variants/index.html.erb +4 -1
  224. data/app/views/spree/admin/webhooks_subscribers/_form.html.erb +101 -0
  225. data/app/views/spree/admin/webhooks_subscribers/edit.html.erb +13 -0
  226. data/app/views/spree/admin/webhooks_subscribers/index.html.erb +47 -0
  227. data/app/views/spree/admin/webhooks_subscribers/new.html.erb +13 -0
  228. data/app/views/spree/admin/webhooks_subscribers/show.html.erb +59 -0
  229. data/app/views/spree/admin/zones/_country_members.html.erb +1 -1
  230. data/app/views/spree/admin/zones/_form.html.erb +2 -2
  231. data/app/views/spree/admin/zones/_state_members.html.erb +1 -1
  232. data/app/views/spree/layouts/admin.html.erb +1 -11
  233. data/codespell.txt +8 -0
  234. data/config/locales/en.yml +273 -0
  235. data/config/routes.rb +8 -4
  236. data/lib/generators/spree/backend/install/install_generator.rb +4 -2
  237. data/lib/generators/spree/backend/install/templates/app/javascript/spree-dashboard.js +7 -0
  238. data/lib/spree/backend/engine.rb +2 -1
  239. data/lib/spree/backend/testing_support/capybara_utils.rb +53 -0
  240. data/lib/spree/backend/testing_support/flash.rb +38 -0
  241. data/lib/spree/backend/testing_support/flatpickr_capybara.rb +126 -0
  242. data/lib/spree/backend/version.rb +9 -0
  243. data/lib/spree/backend.rb +2 -1
  244. data/lib/spree_backend.rb +17 -0
  245. data/license.md +13 -0
  246. data/package.json +46 -0
  247. data/rollup.config.js +41 -0
  248. data/spree_backend.gemspec +17 -16
  249. data/vendor/assets/javascripts/purify.js +1 -1
  250. data/vendor/assets/stylesheets/animate.css +2 -4
  251. data/yarn.lock +959 -0
  252. metadata +120 -38
  253. data/app/assets/javascripts/spree/backend/menus/menu.es6 +0 -57
  254. data/app/assets/javascripts/spree/backend/taxon_permalink_preview.js +0 -11
  255. data/app/assets/javascripts/spree/backend/taxon_tree_menu.js +0 -35
  256. data/app/assets/javascripts/spree/backend/taxonomy.js +0 -178
  257. data/app/views/spree/admin/taxonomies/_js_head.html.erb +0 -7
  258. data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +0 -4564
  259. data/vendor/assets/javascripts/js.cookie.js +0 -163
  260. data/vendor/assets/javascripts/modernizr.js +0 -3
  261. data/vendor/assets/stylesheets/jquery.jstree/themes/spree/style.scss +0 -230
  262. data/vendor/assets/stylesheets/jquery.jstree/themes/spree/throbber.gif +0 -0
  263. /data/app/assets/stylesheets/spree/backend/views/{prototypes.scss → _prototypes.scss} +0 -0
@@ -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, class: ['form-group'] do %>
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, class: ['form-group'] do %>
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, class: ['form-group'] do %>
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, class: ['form-group'] do %>
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, class: ['form-group'] do %>
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, class: ['form-group'] do %>
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: 'variant_autocomplete d-block w-100', :'data-stock-location-id' => params[:stock_location_id] %>
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, class: ['form-group'], 'data-hook' => 'store_credit_category_name' do %>
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, class: %w[form-group] do %>
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, class: %w[form-group] do %>
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, class: %w[form-group] do %>
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, class: %w[form-group] do %>
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 %>
@@ -1,259 +1,312 @@
1
1
  <div data-hook="admin_store_form_fields">
2
-
3
- <div class="card mb-4">
4
- <div class="card-header">
5
- <h1 class="card-title mb-0 h5">
6
- <%= Spree.t(:basic_information) %>
7
- </h1>
8
- </div>
9
- <div class="card-body">
10
- <%= f.field_container :logo, class: ['form-group'] do %>
11
- <% if @store.logo.attached? && @store.logo.variable? %>
12
- <%= image_tag main_app.url_for(@store.logo.variant(resize: '244x104>')) %>
13
- <% elsif @store.logo.attached? && @store.logo.image? %>
14
- <%= image_tag main_app.url_for(@store.logo) %>
15
- <% end %>
16
- <%= f.field_container :logo, class: ['form-group'] do %>
17
- <%= f.label :logo, Spree.t(:logo) %><br>
18
- <%= f.file_field :logo %>
19
- <%= f.error_message_on :logo %>
2
+ <div class="card mb-4">
3
+ <div class="card-header">
4
+ <h1 class="card-title mb-0 h5">
5
+ <%= Spree.t(:basic_information) %>
6
+ </h1>
7
+ </div>
8
+ <div class="card-body">
9
+ <%= f.field_container :logo do %>
10
+ <% if @store.logo.attached? && @store.logo.variable? %>
11
+ <%= image_tag main_app.url_for(@store.logo.variant(resize: '244x104>')) %>
12
+ <% elsif @store.logo.attached? && @store.logo.image? %>
13
+ <%= image_tag main_app.url_for(@store.logo) %>
14
+ <% end %>
15
+ <%= f.field_container :logo do %>
16
+ <%= f.label :logo, Spree.t(:logo) %><br>
17
+ <%= f.file_field :logo %>
18
+ <%= f.error_message_on :logo %>
19
+ <% end %>
20
20
  <% end %>
21
- <% end %>
22
- <%= f.field_container :mailer_logo, class: ['form-group'] do %>
23
- <% if @store.mailer_logo.attached? && @store.mailer_logo.variable? %>
24
- <%= image_tag main_app.url_for(@store.mailer_logo.variant(resize: '244x104>')) %>
21
+ <%= f.field_container :mailer_logo do %>
22
+ <% if @store.mailer_logo.attached? && @store.mailer_logo.variable? %>
23
+ <%= image_tag main_app.url_for(@store.mailer_logo.variant(resize: '244x104>')) %>
24
+ <% end %>
25
+ <%= f.field_container :mailer_logo do %>
26
+ <%= f.label :mailer_logo, Spree.t(:mailer_logo) %><br>
27
+ <%= f.file_field :mailer_logo, accept: Spree::Store::MAILER_LOGO_CONTENT_TYPES.join(',') %>
28
+ <%= f.error_message_on :mailer_logo %>
29
+ <% end %>
25
30
  <% end %>
26
- <%= f.field_container :mailer_logo, class: ['form-group'] do %>
27
- <%= f.label :mailer_logo, Spree.t(:mailer_logo) %><br>
28
- <%= f.file_field :mailer_logo, accept: Spree::Store::MAILER_LOGO_CONTENT_TYPES.join(',') %>
29
- <%= f.error_message_on :mailer_logo %>
31
+ <%= f.field_container :favicon_image do %>
32
+ <% if @store.favicon_image.attached? && @store.favicon_image.variable? %>
33
+ <%= image_tag main_app.url_for(@store.favicon_image.variant(resize: '104x104')) %>
34
+ <% end %>
35
+ <%= f.field_container :favicon_image do %>
36
+ <%= f.label :favicon_image, "#{Spree.t(:favicon)} (#{Spree.t(:favicon_upload_info)})" %><br>
37
+ <%= f.file_field :favicon_image, accept: Spree::Store::FAVICON_CONTENT_TYPES.join(',') %>
38
+ <%= f.error_message_on :favicon_image %>
39
+ <% end %>
30
40
  <% end %>
31
- <% end %>
32
- <%= f.field_container :favicon_image, class: ['form-group'] do %>
33
- <% if @store.favicon_image.attached? && @store.favicon_image.variable? %>
34
- <%= image_tag main_app.url_for(@store.favicon_image.variant(resize: '104x104')) %>
41
+ <%= f.field_container :name do %>
42
+ <%= f.label :name, raw(Spree.t(:name) + required_span_tag) %>
43
+ <%= f.text_field :name, class: 'form-control', required: true %>
44
+ <%= f.error_message_on :name %>
35
45
  <% end %>
36
- <%= f.field_container :favicon_image, class: ['form-group'] do %>
37
- <%= f.label :favicon_image, "#{Spree.t(:favicon)} (#{Spree.t(:favicon_upload_info)})" %><br>
38
- <%= f.file_field :favicon_image, accept: Spree::Store::FAVICON_CONTENT_TYPES.join(',') %>
39
- <%= f.error_message_on :favicon_image %>
46
+ <%= f.field_container :code do %>
47
+ <%= f.label :code, raw(Spree.t(:code) + required_span_tag) %>
48
+ <%= f.text_field :code, class: 'form-control', required: true %>
49
+ <small class="form-text text-muted">
50
+ <%= Spree.t('store_form.code_help') %>
51
+ </small>
52
+ <%= f.error_message_on :code %>
40
53
  <% end %>
41
- <% end %>
42
- <%= f.field_container :name, class: ['form-group'] do %>
43
- <%= f.label :name, raw(Spree.t(:name) + required_span_tag) %>
44
- <%= f.text_field :name, class: 'form-control', required: true %>
45
- <%= f.error_message_on :name %>
46
- <% end %>
47
- <%= f.field_container :code, class: ['form-group'] do %>
48
- <%= f.label :code, raw(Spree.t(:code) + required_span_tag) %>
49
- <%= f.text_field :code, class: 'form-control', required: true %>
50
- <small class="form-text text-muted">
51
- <%= Spree.t('store_form.code_help') %>
52
- </small>
53
- <%= f.error_message_on :code %>
54
- <% end %>
55
- <%= f.field_container :url, class: ['form-group'] do %>
56
- <%= f.label :url, raw(Spree.t(:url) + required_span_tag) %>
57
- <div class="input-group mb-3">
58
- <div class="input-group-prepend">
59
- <span class="input-group-text" id="basic-addon3">https://</span>
54
+ <%= f.field_container :url do %>
55
+ <%= f.label :url, raw(Spree.t(:url) + required_span_tag) %>
56
+ <div class="input-group mb-3">
57
+ <div class="input-group-prepend">
58
+ <span class="input-group-text" id="basic-addon3">https://</span>
59
+ </div>
60
+ <%= f.text_field :url, class: 'form-control', required: true %>
60
61
  </div>
61
- <%= f.text_field :url, class: 'form-control', required: true %>
62
- </div>
63
- <%= f.error_message_on :url %>
64
- <% end %>
62
+ <%= f.error_message_on :url %>
63
+ <% end %>
64
+ </div>
65
65
  </div>
66
- </div>
67
66
 
68
- <div class="card mb-4">
69
- <div class="card-header">
70
- <h1 class="card-title mb-0 h5">
71
- <%= Spree.t(:seo) %>
72
- </h1>
73
- </div>
74
- <div class="card-body">
75
- <%= f.field_container :seo_title, class: ['form-group'] do %>
76
- <%= f.label :seo_title, Spree.t(:seo_title) %>
77
- <%= f.text_field :seo_title, class: 'form-control' %>
78
- <%= f.error_message_on :seo_title %>
79
- <% end %>
80
- <%= f.field_container :meta_description, class: ['form-group'] do %>
81
- <%= f.label :meta_description, Spree.t(:meta_description) %>
82
- <%= f.text_area :meta_description, class: 'form-control' %>
83
- <%= f.error_message_on :meta_description %>
84
- <% end %>
85
- <%= f.field_container :meta_keywords, class: ['form-group'] do %>
86
- <%= f.label :meta_keywords, Spree.t(:meta_keywords) %>
87
- <%= f.text_field :meta_keywords, class: 'form-control' %>
88
- <%= f.error_message_on :meta_keywords %>
89
- <% end %>
90
- <%= f.field_container :seo_robots, class:['form-group'] do %>
91
- <%= f.label :seo_robots, Spree.t(:seo_robots) %>
92
- <%= f.text_field :seo_robots, class: 'form-control' %>
93
- <%= f.error_message_on :seo_robots %>
94
- <small class="form-text text-muted">
95
- <%= raw(Spree.t('store_form.seo_robots')) %>
96
- </small>
97
- <% end %>
67
+ <div class="card mb-4">
68
+ <div class="card-header">
69
+ <h1 class="card-title mb-0 h5">
70
+ <%= Spree.t(:seo) %>
71
+ </h1>
72
+ </div>
73
+ <div class="card-body">
74
+ <%= f.field_container :seo_title do %>
75
+ <%= f.label :seo_title, Spree.t(:seo_title) %>
76
+ <%= f.text_field :seo_title, class: 'form-control' %>
77
+ <%= f.error_message_on :seo_title %>
78
+ <% end %>
79
+ <%= f.field_container :meta_description do %>
80
+ <%= f.label :meta_description, Spree.t(:meta_description) %>
81
+ <%= f.text_area :meta_description, class: 'form-control' %>
82
+ <%= f.error_message_on :meta_description %>
83
+ <% end %>
84
+ <%= f.field_container :meta_keywords do %>
85
+ <%= f.label :meta_keywords, Spree.t(:meta_keywords) %>
86
+ <%= f.text_field :meta_keywords, class: 'form-control' %>
87
+ <%= f.error_message_on :meta_keywords %>
88
+ <% end %>
89
+ <%= f.field_container :seo_robots do %>
90
+ <%= f.label :seo_robots, Spree.t(:seo_robots) %>
91
+ <%= f.text_field :seo_robots, class: 'form-control' %>
92
+ <%= f.error_message_on :seo_robots %>
93
+ <small class="form-text text-muted">
94
+ <%= raw(Spree.t('store_form.seo_robots')) %>
95
+ </small>
96
+ <% end %>
97
+ </div>
98
98
  </div>
99
- </div>
100
99
 
101
- <div class="card mb-4">
102
- <div class="card-header">
103
- <h1 class="card-title mb-0 h5">
104
- <%= Spree.t(:email).pluralize %>
105
- </h1>
106
- </div>
107
- <div class="card-body">
108
- <%= f.field_container :mail_from_address, class: ['form-group'] do %>
109
- <%= f.label :mail_from_address, raw(Spree.t(:mail_from_address) + required_span_tag) %>
110
- <%= f.text_field :mail_from_address, class: 'form-control', required: true %>
111
- <%= f.error_message_on :mail_from_address %>
112
- <small class="form-text text-muted">
113
- <%= Spree.t('store_form.mail_from_address_help') %>
114
- </small>
115
- <% end %>
100
+ <div class="card mb-4">
101
+ <div class="card-header">
102
+ <h1 class="card-title mb-0 h5">
103
+ <%= Spree.t(:email).pluralize %>
104
+ </h1>
105
+ </div>
106
+ <div class="card-body">
107
+ <%= f.field_container :mail_from_address do %>
108
+ <%= f.label :mail_from_address, raw(Spree.t(:mail_from_address) + required_span_tag) %>
109
+ <%= f.text_field :mail_from_address, class: 'form-control', required: true %>
110
+ <%= f.error_message_on :mail_from_address %>
111
+ <small class="form-text text-muted">
112
+ <%= Spree.t('store_form.mail_from_address_help') %>
113
+ </small>
114
+ <% end %>
116
115
 
117
- <%= f.field_container :customer_support_email, class: ['form-group'] do %>
118
- <%= f.label :customer_support_email, Spree.t(:customer_support_email) %>
119
- <%= f.text_field :customer_support_email, class: 'form-control' %>
120
- <%= f.error_message_on :customer_support_email %>
121
- <small class="form-text text-muted">
122
- <%= Spree.t('store_form.customer_support_email_help') %>
123
- </small>
124
- <% end %>
116
+ <%= f.field_container :customer_support_email do %>
117
+ <%= f.label :customer_support_email, Spree.t(:customer_support_email) %>
118
+ <%= f.text_field :customer_support_email, class: 'form-control' %>
119
+ <%= f.error_message_on :customer_support_email %>
120
+ <small class="form-text text-muted">
121
+ <%= Spree.t('store_form.customer_support_email_help') %>
122
+ </small>
123
+ <% end %>
125
124
 
126
- <%= f.field_container :new_order_notifications_email, class: ['form-group'] do %>
127
- <%= f.label :new_order_notifications_email, Spree.t(:new_order_notifications_email) %>
128
- <%= f.text_field :new_order_notifications_email, class: 'form-control' %>
129
- <%= f.error_message_on :new_order_notifications_email %>
130
- <small class="form-text text-muted">
131
- <%= Spree.t('store_form.new_order_notifications_email_help') %>
132
- </small>
133
- <% end %>
125
+ <%= f.field_container :new_order_notifications_email do %>
126
+ <%= f.label :new_order_notifications_email, Spree.t(:new_order_notifications_email) %>
127
+ <%= f.text_field :new_order_notifications_email, class: 'form-control' %>
128
+ <%= f.error_message_on :new_order_notifications_email %>
129
+ <small class="form-text text-muted">
130
+ <%= Spree.t('store_form.new_order_notifications_email_help') %>
131
+ </small>
132
+ <% end %>
133
+ </div>
134
134
  </div>
135
- </div>
136
135
 
137
- <div class="card mb-4">
138
- <div class="card-header">
139
- <h1 class="card-title mb-0 h5">
140
- <%= Spree.t(:internationalization) %>
141
- </h1>
142
- </div>
143
- <div class="card-body">
144
- <%= f.field_container :default_currency, class: ['form-group'] do %>
145
- <%= f.label :default_currency %>
146
- <%= f.select :default_currency, currency_options(@store.default_currency), {}, { class: 'select2' } %>
147
- <%= f.error_message_on :default_currency %>
148
- <% end %>
149
- <%= f.field_container :supported_currencies, class: ['form-group'] do %>
150
- <%= f.label :supported_currencies, Spree.t(:supported_currencies) %>
151
- <%= f.select :supported_currencies, currency_options(@store.supported_currencies&.split(',')), { prompt: false }, { multiple: true, class: 'select2' } %>
152
- <%= f.error_message_on :supported_currencies %>
153
- <% end %>
154
- <%= f.field_container :checkout_zone_id, class: ['form-group'] do %>
155
- <%= f.label :checkout_zone_id, Spree.t(:zone) %>
156
- <%= f.select :checkout_zone_id, options_for_select(@zones, selected_checkout_zone(@store)&.id), { include_blank: Spree.t(:no_limits_zone) }, { class: 'select2' } %>
157
- <small class="form-text text-muted">
158
- <%= raw(Spree.t('store_form.checkout_zone_help')) %>
159
- </small>
160
- <%= f.error_message_on :checkout_zone_id %>
161
- <% end %>
162
- <%= f.field_container :default_locale, class: ['form-group'] do %>
163
- <%= f.label :default_locale %>
164
- <%= f.select :default_locale, options_from_collection_for_select(all_locales_options, :last, :first, @store.default_locale || I18n.locale), {}, { class: 'select2' } %>
165
- <%= f.error_message_on :default_locale %>
166
- <% unless defined?(SpreeI18n) %>
136
+ <div class="card mb-4">
137
+ <div class="card-header">
138
+ <h1 class="card-title mb-0 h5">
139
+ <%= Spree.t(:internationalization) %>
140
+ </h1>
141
+ </div>
142
+ <div class="card-body">
143
+ <%= f.field_container :default_currency do %>
144
+ <%= f.label :default_currency %>
145
+ <%= f.select :default_currency, currency_options(@store.default_currency), {}, { class: 'select2' } %>
146
+ <%= f.error_message_on :default_currency %>
147
+ <% end %>
148
+ <%= f.field_container :supported_currencies do %>
149
+ <%= f.label :supported_currencies, Spree.t(:supported_currencies) %>
150
+ <%= f.select :supported_currencies, currency_options(@store.supported_currencies&.split(',')), { prompt: false }, { multiple: true, class: 'select2' } %>
151
+ <%= f.error_message_on :supported_currencies %>
152
+ <% end %>
153
+ <%= f.field_container :checkout_zone_id do %>
154
+ <%= f.label :checkout_zone_id, Spree.t(:zone) %>
155
+ <%= f.select :checkout_zone_id, options_for_select(@zones, selected_checkout_zone(@store)&.id), { include_blank: Spree.t(:no_limits_zone) }, { class: 'select2' } %>
167
156
  <small class="form-text text-muted">
168
- <%= raw(Spree.t('store_form.locales_help')) %>
157
+ <%= raw(Spree.t('store_form.checkout_zone_help')) %>
169
158
  </small>
159
+ <%= f.error_message_on :checkout_zone_id %>
160
+ <% end %>
161
+ <%= f.field_container :default_locale do %>
162
+ <%= f.label :default_locale %>
163
+ <%= f.select :default_locale, options_from_collection_for_select(all_locales_options, :last, :first, @store.default_locale || I18n.locale), {}, { class: 'select2' } %>
164
+ <%= f.error_message_on :default_locale %>
165
+ <% unless defined?(SpreeI18n) %>
166
+ <small class="form-text text-muted">
167
+ <%= raw(Spree.t('store_form.locales_help')) %>
168
+ </small>
169
+ <% end %>
170
+ <% end %>
171
+ <%= f.field_container :supported_locales do %>
172
+ <%= f.label :supported_locales, Spree.t(:supported_locales) %>
173
+ <%= f.select :supported_locales, options_from_collection_for_select(all_locales_options, :last, :first, @store.supported_locales&.split(',')), {}, { multiple: true, class: 'select2' } %>
174
+ <%= f.error_message_on :supported_locales %>
170
175
  <% end %>
171
- <% end %>
172
- <%= f.field_container :supported_locales, class: ['form-group'] do %>
173
- <%= f.label :supported_locales, Spree.t(:supported_locales) %>
174
- <%= f.select :supported_locales, options_from_collection_for_select(all_locales_options, :last, :first, @store.supported_locales&.split(',')), {}, { multiple: true, class: 'select2' } %>
175
- <%= f.error_message_on :supported_locales %>
176
- <% end %>
177
- <%= f.field_container :default_country_id, class: ['form-group'] do %>
178
- <%= f.label :default_country_id, Spree.t('i18n.default_country') %>
179
- <%= f.select :default_country_id, options_from_collection_for_select(@countries, :id, :name, @store.default_country_id), {}, { class: 'select2' } %>
180
- <%= f.error_message_on :default_country_id %>
181
- <small class="form-text text-muted">
182
- <%= Spree.t('store_form.default_country_help') %>
183
- </small>
184
- <% end %>
176
+ <%= f.field_container :default_country_id do %>
177
+ <%= f.label :default_country_id, Spree.t('i18n.default_country') %>
178
+ <%= f.select :default_country_id, options_from_collection_for_select(@countries, :id, :name, @store.default_country_id), {}, { class: 'select2' } %>
179
+ <%= f.error_message_on :default_country_id %>
180
+ <small class="form-text text-muted">
181
+ <%= Spree.t('store_form.default_country_help') %>
182
+ </small>
183
+ <% end %>
184
+ </div>
185
185
  </div>
186
- </div>
187
186
 
188
- <div class="card mb-4">
189
- <div class="card-header">
190
- <h1 class="card-title mb-0 h5">
191
- <%= Spree.t(:social) %>
192
- </h1>
193
- </div>
194
- <div class="card-body">
195
- <div class="alert alert-warning col-12">
196
- <%= Spree.t('store_form.social_help') %>
187
+ <div class="card mb-4">
188
+ <div class="card-header">
189
+ <h1 class="card-title mb-0 h5">
190
+ <%= Spree.t(:social) %>
191
+ </h1>
197
192
  </div>
193
+ <div class="card-body">
194
+ <div class="alert alert-warning col-12">
195
+ <%= Spree.t('store_form.social_help') %>
196
+ </div>
198
197
 
199
- <%= f.field_container :facebook, class: ['form-group'] do %>
200
- <%= f.label :facebook, Spree.t(:facebook) %>
201
- <div class="input-group mb-3">
202
- <div class="input-group-prepend">
203
- <span class="input-group-text" id="basic-addon3">https://facebook.com</span>
198
+ <%= f.field_container :facebook do %>
199
+ <%= f.label :facebook, Spree.t(:facebook) %>
200
+ <div class="input-group mb-3">
201
+ <div class="input-group-prepend">
202
+ <span class="input-group-text" id="basic-addon3">https://facebook.com</span>
203
+ </div>
204
+ <%= f.text_field :facebook, class: 'form-control' %>
204
205
  </div>
205
- <%= f.text_field :facebook, class: 'form-control' %>
206
- </div>
207
- <%= f.error_message_on :facebook %>
208
- <% end %>
209
- <%= f.field_container :twitter, class: ['form-group'] do %>
210
- <%= f.label :twitter, Spree.t(:twitter) %>
211
- <div class="input-group mb-3">
212
- <div class="input-group-prepend">
213
- <span class="input-group-text" id="basic-addon3">https://twitter.com</span>
206
+ <%= f.error_message_on :facebook %>
207
+ <% end %>
208
+ <%= f.field_container :twitter do %>
209
+ <%= f.label :twitter, Spree.t(:twitter) %>
210
+ <div class="input-group mb-3">
211
+ <div class="input-group-prepend">
212
+ <span class="input-group-text" id="basic-addon3">https://twitter.com</span>
213
+ </div>
214
+ <%= f.text_field :twitter, class: 'form-control' %>
214
215
  </div>
215
- <%= f.text_field :twitter, class: 'form-control' %>
216
- </div>
217
- <%= f.error_message_on :twitter %>
218
- <% end %>
219
- <%= f.field_container :instagram, class: ['form-group'] do %>
220
- <%= f.label :instagram, Spree.t(:instagram) %>
221
- <div class="input-group mb-3">
222
- <div class="input-group-prepend">
223
- <span class="input-group-text" id="basic-addon3">https://instagram.com</span>
216
+ <%= f.error_message_on :twitter %>
217
+ <% end %>
218
+ <%= f.field_container :instagram do %>
219
+ <%= f.label :instagram, Spree.t(:instagram) %>
220
+ <div class="input-group mb-3">
221
+ <div class="input-group-prepend">
222
+ <span class="input-group-text" id="basic-addon3">https://instagram.com</span>
223
+ </div>
224
+ <%= f.text_field :instagram, class: 'form-control' %>
224
225
  </div>
225
- <%= f.text_field :instagram, class: 'form-control' %>
226
- </div>
227
- <%= f.error_message_on :instagram %>
228
- <% end %>
226
+ <%= f.error_message_on :instagram %>
227
+ <% end %>
228
+ </div>
229
229
  </div>
230
- </div>
231
230
 
232
- <div class="card mb-4">
233
- <div class="card-header">
234
- <h1 class="card-title mb-0 h5">
235
- <%= Spree.t(:footer) %>
236
- </h1>
231
+ <div class="card mb-4">
232
+ <div class="card-header">
233
+ <h1 class="card-title mb-0 h5">
234
+ <%= Spree.t(:footer) %>
235
+ </h1>
236
+ </div>
237
+ <div class="card-body">
238
+ <div class="alert alert-warning col-12">
239
+ <%= Spree.t('store_form.footer_help') %>
240
+ </div>
241
+
242
+ <%= f.field_container :description do %>
243
+ <%= f.label :description, Spree.t(:description) %>
244
+ <%= f.text_area :description, class: 'form-control' %>
245
+ <%= f.error_message_on :description %>
246
+ <% end %>
247
+ <%= f.field_container :address do %>
248
+ <%= f.label :address, Spree.t(:address) %>
249
+ <%= f.text_area :address, class: 'form-control' %>
250
+ <%= f.error_message_on :address %>
251
+ <% end %>
252
+ <%= f.field_container :contact_phone do %>
253
+ <%= f.label :contact_phone, Spree.t(:contact_phone) %>
254
+ <%= f.text_field :contact_phone, class: 'form-control' %>
255
+ <%= f.error_message_on :contact_phone %>
256
+ <% end %>
257
+ </div>
237
258
  </div>
238
- <div class="card-body">
239
- <div class="alert alert-warning col-12">
240
- <%= Spree.t('store_form.footer_help') %>
259
+ <div class="card mb-4">
260
+ <div class="card-header">
261
+ <h1 class="card-title mb-0 h5">
262
+ <%= Spree.t('admin.store.digital_settings.digital_asset_settings') %>
263
+ </h1>
241
264
  </div>
265
+ <div class="card-body">
266
+ <div class="row pb-0">
267
+ <div class="col-12 col-md-4">
268
+ <%= f.field_container :digital_asset_authorized_clicks do %>
269
+ <%= f.label :digital_asset_authorized_clicks, (raw Spree.t('admin.store.digital_settings.digital_asset_authorized_clicks.authorized_clicks') + required_span_tag) %>
270
+ <%= f.text_field :digital_asset_authorized_clicks, class: 'form-control', required: true %>
271
+ <%= f.error_message_on :digital_asset_authorized_clicks %>
272
+ <% end %>
273
+ <small class="form-text text-muted">
274
+ <%= Spree.t('admin.store.digital_settings.digital_asset_authorized_clicks.info') %>
275
+ </small>
276
+ <%= f.field_container :limit_digital_download_count, class: ['custom-control', 'custom-checkbox', 'my-4'] do %>
277
+ <%= f.check_box :limit_digital_download_count, class: 'custom-control-input' %>
278
+ <%= f.label :limit_digital_download_count, Spree.t('admin.store.digital_settings.limit_digital_download_count'), class: 'custom-control-label' %>
279
+ <%= f.error_message_on :limit_digital_download_count %>
280
+ <% end %>
281
+ </div>
282
+
283
+ <div class="col-12 col-md-4">
284
+ <%= f.field_container :digital_asset_authorized_days do %>
285
+ <%= f.label :digital_asset_authorized_days, (raw Spree.t('admin.store.digital_settings.digital_asset_authorized_days.authorized_days') + required_span_tag) %>
286
+ <%= f.text_field :digital_asset_authorized_days, class: 'form-control', required: true %>
287
+ <%= f.error_message_on :digital_asset_authorized_days %>
288
+ <% end %>
289
+ <small class="form-text text-muted">
290
+ <%= Spree.t('admin.store.digital_settings.digital_asset_authorized_days.info') %>
291
+ </small>
292
+ <%= f.field_container :limit_digital_download_days, class: ['custom-control', 'custom-checkbox', 'my-4'] do %>
293
+ <%= f.check_box :limit_digital_download_days, class: 'custom-control-input' %>
294
+ <%= f.label :limit_digital_download_days, Spree.t('admin.store.digital_settings.limit_digital_download_days'), class: 'custom-control-label' %>
295
+ <%= f.error_message_on :limit_digital_download_days %>
296
+ <% end %>
297
+ </div>
242
298
 
243
- <%= f.field_container :description, class: ['form-group'] do %>
244
- <%= f.label :description, Spree.t(:description) %>
245
- <%= f.text_area :description, class: 'form-control' %>
246
- <%= f.error_message_on :description %>
247
- <% end %>
248
- <%= f.field_container :address, class: ['form-group'] do %>
249
- <%= f.label :address, Spree.t(:address) %>
250
- <%= f.text_area :address, class: 'form-control' %>
251
- <%= f.error_message_on :address %>
252
- <% end %>
253
- <%= f.field_container :contact_phone, class: ['form-group'] do %>
254
- <%= f.label :contact_phone, Spree.t(:contact_phone) %>
255
- <%= f.text_field :contact_phone, class: 'form-control' %>
256
- <%= f.error_message_on :contact_phone %>
257
- <% end %>
299
+ <div class="col-12 col-md-4">
300
+ <%= f.field_container :digital_asset_link_expire_time do %>
301
+ <%= f.label :digital_asset_link_expire_time, (raw Spree.t('admin.store.digital_settings.digital_asset_link_expire_time.download_link_expire_time') + required_span_tag) %>
302
+ <%= f.text_field :digital_asset_link_expire_time, class: 'form-control', required: true %>
303
+ <%= f.error_message_on :digital_asset_link_expire_time %>
304
+ <% end %>
305
+ <small class="form-text text-muted">
306
+ <%= Spree.t('admin.store.digital_settings.digital_asset_link_expire_time.link_expire_time') %>
307
+ </small>
308
+ </div>
309
+ </div>
310
+ </div>
258
311
  </div>
259
312
  </div>