app/views/spree/admin/general_settings/edit.html.erb in solidus_backend-2.0.3 vs app/views/spree/admin/general_settings/edit.html.erb in solidus_backend-2.1.0.beta1
- old
+ new
@@ -1,63 +1,72 @@
<%= render 'spree/admin/shared/general_tabs' %>
<% admin_breadcrumb(Spree.t(:settings)) %>
<% admin_breadcrumb(Spree.t(:general_settings)) %>
-
-<%= form_tag admin_general_settings_path, method: :put do %>
+<%= form_for @store, url: admin_general_settings_path do |f| %>
<div id="preferences" data-hook>
<fieldset class="general no-border-top">
- <%= fields_for :store do |f| %>
- <div data-hook="admin_general_setting_input_name">
- <%= f.field_container :name do %>
- <%= f.label :name %>
- <%= f.text_field :name, class: 'fullwidth' %>
- <%= f.error_message_on :name %>
- <% end %>
- </div>
+ <div data-hook="admin_general_setting_input_name">
+ <%= f.field_container :name do %>
+ <%= f.label :name %>
+ <%= f.text_field :name, class: 'fullwidth' %>
+ <%= f.error_message_on :name %>
+ <% end %>
+ </div>
- <div data-hook="admin_general_setting_input_seo_title">
- <%= f.field_container :seo_title do %>
- <%= f.label :seo_title %>
- <%= f.text_field :seo_title, class: 'fullwidth' %>
- <%= f.error_message_on :seo_title %>
- <% end %>
- </div>
+ <div data-hook="admin_general_setting_input_seo_title">
+ <%= f.field_container :seo_title do %>
+ <%= f.label :seo_title %>
+ <%= f.text_field :seo_title, class: 'fullwidth' %>
+ <%= f.error_message_on :seo_title %>
+ <% end %>
+ </div>
- <div data-hook="admin_general_setting_input_meta_keywords">
- <%= f.field_container :meta_keywords do %>
- <%= f.label :meta_keywords %>
- <%= f.text_field :meta_keywords, class: 'fullwidth' %>
- <%= f.error_message_on :meta_keywords %>
- <% end %>
- </div>
+ <div data-hook="admin_general_setting_input_meta_keywords">
+ <%= f.field_container :meta_keywords do %>
+ <%= f.label :meta_keywords %>
+ <%= f.text_field :meta_keywords, class: 'fullwidth' %>
+ <%= f.error_message_on :meta_keywords %>
+ <% end %>
+ </div>
- <div data-hook="admin_general_setting_input_meta_description">
- <%= f.field_container :meta_description do %>
- <%= f.label :meta_description %>
- <%= f.text_field :meta_description, class: 'fullwidth' %>
- <%= f.error_message_on :meta_description %>
- <% end %>
- </div>
+ <div data-hook="admin_general_setting_input_meta_description">
+ <%= f.field_container :meta_description do %>
+ <%= f.label :meta_description %>
+ <%= f.text_field :meta_description, class: 'fullwidth' %>
+ <%= f.error_message_on :meta_description %>
+ <% end %>
+ </div>
- <div data-hook="admin_general_setting_input_url">
- <%= f.field_container :url do %>
- <%= f.label :url %>
- <%= f.text_field :url, class: 'fullwidth' %>
- <%= f.error_message_on :url %>
- <% end %>
- </div>
+ <div data-hook="admin_general_setting_input_url">
+ <%= f.field_container :url do %>
+ <%= f.label :url %>
+ <%= f.text_field :url, class: 'fullwidth' %>
+ <%= f.error_message_on :url %>
+ <% end %>
+ </div>
- <div data-hook="admin_general_setting_mail_from_address">
- <%= f.field_container :mail_from_address do %>
- <%= f.label :mail_from_address %>
- <%= f.text_field :mail_from_address, class: 'fullwidth' %>
- <%= f.error_message_on :mail_from_address %>
- <% end %>
- </div>
- <% end %>
+ <div data-hook="admin_general_setting_mail_from_address">
+ <%= f.field_container :mail_from_address do %>
+ <%= f.label :mail_from_address %>
+ <%= f.text_field :mail_from_address, class: 'fullwidth' %>
+ <%= f.error_message_on :mail_from_address %>
+ <% end %>
+ </div>
+
+ <div data-hook="admin_general_setting_default_tax_country">
+ <%= f.field_container :cart_tax_country_iso do %>
+ <%= f.field_hint :cart_tax_country_iso %>
+ <%= f.label :cart_tax_country_iso %>
+ <%= f.select :cart_tax_country_iso,
+ Spree::Country.all.map { |c| [c.name, c.iso] },
+ { include_blank: t(".no_cart_tax_country") },
+ { class: "select2 fullwidth" } %>
+ <%= f.error_message_on :cart_tax_country_iso %>
+ <% end %>
+ </div>
<% if can? :update, :general_settings %>
<div class="form-buttons filter-actions actions" data-hook="buttons">
<%= button Spree.t('actions.update') %>
<%= link_to Spree.t('actions.cancel'), edit_admin_general_settings_url, :class => 'button' %>