{% extends "site/base.html" %}
{% load util %}
{% load i18n %}

{% block content %}
<div class="row panel">
  <div class="col-xs-12">
{% if user.is_verified_user %}


<div class="marg-bot-15" id="success" style="display:none;">
<div class="editable popin info center">
<p>
{% blocktrans trimmed %}
Thank you for your suggestion.
{% endblocktrans %}
</p>
<p>
<a href="/suggest/net">{% trans "Suggest another network" %}</a>
</p>
</div>
</div>


      <div class="editable always auto-toggled create-form"
           id="create-net-form"
           data-edit-target="api:net:create"
           data-edit-enter-action="submit">

        <div class="payload">
          <div data-edit-name="suggest">yes</div>
          <div data-edit-name="org_id">0</div>
        </div>

        <div class="row">
          <div class="col-xs-12 col-sm-6 col-md-6">
            <div class="row">
              <div class="col-xs-4 col-sm-5 col-md-4">{% trans "Name" %}</div>
              <div class="col-xs-8 col-sm-7 col-md-8">
                <div data-edit-type="string"
                     data-edit-required="yes"
                     data-edit-name="name"></div>
              </div>
            </div>

            <div class="row">
              <div class="col-xs-4 col-sm-5 col-md-4">{% trans "Website" %}</div>
              <div class="col-xs-8 col-sm-7 col-md-8">
                <div data-edit-type="url"
                     data-edit-name="website"></div>
              </div>
            </div>

            <div class="row">
              <div class="col-xs-4 col-sm-5 col-md-4">{% trans "ASN" %}</div>
              <div class="col-xs-8 col-sm-7 col-md-8">
                <div data-edit-type="string"
                     data-edit-required="yes"
                     data-edit-name="asn"></div>
              </div>
            </div>

            <div class="row">
              <div class="col-xs-4 col-sm-5 col-md-4">{% trans "IRR as-set/route-set" %}</div>
              <div class="col-xs-8 col-sm-7 col-md-8">
                <div data-edit-type="string"
                     data-edit-name="irr_as_set"></div>
              </div>
            </div>


            <div class="row">
              <div class="col-xs-4 col-sm-5 col-md-4">{% trans "Network Type" %}</div>
              <div class="col-xs-8 col-sm-7 col-md-8">
                <div data-edit-type="select"
                     data-edit-name="info_type"
                     data-edit-data="enum/net_types_trunc"></div>
              </div>
            </div>

            <div class="row">
              <div class="col-xs-4 col-sm-5 col-md-4">{% trans "Traffic Levels" %}</div>
              <div class="col-xs-8 col-sm-7 col-md-8">
                <div data-edit-type="select"
                     data-edit-name="info_traffic"
                     data-edit-data="enum/traffic"></div>
              </div>
            </div>

            <div class="row">
              <div class="col-xs-4 col-sm-5 col-md-4">{% trans "Traffic Ratios" %}</div>
              <div class="col-xs-8 col-sm-7 col-md-8">
                <div data-edit-type="select"
                     data-edit-name="info_ratio"
                     data-edit-data="enum/ratios_trunc"></div>
              </div>
            </div>

            <div class="row">
              <div class="col-xs-4 col-sm-5 col-md-4">{% trans "Geographic Scope" %}</div>
              <div class="col-xs-8 col-sm-7 col-md-8">
                <div data-edit-type="select"
                     data-edit-name="info_scope"
                     data-edit-data="enum/scopes_trunc"></div>
              </div>
            </div>

            <div class="row">
              <div class="col-xs-4 col-sm-5 col-md-4">{% trans "Unicast IPv4" %}</div>
              <div class="col-xs-8 col-sm-7 col-md-8">
                <div data-edit-type="bool"
                     data-edit-name="info_unicast"></div>
              </div>
            </div>

            <div class="row">
              <div class="col-xs-4 col-sm-5 col-md-4">{% trans "Multicast" %}</div>
              <div class="col-xs-8 col-sm-7 col-md-8">
                <div data-edit-type="bool"
                     data-edit-name="info_multicast"></div>
              </div>
            </div>
            <div class="row">
              <div class="col-xs-4 col-sm-5 col-md-4">{% trans "IPv6" %}</div>
              <div class="col-xs-8 col-sm-7 col-md-8">
                <div data-edit-type="bool"
                     data-edit-name="info_ipv6"></div>
              </div>
            </div>
            <div class="row">
              <div class="col-xs-4 col-sm-5 col-md-4">{% trans "Policy URL" %}</div>
              <div class="col-xs-8 col-sm-7 col-md-8">
                <div data-edit-type="url"
                     data-edit-name="policy_url"></div>
              </div>
            </div>


            <div class="row">
              <div class="col-xs-4 col-sm-5 col-md-4">{% trans "General Policy" %}</div>
              <div class="col-xs-8 col-sm-7 col-md-8">
                <div data-edit-type="select"
                     data-edit-name="policy_general"
                     data-edit-required="yes"
                     data-edit-data="enum/policy_general"></div>
              </div>
            </div>

            <div class="row">
              <div class="col-xs-4 col-sm-5 col-md-4">{% trans "Multiple Locations" %}</div>
              <div class="col-xs-8 col-sm-7 col-md-8">
                <div data-edit-type="select"
                     data-edit-name="policy_locations"
                     data-edit-required="yes"
                     data-edit-data="enum/policy_locations"></div>
              </div>
            </div>

            <div class="row">
              <div class="col-xs-4 col-sm-5 col-md-4">{% trans "Ratio Requirement" %}</div>
              <div class="col-xs-8 col-sm-7 col-md-8">
                <div data-edit-type="bool"
                     data-edit-name="policy_ratio"></div>
              </div>
            </div>

            <div class="row">
              <div class="col-xs-4 col-sm-5 col-md-4">{% trans "Contract Requirement" %}</div>
              <div class="col-xs-8 col-sm-7 col-md-8">
                <div data-edit-type="select"
                     data-edit-name="policy_contracts"
                     data-edit-required="yes"
                     data-edit-data="enum/policy_contracts"></div>
              </div>
            </div>

          </div>
          <div class="col-xs-12 col-sm-6 col-md-6">
            {% include "site/entity_suggest.html" with entity_name="Network" %}

          </div>
        </div>
      </div>



{% else %}
<div class="marg-bot-15">
<div class="editable popin error">
<p>
{% blocktrans trimmed %}
Only verified users may suggest entities.
{% endblocktrans %}
</p>
</div>
</div>
{% endif %}
</div>
</div>

<script language="javascript" type="text/javascript">
$('#create-net-form').each(function(idx) {
  form = $(this)
  $(this).on("action-success:submit", function(ev, data) {
    $("#success").show();
    form.hide();
  })
});
</script>
{% endblock %}
