Project

General

Profile

Download (1.46 KB) Statistics
| Branch: | Tag: | Revision:
<% form_for @host do |f| %>
<%= f.error_messages %>

<% field_set_tag 'Primary settings' do -%>
<%= f.label :name %>
<%= f.text_field :name, :size => 16, :value => @host.shortname %>
<%= f.label :hostgroup %>
<%= f.collection_select :hostgroup_id, Hostgroup.all, :id, :name, :include_blank => true %>
<%= f.label :environment %>
<%= f.collection_select :environment_id, Environment.all, :id, :to_label, :include_blank => true %>
<%= f.label :puppetmaster %>
<%= f.text_field :puppetmaster, :size => 10, :value => @host.puppetmaster %>

<%= link_to_function "Additional Classes", toggle_div(:classlist) %>

<div id="classlist", style=display:none;>
<% if @environment -%>
<%= render 'puppetclasses/class_selection', :obj => @host %>
<% else -%>
<b>Please select an Environment first</b>
<% end -%>
</div>

<% end -%>

<%= observe_field :host_environment_id,
:url => { :action => :environment_selected, :id => @host.id },
:update => :classlist,
:with => :environment_id %>

<% if SETTINGS[:unattended].nil? or SETTINGS[:unattended] -%>
<%= render 'unattended', :f => f %>
<% end -%>

<% field_set_tag 'Additional Information' do -%>
<%= f.text_area :comment, :size => "120x5" %>
<% end -%>

<%= render :partial => "common_parameters/parameters", :locals => {:f => f, :type => :host_parameters} %>

<p><%= f.submit "Submit" %></p>
<% end %>
(3-3/17)