<%= text_f f, :name %>
<%= text_f f, :network %>
<%= text_f f, :mask, :help_inline => _("Netmask for this subnet") %>
<%= text_f f, :gateway, :help_inline => _("Optional: Gateway for this subnet") %>
<%= text_f f, :dns_primary, :help_inline => _("Optional: Primary DNS for this subnet") %>
<%= text_f f, :dns_secondary, :help_inline => _("Optional: Secondary DNS for this subnet") %>
<%= selectable_f f, :ipam, Subnet.ipam_modes_with_translations, {}, :data => {'disable-auto-suggest-on' => Subnet::IPAM_MODES[:none]},
                 :label => _('IPAM'),
                 :help_inline => popover(
                         _("IP Address Management"),
                         _("You can select one of three possible IPAM modes:<br/>" +
                                   "<ul><li><strong>DHCP</strong> - will manage the IP on DHCP through assigned DHCP proxy, auto-suggested IPs come from DHCP</li>" +
                                   "<li><strong>Internal DB</strong> - use internal DB to auto-suggest free IP based on other interfaces on same subnet respecting range if specified, useful mainly with static boot mode</li>" +
                                   "<li><strong>None</strong> - leave IP management solely on user, no auto-suggestion</li></ul>"),
                         :rel => 'popover',
                         :'data-placement' => "top"
                 ).html_safe %>
<div id='ipam_options' class ='<%= f.object.ipam? ? "" : "hide" %>'>
  <%= text_f f, :from, :help_inline => _("Optional: Starting IP Address for IP auto suggestion") %>
  <%= text_f f, :to,   :help_inline => _("Optional: Ending IP Address for IP auto suggestion") %>
</div>
<%= number_f f, :vlanid, :min => 0, :max => 4095, :help_inline => _("Optional: VLAN ID for this subnet") %>
<%= selectable_f f, :boot_mode, Subnet.boot_modes_with_translations, {},
                 :help_inline => _("Default boot mode for interfaces assigned to this subnet") %>
<%= hidden_field_tag :redirect, params[:redirect] %>
