<%= javascript 'host_edit' %> <%= form_for @hostgroup do |f| %> <%= base_errors_for @hostgroup %>
<%= select_f f, :parent_id, accessible_hostgroups, :id, :to_label, {:include_blank => true}, {:label => _('Parent'), :onchange => 'hostgroup_changed(this);', :'data-url'=> process_hostgroup_hosts_path, :help_inline => image_tag('/assets/spinner.gif', :id => 'hostgroup_indicator', :class => 'hide').html_safe } %> <%= text_f f, :name %> <%= select_f f, :environment_id, Environment.all, :id, :to_label, {:include_blank => true}, {:label => _("Environment"), :onchange => 'update_puppetclasses(this);', :"data-url" => environment_selected_hostgroups_path} %> <%= puppet_master_fields f %>
<% if @environment or @hostgroup.environment -%> <%= render 'puppetclasses/class_selection', :obj => @hostgroup %> <% else -%>

Please select an Environment first

<% end -%>
<%= render 'common/domain_subnet', :item => @hostgroup %>
<%= render "common/os_selection/initial", :item=> @hostgroup %> <%= password_f f, :root_pass %>
<%= render "common_parameters/parameters", { :f => f, :type => :group_parameters } %>
<% if show_location_tab? %>
<%= multiple_selects f, :locations, Location, @hostgroup.location_ids, :label => _("Locations") %>
<% end %> <% if show_organization_tab? %>
<%= multiple_selects f, :organizations, Organization, @hostgroup.organization_ids, :label => _("Organizations") %>
<% end %>
<%= submit_or_cancel f %> <% end %>