{% extends '_base.html' %}
{% load render_table from django_tables2 %}
{% load form_helpers %}

{% block title %}Aggregate Import{% endblock %}

{% block content %}
<h1>Aggregate Import</h1>
<div class="row">
	<div class="col-md-6">
		<form action="." method="post" class="form">
		    {% csrf_token %}
		    {% render_form form %}
		    <div class="form-group">
		        <button type="submit" class="btn btn-primary">Submit</button>
		        <a href="{% url obj_list_url %}" class="btn btn-default">Cancel</a>
		    </div>
		</form>
	</div>
	<div class="col-md-6">
		<h4>CSV Format</h4>
		<table class="table">
			<thead>
				<tr>
					<th>Field</th>
					<th>Description</th>
					<th>Example</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>Prefix</td>
					<td>IPv4 or IPv6 network</td>
					<td>172.16.0.0/12</td>
				</tr>
				<tr>
					<td>RIR</td>
					<td>Name of RIR</td>
					<td>RFC 1918</td>
				</tr>
				<tr>
					<td>Date Added</td>
					<td>Date in YYYY-MM-DD format (optional)</td>
					<td>2016-02-23</td>
				</tr>
				<tr>
					<td>Description</td>
					<td>Short description (optional)</td>
					<td>Private IPv4 space</td>
				</tr>
			</tbody>
		</table>
		<h4>Example</h4>
		<pre>172.16.0.0/12,RFC 1918,2016-02-23,Private IPv4 space</pre>
	</div>
</div>
{% endblock %}
