%= form_for(@metacode) do |f| %>
<% if @metacode.errors.any? %>
<%= pluralize(@metacode.errors.count, "error") %> prohibited this metacode from being saved:
<% @metacode.errors.full_messages.each do |msg| %>
- <%= msg %>
<% end %>
<% end %>
<%= f.label :name %>
<%= f.text_field :name %>
<% unless @metacode.new_record? %>
<%= f.label 'Current Icon' %>
<%= image_tag @metacode.icon, width: 96 %>
<% end %>
<% if @metacode.new_record? %>
<%= f.label 'Icon' %>
<% else %>
<%= f.label 'Replace Icon: ' %>
<% end %>
<%= f.hidden_field :manual_icon, value: nil %>
<%= f.file_field :aws_icon %>
<%= f.label :color, "Color (hex with # sign)" %>
<%= f.text_field :color %>
<%= link_to 'Cancel', metacodes_path, { :class => 'button' } %>
<%= f.submit :class => 'add' %>
<% end %>