<%= Spree.t(:settings) %>
<%= f.label :type, Spree.t(:provider) %> <%= collection_select(:payment_method, :type, @providers, :to_s, :name, {}, {id: 'gtwy-type', class: 'select2'}) %>

<%= field_container :payment_method, :name, class: ['form-group'], 'data-hook' => 'name' do %> <%= label_tag :payment_method_name, Spree.t(:name) %> <%= text_field :payment_method, :name, class: 'form-control' %> <%= error_message_on :payment_method, :name %> <% end %> <%= field_container :payment_method, :description, class: ['form-group'], 'data-hook' => 'description' do %> <%= label_tag :payment_method_description, Spree.t(:description) %> <%= text_area :payment_method, :description, { cols: 60, rows: 6, class: 'form-control' } %> <% end %>
<%= label_tag :payment_method_stores, Spree.t(:stores) %> <%= collection_select(:payment_method, :store_ids, @stores, :id, :unique_name, {}, { multiple: true, class: 'select2' }) %>
<%= label_tag :payment_method_display_on, Spree.t(:display) %> <%= select(:payment_method, :display_on, Spree::PaymentMethod::DISPLAY.collect { |display| [Spree.t(display), display.to_s] }, {}, {class: 'select2'}) %>
<%= label_tag :payment_method_auto_capture, Spree.t(:auto_capture) %> <%= select(:payment_method, :auto_capture, [["#{Spree.t(:use_app_default)} (#{Spree::Config[:auto_capture]})", ''], [Spree.t(:say_yes), true], [Spree.t(:say_no), false]], {}, {class: 'select2'}) %>
<%= Spree.t(:active) %>
<%= radio_button :payment_method, :active, true, class: 'form-check-input' %> <%= label_tag :payment_method_active_true, Spree.t(:say_yes), class: 'form-check-label' %>
<%= radio_button :payment_method, :active, false, class: 'form-check-input' %> <%= label_tag :payment_method_active_false, Spree.t(:say_no), class: 'form-check-label' %>
<%= Spree.t(:payment_provider_settings) %>
<% unless @object.new_record? %> <% if preference_fields(@object, f).empty? %> <%= Spree.t('no_payment_provider_settings_message') %> <% end %> <%= preference_fields(@object, f) %> <% if @object.respond_to?(:preferences) %>
<%= Spree.t(:provider_settings_warning) %>
<% end %> <% end %>