OSDN Git Service

a42714d46a9b2670571a69f7474254063459956c
[pettanr/pettanr.git] / app / views / ground_colors / _form.html.erb
1 <%= form_for(elm) do |f| %>
2   <%= render 'system/error_explanation', :obj => elm %>
3
4   <div class="field">
5     <%= f.label :caption %>
6     <%= f.text_field :caption, elm.field_tag_attributes(:caption, no_attr) %>
7   </div>
8   <div class="field">
9     <%= f.label :code %>
10     <%= f.text_field :code, elm.field_tag_attributes(:code, no_attr, :size => 8) %>
11     <% if elm.has_helper?(:code) %>
12       <div class="ground_color-code-wrap">
13         <%= render elm.form_helper_template(:code), :elm => elm, :no_attr => no_attr %>
14       </div>
15    <% end %>
16   </div>
17   <div class="field">
18     <%= f.label :z %>
19     <%= f.number_field :z, elm.field_tag_attributes(:z, no_attr, :size => 5) %>
20
21     <%= f.label :t %>
22     <%= f.number_field :t, elm.field_tag_attributes(:t, no_attr, :size => 5) %>
23   </div>
24
25   <%= f.hidden_field :panel_id, elm.field_tag_attributes(:panel_id, no_attr) %>
26   <% unless elm.new_record?  %>
27     <%= f.hidden_field :id, elm.field_tag_attributes(:id, no_attr) %>
28   <% end %>
29
30   <div class="actions">
31     <%= f.submit t('ground_colors.submit'), :class => "submit" %>
32   </div>
33   <% if no_attr > 0 %>
34     <div class="submit-new-form" panel_id="<%= elm.tag_panel_id -%>" element_type="<%= elm.tag_element_type -%>"></div>
35   <% end %>
36 <% end %>