OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[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="field">
9     <%= f.label :code %>
10     <%= f.text_field :code, elm.field_tag_attributes(:code, no_attr, :size => 8 ) %>
11     <div class="colorpicker-wrap">
12       <div class="colorpicker" style="float: left;" <%= raw elm.field_tag_attr(:code_picker, no_attr) -%>>
13         <div id="<%= elm.tag_id(:code_red) -%>" class="colorpicker-red"></div>
14         <div id="<%= elm.tag_id(:code_green) -%>" class="colorpicker-green"></div>
15         <div id="<%= elm.tag_id(:code_blue) -%>" class="colorpicker-blue"></div>
16       </div>
17       <div style="float: left;">
18         <div id="<%= elm.tag_id(:code_swatch) -%>" class="ui-widget-content ui-corner-all code_swatch"></div>
19       </div>
20       <div style="float: left;">
21         <div id="<%= elm.tag_id(:code_hex) -%>"></div>
22         <div id="<%= elm.tag_id(:code_rgb) -%>"></div>
23       </div>
24       <div style="clear: both;"></div>
25     </div>
26   </div>
27   <div class="field">
28     <%= f.label :z %>
29     <%= f.number_field :z, elm.field_tag_attributes(:z, no_attr, :size => 5) %>
30
31     <%= f.label :t %>
32     <%= f.number_field :t, elm.field_tag_attributes(:t, no_attr, :size => 5) %>
33   </div>
34
35   <%= f.hidden_field :panel_id, elm.field_tag_attributes(:panel_id, no_attr) %>
36   <% unless elm.new_record?  %>
37     <%= f.hidden_field :id, elm.field_tag_attributes(:id, no_attr) %>
38   <% end %>
39
40   <div class="actions">
41     <%= f.submit t('ground_colors.submit'), :class => "submit" %>
42   </div>
43   <% if no_attr > 0 %>
44     <div class="submit-new-form" panel_id="<%= elm.tag_panel_id -%>" element_type="<%= elm.tag_element_type -%>"></div>
45   <% end %>
46 <% end %>