<%= form_for @domain, :url => (@domain.new_record? ? domains_path : domain_path(:id => @domain)) do |f| %>
  <%= base_errors_for @domain %>
  <ul class="nav nav-tabs" data-tabs="tabs">
    <li class="active"><a href="#primary" data-toggle="tab"><%= _("Domain") %></a></li>
    <li><a href="#params" data-toggle="tab"><%= _("Parameters") %></a></li>
    <% if show_location_tab? %>
      <li><a href="#locations" data-toggle="tab"><%= _("Locations") %></a></li>
    <% end %>
    <% if show_organization_tab? %>
      <li><a href="#organizations" data-toggle="tab"><%= _("Organizations") %></a></li>
    <% end %>
  </ul>

  <div class="tab-content">

    <div class="tab-pane active" id="primary">
      <%= text_f   f, :name, :help_inline => _("The full DNS domain name") %>
      <%= text_f   f, :fullname, :help_inline => _("Full name describing the domain") %>
      <%= select_f f, :dns_id, Feature.find_by_name("DNS").smart_proxies, :id, :name,
        {:include_blank => _("None")}, {:label => _("DNS Proxy"), :help_inline => _("DNS proxy to use within this domain for managing A records, note that PTR records are managed via Subnet DNS proxy")}
      %>
    </div>

    <div class="tab-pane" id="params">
      <%= render "common_parameters/parameters", { :f => f, :type => :domain_parameters } %>
    </div>

    <%= render 'taxonomies/loc_org_tabs', :f => f, :obj => @domain %>

  </div>

  <%= submit_or_cancel f %>
<% end %>
