% 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
-%>
<%= field_set_tag 'VM Template', :id => 'xen_templates', :title => _('Template') do -%>
<%= render 'compute_resources_vms/form/templates', :f => f, :compute_resource => compute_resource %>
<% 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 %>
<%= new_child_fields_template(f, :VBDs, {
:object => compute_resource.new_volume,
:partial => 'compute_resources_vms/form/volume', :form_builder_attrs => { :compute_resource => compute_resource } }) %>
<%= 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 %>
<% 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 %>
<% end -%>
<% end -%>
<% checked = params[:host] && params[:host][:compute_attributes] && params[:host][:compute_attributes][:start] || '1' %>
<%= checkbox_f f, :start, { :checked => (checked == '1'), :help_inline => _('Power ON this machine') } if new %>