<%= javascript "lookup_keys" %> <%= form_for @puppetclass, :html=>{:class=>"well"} do |f| %> <%= base_errors_for @puppetclass %>
<%= text_f f, :name %> <%= text_f f, :environments, :value => @puppetclass.environments.to_sentence, :class=>'span4', :label=> _('Puppet Environments'), :disabled => true %> <%= multiple_checkboxes f, :hostgroups, @puppetclass, Hostgroup, :label => _("Hostgroups") %>
<% if @puppetclass.class_params.empty? -%>
×

<%= _('This Puppet class has no parameters in its signature.') %>
<%= _('To update the class signature, go to the Puppet Classes page and select "Import".') %>

<% else -%>
<%= _('Undo remove') %>
@ <%= select_tag "environment_filter", options_from_collection_for_select(@puppetclass.environments, "id", "name"), :include_blank => "All Environments - (Not filtered)", :onchange=>'filterByEnvironment(this)'%>
<%= f.fields_for :class_params, f.object.class_params.all(:include => [:environment_classes, :environments, :lookup_values]) do |lookup_keys_form| %> <%= render 'lookup_keys/fields', :f => lookup_keys_form %> <% end %>
<% end -%>
<% if @puppetclass.lookup_keys.empty? -%>
×

<%= _('Help!') -%> <%= (_('What is a Smart variable?') % 'http://theforeman.org/projects/foreman/wiki/Smart_Variables').html_safe %>

<% end -%>
<%= _('Undo remove') %>
<%= f.fields_for :lookup_keys do |lookup_keys_form| %> <%= render 'lookup_keys/fields', :f => lookup_keys_form %> <% end %>
<%= new_child_fields_template(f, :lookup_keys, {:partial => "lookup_keys/fields"})%>
<%= submit_or_cancel f %>
<% end %>