OSDN Git Service

t#2334:add gc offset
[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="row_break">
9   </div>
10   <div class="field">
11     <%= f.label :code %>
12     <%= f.text_field :code, elm.field_tag_attributes(:code, no_attr, :size => 8) %>
13     <% if elm.has_helper?(:code) %>
14       <div class="ground_color-code-wrap">
15         <%= render elm.form_helper_template(:code), :elm => elm, :no_attr => no_attr %>
16       </div>
17    <% end %>
18   </div>
19   <div class="row_break">
20   </div>
21   <div class="field">
22     <%= f.label :orientation %>
23     <%= f.collection_select :orientation, t_select_items(MagicNumber['ground_color_orientation_items']), :last, :first, :html => {:selected => elm.orientation} %>
24
25     <%= f.label :xy %>
26     <%= f.number_field :xy, elm.field_tag_attributes(:xy, no_attr, :size => 5) %>
27
28     <%= f.label :wh %>
29     <%= f.number_field :wh, elm.field_tag_attributes(:wh, no_attr, :size => 5) %>
30   </div>
31   <div class="row_break">
32   </div>
33   <div class="field">
34     <%= f.label :z %>
35     <%= f.number_field :z, elm.field_tag_attributes(:z, no_attr, :size => 5) %>
36   </div>
37   <div class="row_break">
38   </div>
39   <div class="field">
40     <%= f.label :t %>
41     <%= f.number_field :t, elm.field_tag_attributes(:t, no_attr, :size => 5) %>
42   </div>
43   <div class="row_break">
44   </div>
45
46   <%= f.hidden_field :panel_id, elm.field_tag_attributes(:panel_id, no_attr) %>
47   <% unless elm.new_record?  %>
48     <%= f.hidden_field :id, elm.field_tag_attributes(:id, no_attr) %>
49   <% end %>
50
51   <div class="actions">
52     <%= f.submit t('ground_colors.submit'), :class => "submit" %>
53   </div>
54   <% if no_attr > 0 %>
55     <div class="submit-new-form" panel_id="<%= elm.tag_panel_id -%>" element_type="<%= elm.tag_element_type -%>"></div>
56   <% end %>
57 <% end %>