<%= @shipping_method.new_record? ? t('plugin.ecommerce.new_shipping_methods') : "#{t('plugin.ecommerce.edit_shipping_methods')}: #{@shipping_method.name}" %>

<%= form_for @shipping_method, url:{action: @shipping_method.new_record? ? :create : :update}, html: {class: 'validate-shipping_method', id: 'form-shipping_method'} do |f| %>
<%= render partial: 'layouts/camaleon_cms/admin/form_error', locals: {data: @shipping_method} %>
<%= f.label t('plugin.ecommerce.table.name') %>
<%= f.text_field :name, :class => "form-control required" %>
<%= f.label t('camaleon_cms.admin.table.slug') %>
<%= f.text_field :slug, :class => "form-control slug", "data-parent" => 'plugins_ecommerce_shipping_method_name' %>
<%= f.label t('camaleon_cms.admin.table.description') %>
<%= f.text_area :description, :class => "form-control", :rows => 4 %>
<% options = @shipping_method.options rescue {url_tracking: 'http://trackingurl.com/track/{{consignment_number}}'} options = params[:options] if params[:options].present? %>

<%= text_field_tag( "options[url_tracking]", options[:url_tracking], class: "form-control required") %> <%= t('plugin.ecommerce.message.consignment_number') %>
<% end %>