Make 'No VPN' undeletable and add it to every new orga
This commit is contained in:
parent
054b791e28
commit
10eab0bbe0
2 changed files with 2 additions and 1 deletions
|
@ -434,6 +434,7 @@ def makeorganization(request):
|
||||||
data = form.cleaned_data
|
data = form.cleaned_data
|
||||||
orga = Organization.objects.create(name=data["name"], userlimit=data["users"])
|
orga = Organization.objects.create(name=data["name"], userlimit=data["users"])
|
||||||
request.user.organization_set.add(orga)
|
request.user.organization_set.add(orga)
|
||||||
|
Network.objects.get(intip="No VPN").organization.add(orga)
|
||||||
return redirect(reverse("organizations"))
|
return redirect(reverse("organizations"))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -124,7 +124,7 @@
|
||||||
<td><div style="display:inline;" title="{% netOrgaString network %}">{{ network.name }}</div></td>
|
<td><div style="display:inline;" title="{% netOrgaString network %}">{{ network.name }}</div></td>
|
||||||
<td>{{ network.intip }}</td>
|
<td>{{ network.intip }}</td>
|
||||||
<td>{{ network.extip }}</td>
|
<td>{{ network.extip }}</td>
|
||||||
<td><a href="#"><i style="color: darkred;" onclick="askdeletenet({{ network.id }});" class="fas fa-trash-alt" title="Delete Network"></i></a></td>
|
<td>{% if not network.intip == "No VPN" %}<a href="#"><i style="color: darkred;" onclick="askdeletenet({{ network.id }});" class="fas fa-trash-alt" title="Delete Network"></i></a>{% endif %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
Loading…
Reference in a new issue