% new = f.object
hide_raw = ''
if params && params['host'] && params['host']['compute_attributes'] && params['host']['compute_attributes']['custom_template_name'] != ''
hide_raw = 'display:none;'
end
if controller_name == 'hosts'
fields_enabled = true
elsif controller_name == 'compute_attributes'
fields_enabled = true
else
fields_enabled = false
end
-%>
<%= field_set_tag 'VM Template', :id => 'xen_templates', :title => _('Template') do -%>
<%= render 'compute_resources_vms/form/templates', :f => f, :compute_resource => compute_resource, :new => new %>
<% end -%>
<%= field_set_tag 'Xen Store Data', :id => 'xen_store_data', :title => _('Xen Store Data') do -%>
<%= render 'compute_resources_vms/form/xenstore', :f => f, :compute_resource => compute_resource, :new => new %>
<% end %>
<%= field_set_tag 'Storage', :id => 'storage_volumes', :title => _('Storage') do -%>
<%= f.fields_for :VBDs do |i| %>
<%= render 'compute_resources_vms/form/volume', :f => i, :compute_resource => compute_resource, :new => new %>
<% end -%>
<% end -%>
<%= field_set_tag 'Network interfaces', :id => 'network_interfaces', :title => _('Networks') do -%>
<%= f.fields_for :VIFs do |i| %>
<%= render 'compute_resources_vms/form/network', :f => i, :compute_resource => compute_resource, :new => new %>
<% end -%>
<% end -%>
<%= field_set_tag 'VM Startup Options', :id => 'vm_starup_options', :title => _('Power ON this VM') do -%>
<%= checkbox_f f, :start, :checked => true, :label => _("Power ON this VM") %>
<% end -%>