mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
networks: Hide deactivate/remove buttons for primary connections
Helps: #1962. Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
1 parent
012a9a0fc7
commit
ce87de1dfb
2 files changed
+22
-14
No files matched your search
@@ -53,12 +53,14 @@
|
||||
|
||||
<td class="connection-actions">
|
||||
{% if connection.is_active %}
|
||||
<form class="form form-action" method="post"
|
||||
action="{% url 'networks:deactivate' connection.uuid %}">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-default btn-sm">
|
||||
{% trans "Deactivate" %}</button>
|
||||
</form>
|
||||
{% if not connection.primary %}
|
||||
<form class="form form-action" method="post"
|
||||
action="{% url 'networks:deactivate' connection.uuid %}">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-default btn-sm">
|
||||
{% trans "Deactivate" %}</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<form class="form form-action" method="post"
|
||||
action="{% url 'networks:activate' connection.uuid %}">
|
||||
@@ -68,13 +70,14 @@
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
<a href="{% url 'networks:delete' connection.uuid %}"
|
||||
class="btn btn-default btn-sm"
|
||||
role="button"
|
||||
title="{% blocktrans with name=connection.name %}Delete connection {{ name }}{% endblocktrans %}">
|
||||
<span class="fa fa-trash-o"
|
||||
aria-hidden="true"></span>
|
||||
</a>
|
||||
{% if not connection.primary %}
|
||||
<a href="{% url 'networks:delete' connection.uuid %}"
|
||||
class="btn btn-default btn-sm"
|
||||
role="button"
|
||||
title="{% blocktrans with name=connection.name %}Delete connection {{ name }}{% endblocktrans %}">
|
||||
<span class="fa fa-trash-o" aria-hidden="true"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
Reference in new issue
Block a user