Only show warning if no mnt present on domains
This commit is contained in:
parent
e701b4be7f
commit
246032f03e
|
@ -20,7 +20,7 @@ def overview(request):
|
|||
nameservers = Nameserver.objects.filter(mnt_by__in=mnts).distinct()
|
||||
reversezones = ReverseZone.objects.filter(Q(parentNet__mnt_by__in=mnts) | Q(parentNet__mnt_lower__in=mnts)).distinct()
|
||||
|
||||
return render(request, "domains/overview.html", {"domains": domains, "nameservers": nameservers, 'reversezones': reversezones})
|
||||
return render(request, "domains/overview.html", {"mnts": mnts, "domains": domains, "nameservers": nameservers, 'reversezones': reversezones})
|
||||
|
||||
|
||||
class DomainCreate(LoginRequiredMixin, CreateView):
|
||||
|
|
|
@ -9,10 +9,12 @@
|
|||
<div class="panel-heading">DNS Overview</div>
|
||||
<div class="panel-body">
|
||||
|
||||
{% if not mnts %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
|
||||
<strong>Warning</strong>: You have no maintainer object. Create one <a class="alert-link" href="{% url "whoisdb:dashboard" %}">here</a> before creating domains.
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<h4>Your Nameservers (<a href="{% url "domains:nameserver-create" %}">New nameserver</a>)</h4>
|
||||
|
|
Loading…
Reference in New Issue