Create New <%= mail_template_list_title(params[:type]) %>

<%= form_for(@mail_template, :url => create_by_upload_mail_templates_path, :html => {:multipart => true}) do |f| %> <% if @mail_template.errors.any? %>

<%= pluralize(@mail_template.errors.count, "error") %> prohibited this mail_template from being saved:

<% end %>
<%= f.label :name %>
<%= f.text_field :name, :class => "text" %>
<%= f.label :subject %>
<%= f.text_field :subject, :class => "text" %>
<%= f.label :path, 'Template Path' %>
<%= f.text_field :path, :class => "text" %>
<%= f.label :locale %>
<%= f.select :locale, I18n.available_locales.map(&:to_s) %>

<% if @mail_template.zip_file.present? %>
Do you to change this uploaded file: <%= link_to File.basename(@mail_template.zip_file_url), @mail_template.zip_file_url %> ?
<% end %> <%= f.file_field :zip_file, :style => 'padding: 10px;', :class => "text" %> <%= f.hidden_field :zip_file_cache %>
Note:
  1. Only include Image files(png, gif, jpg), css files and html file.
  2. Only one html file.
  3. File should less than 1MB.
<%= f.hidden_field :for_marketing, :value => (f.object.for_marketing || params[:type] == 'marketing') %> <%= f.hidden_field :partial, :value => (f.object.partial || params[:type] == 'partial') %> <%= f.hidden_field :format %> <%= f.hidden_field :layout %> <%= f.hidden_field :create_by_upload, :value => true %>
<%= f.submit :class => "button" %>
<% end %>