<%= f.label :type, Spree.t(:provider) %> <%= collection_select(:payment_method, :type, @providers, :to_s, :name, {}, {:id => 'gtwy-type', :class => 'select2 fullwidth js-gateway-type'}) %>
<%= label_tag :preference_source, 'Preference Source' %> <%= f.select(:preference_source, [[Spree.t(:preference_source_none), nil]] + @object.class.available_preference_sources, {}, class: 'select2 fullwidth js-preference-source') %>
<% if @object.preference_source.present? %> <%= Spree.t :preference_source_using, name: @object.preference_source %> <% elsif !@object.new_record? %> <%= preference_fields(@object, f) %> <% end %>
<%= Spree.t(:provider_settings_warning) %>
<%= label_tag :payment_method_environment, Spree.t(:environment) %> <%= collection_select(:payment_method, :environment, rails_environments, :to_s, :titleize, {}, {:id => 'gtwy-env', :class => 'select2 fullwidth'}) %>
<%= label_tag :payment_method_display_on, Spree.t(:display) %> <%= select(:payment_method, :display_on, Spree::PaymentMethod::DISPLAY.collect { |display| [Spree.t(display), display == :both ? nil : display.to_s] }, {}, {:class => 'select2 fullwidth'}) %>
<%= 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 fullwidth'}) %>
<%= label_tag nil, Spree.t(:active) %>
  • <%= radio_button :payment_method, :active, true %> <%= label_tag :payment_method_active_true, Spree.t(:say_yes) %>
  • <%= radio_button :payment_method, :active, false %> <%= label_tag :payment_method_active_false, Spree.t(:say_no) %>
<%= label_tag :payment_method_name, Spree.t(:name) %> <%= text_field :payment_method, :name, :class => 'fullwidth' %>
<%= label_tag :payment_method_description, Spree.t(:description) %> <%= text_area :payment_method, :description, {:cols => 60, :rows => 6, :class => 'fullwidth'} %>