OSDN Git Service

w
[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="row_break">
9   </div>
10   <div class="field">
11     <%= f.label :repeat %>
12     <%= f.collection_select :repeat, t_select_items(manifest.select_items['magic_number']['ground_picture_repeat_items']), *elm.select_tag_attributes(elm.repeat, :repeat, no_attr) %>
13   </div>
14   <div class="row_break">
15   </div>
16   <div class="field">
17     <%= f.label :x %>
18     <%= f.number_field :x, elm.field_tag_attributes(:x, no_attr, :size => 5) %>
19   </div>
20   <div class="row_break">
21   </div>
22   <div class="field">
23     <%= f.label :y %>
24     <%= f.number_field :y, elm.field_tag_attributes(:y, no_attr, :size => 5) %>
25   </div>
26   <div class="row_break">
27   </div>
28   <div class="field">
29     <%= f.label :z %>
30     <%= f.number_field :z, elm.field_tag_attributes(:z, no_attr, :size => 5) %>
31   </div>
32   <div class="row_break">
33   </div>
34   <div class="field">
35     <%= f.label :t %>
36     <%= f.number_field :t, elm.field_tag_attributes(:t, no_attr, :size => 5) %>
37   </div>
38   <div class="row_break">
39   </div>
40   
41   <%= f.hidden_field :panel_id, elm.field_tag_attributes(:panel_id, no_attr) %>
42   <%= f.hidden_field :picture_id, elm.field_tag_attributes(:picture_id, no_attr) %>
43   <% unless elm.new_record?  %>
44     <%= f.hidden_field :id, elm.field_tag_attributes(:id, no_attr) %>
45   <% end %>
46
47   <div class="actions">
48     <%= f.submit t('ground_pictures.submit'), :class => "submit" %>
49   </div>
50 <% end %>