* <%= ts('Required information') %>

<%= ts('About') %>

<%= ts('About') %>

<%= label_tag 'skin_type', ts('Type') + "*" %> <%= link_to_help 'skins-basics' %>
<% if @skin.id %> <% # don't let user change the type of an already-created skin %> <%= (@skin.type && @skin.type == 'WorkSkin') ? ts('Work Skin') : ts('Site Skin') %> <% else %> <%= select_tag 'skin_type', options_for_select(Skin::TYPE_OPTIONS, @skin.type || params[:skin_type] ), :onchange => 'if ($j(this).val() == "WorkSkin") {$j("#advanced_skin_fieldset").hide();} else {$j("#advanced_skin_fieldset").show();}' %> <% end %>
<%= f.label :title, ts('Title') + "*" %>
<%= f.text_field :title %>
<%= f.label :description, ts('Description') %>
<%= f.text_field :description %>
<%= f.label :icon, ts('Upload a preview (png, jpeg or gif)') %>
<%= f.file_field :icon %>
<%= f.label :public, ts('Apply to make public') %> <%= link_to_help 'skins-approval' %>
<%= f.check_box :public %>
<%= ts('CSS') %>

<%= f.label :css, ts('CSS') %> <%= link_to_help 'skins-creating' %>

<%= f.text_area :css, :cols => 70, :class => 'large observe_textlength' %> <%= live_validation_for_field("skin_css", maximum_length: ArchiveConfig.CONTENT_MAX_DISPLAYED) %> <%= generate_countdown_html("skin_css", ArchiveConfig.CONTENT_MAX_DISPLAYED) %>

<%= ts('Advanced') %>
<%= ts('Conditions') %> <%= link_to_help 'skins-conditions' %>

<%= ts('Conditions') %>

<%= f.label :role, ts('What it does: ')%>
<%= f.select :role, options_for_select(Skin::ROLE_NAMES.invert, @skin.role || Skin::DEFAULT_ROLE), {}, :onchange => 'if ($j(this).val() == "override") {$j(".archive_parents").show();} else {$j(".archive_parents").hide();}' %>
<%= f.label :ie_condition, ts('IE Only: ')%>
<%= f.select :ie_condition, options_for_select(Skin::IE_CONDITIONS, @skin.ie_condition), :include_blank => true %>
<%= f.label :unusable, ts('Parent Only: ')%>
<%= f.check_box :unusable %>
<%= f.label :media, ts('Media: ')%>
<%= ts('Choose @media') %>
<%= checkbox_section(f, :media, Skin::MEDIA, :checked_method => @skin.media || Skin::DEFAULT_MEDIA, :value_method => "to_s", :name_method => "to_s", :include_blank => false) %>
<%= ts('Parent Skins') %> <%= link_to_help 'skins-parents' %>

<%= ts('Parent Skins') %>

    <% f.object.skin_parents.each_with_index do |parent, index| %> <%= f.fields_for :skin_parents, parent do |parent_form| %> <%= render 'skin_parent_fields', :form => parent_form, :index => index %> <% end %> <% end %> <% if f.object.skin_parents.count == 0 %><% end %>
  • <%= link_to_add_section(ts('Add parent skin'), f, :skin_parents, "skin_parent_fields") %>
<%= submit_fieldset(f) %>