<%# Copyright 2018 Tristan Robert This file is part of ForemanFogProxmox. ForemanFogProxmox is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ForemanFogProxmox is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ForemanFogProxmox. If not, see . %> <%= javascript_include_tag 'foreman_fog_proxmox/proxmox_vm', "data-turbolinks-track" => true %> <%= javascript_tag("$(document).on('ContentLoad', tfm.numFields.initAll)"); %> <%= select_f f, :type, proxmox_types_map, :id, :name, { }, :label => _('Type'), :label_size => "col-md-2", :onchange => "vmTypeSelected()", :disabled => !new_vm %> <%= render :partial => "compute_resources_vms/form/proxmox/general", :locals => { :f => f, :compute_resource => compute_resource, :new_vm => new_vm, :from_profile => from_profile } %> <%= render :partial => "compute_resources_vms/form/proxmox/container/extended", :locals => { :f => f, :compute_resource => compute_resource, :new_vm => new_vm } %> <%= render :partial => "compute_resources_vms/form/proxmox/server/advanced", :locals => { :f => f, :compute_resource => compute_resource, :new_vm => new_vm } %> <%= render :partial => "compute_resources_vms/form/proxmox/container/advanced", :locals => { :f => f, :compute_resource => compute_resource, :new_vm => new_vm } %> <%= f.fields_for :config, compute_resource.new_server_vm(object_to_config_hash(f.object)).config, include_id: false do |server_config|%> <%= render :partial => "compute_resources_vms/form/proxmox/server/config", :locals => { :f => server_config, :compute_resource => compute_resource, :host => @host, :new_vm => new_vm, :item_layout => 'removable', :type => f.object.type } %> <% end %> <%= f.fields_for :config, compute_resource.new_container_vm(object_to_config_hash(f.object)).config, include_id: false do |container_config|%> <%= render :partial => "compute_resources_vms/form/proxmox/container/config", :locals => { :f => container_config, :compute_resource => compute_resource, :host => @host, :new_vm => new_vm, :item_layout => 'removable', :type => f.object.type } %> <% end %>