OSDN Git Service

5422d57e40a3f0ff2dcb032662f434518ece6dd7
[pettanr/pettanr.git] / app / views / ground_pictures / _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 :repeat %>
10     <%= f.collection_select :repeat, t_select_items(MagicNumber['ground_picture_repeat_items']), *elm.select_tag_attributes(elm.repeat, :repeat, no_attr) %>
11   </div>
12   <div class="field">
13     <%= f.label :x %>
14     <%= f.number_field :x, elm.field_tag_attributes(:x, no_attr, :size => 5) %>
15
16     <%= f.label :y %>
17     <%= f.number_field :y, elm.field_tag_attributes(:y, no_attr, :size => 5) %>
18   </div>
19   <div class="field">
20     <%= f.label :z %>
21     <%= f.number_field :z, elm.field_tag_attributes(:z, no_attr, :size => 5) %>
22
23     <%= f.label :t %>
24     <%= f.number_field :t, elm.field_tag_attributes(:t, no_attr, :size => 5) %>
25   </div>
26   
27   <%= f.hidden_field :panel_id, elm.field_tag_attributes(:panel_id, no_attr) %>
28   <%= f.hidden_field :picture_id, elm.field_tag_attributes(:picture_id, no_attr) %>
29   <% unless elm.new_record?  %>
30     <%= f.hidden_field :id, elm.field_tag_attributes(:id, no_attr) %>
31   <% end %>
32
33   <div class="actions">
34     <%= f.submit t('ground_pictures.submit'), :class => "submit" %>
35   </div>
36 <% end %>