Revision 571614ae
Added by Joseph Magen over 9 years ago
app/views/hosts/_form.html.erb | ||
---|---|---|
{ :include_blank => !@host.managed?, :selected => @organization.try(:id)},
|
||
{ :disabled => !@host.new_record?,
|
||
:onchange => 'organization_changed(this);', :label => _("Organization"), :'data-host-id' => @host.id,
|
||
:'data-url' => process_taxonomy_hosts_path,
|
||
:help_inline => :indicator } %>
|
||
:'data-url' => process_taxonomy_hosts_path,
|
||
:help_inline => :indicator,
|
||
:required => SETTINGS[:organizations_enabled] } %>
|
||
<% end %>
|
||
|
||
<% if show_location_tab? %>
|
||
... | ... | |
{ :disabled => !@host.new_record?,
|
||
:onchange => 'location_changed(this);', :label => _("Location"), :"data-host-id" => @host.id,
|
||
:'data-url' => process_taxonomy_hosts_path, :selected => Location.my_locations,
|
||
:help_inline => :indicator } %>
|
||
:help_inline => :indicator,
|
||
:required => SETTINGS[:locations_enabled] } %>
|
||
<% end %>
|
||
|
||
<%= select_f f, :hostgroup_id, accessible_hostgroups, :id, :to_label,
|
Also available in: Unified diff
fixes #7560 - add :required => true on host fields that have conditional validation if host.managed?