Closes #756: Added contact details to site model

This commit is contained in:
Jeremy Stretch
2016-12-29 11:37:40 -05:00
parent 8edaff860c
commit e7b08f8f2f
8 changed files with 94 additions and 5 deletions

View File

@@ -110,6 +110,36 @@
{% endif %}
</td>
</tr>
<tr>
<td>Contact Name</td>
<td>
{% if site.contact_name %}
<span>{{ site.contact_name }}</span>
{% else %}
<span class="text-muted">N/A</span>
{% endif %}
</td>
</tr>
<tr>
<td>Contact Phone</td>
<td>
{% if site.contact_phone %}
<a href="tel:{{ site.contact_phone }}">{{ site.contact_phone }}</a>
{% else %}
<span class="text-muted">N/A</span>
{% endif %}
</td>
</tr>
<tr>
<td>Contact E-Mail</td>
<td>
{% if site.contact_email %}
<a href="mailto:{{ site.contact_email }}">{{ site.contact_email }}</a>
{% else %}
<span class="text-muted">N/A</span>
{% endif %}
</td>
</tr>
</table>
</div>
{% with site.get_custom_fields as custom_fields %}

View File

@@ -12,6 +12,9 @@
{% render_field form.asn %}
{% render_field form.physical_address %}
{% render_field form.shipping_address %}
{% render_field form.contact_name %}
{% render_field form.contact_phone %}
{% render_field form.contact_email %}
</div>
</div>
{% if form.custom_fields %}

View File

@@ -53,10 +53,25 @@
<td>Autonomous system number (optional)</td>
<td>65000</td>
</tr>
<tr>
<td>Contact Name</td>
<td>Name of administrative contact (optional)</td>
<td>Hank Hill</td>
</tr>
<tr>
<td>Contact Phone</td>
<td>Phone number (optional)</td>
<td>+1-214-555-1234</td>
</tr>
<tr>
<td>Contact E-mail</td>
<td>E-mail address (optional)</td>
<td>hhill@example.com</td>
</tr>
</tbody>
</table>
<h4>Example</h4>
<pre>ASH-4 South,ash4-south,Pied Piper,Equinix DC6,65000</pre>
<pre>ASH-4 South,ash4-south,Pied Piper,Equinix DC6,65000,Hank Hill,+1-214-555-1234,hhill@example.com</pre>
</div>
</div>
{% endblock %}