OSDN Git Service

t#:
[pettanr/pettanr.git] / app / views / sheet_panels / _form.html.erb
1 <%= form_for(elm) do |f| %>
2   <%= render 'system/error_explanation', :obj => elm %>
3
4   <div class="field">
5     <%= f.label :sheet_id %>
6     <% if elm.new_record? %>
7       <%= f.number_field :sheet_id %>
8     <% else %>
9       <%= f.number_field :sheet_id, elm.field_tag_attributes(:sheet_id, no_attr) %>
10     <% end %>
11
12     <%= f.label :panel_id %>
13     <% if elm.new_record? %>
14       <%= f.number_field :panel_id %>
15     <% else %>
16       <%= f.number_field :panel_id, elm.field_tag_attributes(:panel_id, no_attr) %>
17     <% end %>
18   </div>
19   <div class="field">
20     <%= f.label :x %>
21     <% if elm.new_record? %>
22       <%= f.number_field :x %>
23     <% else %>
24       <%= f.number_field :x, elm.field_tag_attributes(:x, no_attr, :size => 5) %>
25     <% end %>
26
27     <%= f.label :y %>
28     <% if elm.new_record? %>
29       <%= f.number_field :y %>
30     <% else %>
31       <%= f.number_field :y, elm.field_tag_attributes(:y, no_attr, :size => 5) %>
32     <% end %>
33   </div>
34   <div class="field">
35     <%= f.label :z %>
36     <% if elm.new_record? %>
37       <%= f.number_field :z %>
38     <% else %>
39       <%= f.number_field :z, elm.field_tag_attributes(:z, no_attr, :size => 5) %>
40     <% end %>
41
42     <%= f.label :t %>
43     <% if elm.new_record? %>
44       <%= f.number_field :t %>
45     <% else %>
46       <%= f.number_field :t, elm.field_tag_attributes(:t, no_attr, :size => 5) %>
47     <% end %>
48   </div>
49
50   <% unless elm.new_record?  %>
51     <%= f.hidden_field :id, elm.field_tag_attributes(:id, no_attr) %>
52   <% end %>
53
54   <div class="actions">
55     <%= f.submit t('sheet_panels.submit'), :class => "submit" %>
56   </div>
57 <% end %>