<%= fields_for item do |f| %>
  <%= select_f f, :subnet_id, domain_subnets, :id, :to_label,
               { :include_blank => domain_subnets.any? ? blank_or_inherit_f(f, :subnet) : _("No subnets") },
               { :disabled => domain_subnets.empty?,
                 :data     => { :url     => SETTINGS[:unattended] ? freeip_subnets_path : '',
                                :subnets => subnets_ipam_data.to_json },
                 :label    => _("Subnet"),
                 :help_inline => :indicator,
                 :onchange => 'subnet_selected(this);' }
  %>
<% end %>
