Compare commits

..

2 Commits

Author SHA1 Message Date
Santiago L 6d489afa37 Add TODO comment 2023-11-29 14:32:01 +01:00
Santiago L be3ca0aecd Render top & subdomains (if any) 2023-11-29 14:31:43 +01:00
2 changed files with 26 additions and 1 deletions

View File

@ -137,6 +137,9 @@ class MailboxUpdateForm(forms.ModelForm):
model = Mailbox
# TODO(@slamora): validate provided values
# on RecordCreateForm & RecordUpdateForm
# e.g. A records must point to IPv4
class RecordCreateForm(forms.ModelForm):
class Meta:

View File

@ -4,7 +4,18 @@
{% block content %}
<a class="btn-arrow-left" href="{% url 'musician:dashboard' %}">{% trans "Go back" %}</a>
<h1 class="service-name">{% trans "DNS settings for" %} <span class="font-weight-light">{{ object.name }}</span></h1>
<h1 class="service-name">
{% trans "DNS settings for" %} <span class="font-weight-light">{{ object.name }}</span>
</h1>
{% if object.top %}
<div class="mb-4">
<a class="btn btn-sm btn-secondary" href="{% url 'musician:domain-detail' object.top.pk %}">
{% trans "Go to top level domain" %} <span class="font-weight-bold">{{ object.top.name }}</span></a>
</div>
{% endif %}
<p class="service-description">{% trans "DNS settings page description." %}</p>
<table class="table service-list">
@ -34,4 +45,15 @@
</tbody>
</table>
<a class="btn btn-primary mt-4 mb-4" href="{% url 'musician:domain-add-record' object.pk %}">{% trans "Add new record" %}</a></td>
<div class="domain-subdomains">
<h2>{% trans "Subdomains" %}</h2>
<ul>
{% for subdomain in object.subdomains.all %}
<li><a href="{% url 'musician:domain-detail' subdomain.pk %}">{{ subdomain.name }}</a> <pre>{{ subdomain.records.all|join:", " }}</pre></li>
{% empty %}
{% trans "Any related subdomain." %}
{% endfor %}
</ul>
</div>
{% endblock %}