OSDN Git Service

merge v06sheet
[pettanr/pettanr.git] / app / views / panel_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 :x %>
12     <%= f.number_field :x, elm.field_tag_attributes(:x, no_attr, :size => 5) %>
13   </div>
14   <div class="row_break">
15   </div>
16   <div class="field">
17     <%= f.label :y %>
18     <%= f.number_field :y, elm.field_tag_attributes(:y, no_attr, :size => 5) %>
19   </div>
20   <div class="row_break">
21   </div>
22   <div class="field">
23     <%= f.label :z %>
24     <%= f.number_field :z, elm.field_tag_attributes(:z, no_attr, :size => 5) %>
25   </div>
26   <div class="row_break">
27   </div>
28   <div class="field">
29     <%= f.label :t %>
30     <%= f.number_field :t, elm.field_tag_attributes(:t, no_attr, :size => 5) %>
31   </div>
32   <div class="row_break">
33   </div>
34   <div class="field">
35     <%= f.label :width %>
36     <%= f.number_field :width, elm.field_tag_attributes(:width, no_attr, :size => 5) %>
37     <% if elm.has_helper?(:width) %>
38       <%= render elm.form_helper_template(:width), :elm => elm, :no_attr => no_attr, :opt => {:class => "panel_picture_width_tool"} %>
39     <% end %>
40   </div>
41   <div class="row_break">
42   </div>
43   <div class="field">
44     <%= f.label :height %>
45     <%= f.number_field :height, elm.field_tag_attributes(:height, no_attr, :size => 5) %>
46     <% if elm.has_helper?(:height) %>
47       <%= render elm.form_helper_template(:height), :elm => elm, :no_attr => no_attr, :opt => {:class => "panel_picture_height_tool"} %>
48     <% end %>
49   </div>
50   <div class="row_break">
51   </div>
52   <div class="field">
53     <%= f.label :link %>
54     <%= f.text_field :link, elm.field_tag_attributes(:link, no_attr) %>
55   </div>
56   <%= f.hidden_field :panel_id, elm.field_tag_attributes(:panel_id, no_attr) %>
57   <%= f.hidden_field :picture_id, elm.field_tag_attributes(:picture_id, no_attr) %>
58   <% unless elm.new_record?  %>
59     <%= f.hidden_field :id, elm.field_tag_attributes(:id, no_attr) %>
60   <% end %>
61
62   <div class="actions">
63     <%= f.submit t('panel_pictures.submit'), :class => "submit" %>
64   </div>
65 <% end %>