OSDN Git Service

6a3f3a6678526c1cd814bdb136ba8e9adf25e39e
[pettanr/pettanr.git] / app / views / speech_balloons / _form.html.erb
1 <%= form_for(speech_balloon) do |f| %>
2   <%= render 'system/error_explanation', :obj => speech_balloon %>
3
4   <div class="field">
5     <%= f.label :caption %><br />
6     <%= f.number_field :caption, :id => speech_balloon.field_tag_id(:caption), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :caption, :tree => speech_balloon.field_tree(:caption) %>
7   </div>
8   <div class="field">
9     <%= f.label :z %><br />
10     <%= f.number_field :z, :id => speech_balloon.field_tag_id(:z), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :z, :tree => speech_balloon.field_tree(:z) %>
11   </div>
12   <div class="field">
13     <%= f.label :t %><br />
14     <%= f.number_field :t, :id => speech_balloon.field_tag_id(:t), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :t, :tree => speech_balloon.field_tree(:t) %>
15   </div>
16   
17   <%= f.fields_for(:balloon) do |bf| %>
18     <%= render 'balloons/form', :f => bf, :balloon => speech_balloon.balloon %>
19   <% end %>
20
21   <%= f.fields_for(:speech) do |sf| %>
22     <%= render 'speeches/form', :f => sf, :speech => speech_balloon.speech %>
23   <% end %>
24
25   <%= f.hidden_field :panel_id, :id => speech_balloon.field_tag_id(:panel_id), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :panel_id, :tree => speech_balloon.field_tree(:panel_id) %>
26   <%= f.hidden_field :classname, :id => speech_balloon.field_tag_id(:classname), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :classname, :tree => speech_balloon.field_tree(:classname) %>
27   <%= f.hidden_field :speech_balloon_template_id, :id => speech_balloon.field_tag_id(:speech_balloon_template_id), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :speech_balloon_template_id, :tree => speech_balloon.field_tree(:speech_balloon_template_id) %>
28   <% unless speech_balloon.new_record?  %>
29     <%= f.hidden_field :id, :id => speech_balloon.field_tag_id(:id), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :id, :tree => speech_balloon.field_tree(:id) %>
30   <% end %>
31
32   <div class="actions">
33     <%= f.submit t('speech_balloons.submit'), :class => "submit" %>
34   </div>
35 <% end %>