2014-05-17 18:57:03 +00:00
|
|
|
<%= form_for(@metacode) do |f| %>
|
|
|
|
<% if @metacode.errors.any? %>
|
|
|
|
<div id="error_explanation">
|
|
|
|
<h2><%= pluralize(@metacode.errors.count, "error") %> prohibited this metacode from being saved:</h2>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<% @metacode.errors.full_messages.each do |msg| %>
|
|
|
|
<li><%= msg %></li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div class="field">
|
|
|
|
<%= f.label :name %>
|
|
|
|
<%= f.text_field :name %>
|
|
|
|
<div class="clearfloat"></div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<%= f.label :icon %>
|
2016-02-23 06:58:20 +00:00
|
|
|
<%= f.file_field :icon %>
|
2014-05-17 18:57:03 +00:00
|
|
|
<div class="clearfloat"></div>
|
|
|
|
</div>
|
2014-09-30 02:26:12 +00:00
|
|
|
<div class="field">
|
|
|
|
<%= f.label :color, "Color (hex with # sign)" %>
|
|
|
|
<%= f.text_field :color %>
|
|
|
|
<div class="clearfloat"></div>
|
|
|
|
</div>
|
2014-05-17 18:57:03 +00:00
|
|
|
<div class="actions">
|
2014-09-16 01:57:34 +00:00
|
|
|
<%= link_to 'Cancel', metacodes_path, { :class => 'button', 'data-bypass' => 'true' } %>
|
2014-05-17 18:57:03 +00:00
|
|
|
<%= f.submit :class => 'add' %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|