From 7170d3db38d2f3fc6e49c6d9a524871883a11fb0 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 12 Oct 2015 23:04:47 +0530 Subject: [PATCH] networks: Ability to enable/disable without JS - Avoid using a drop down menu. - Separate out the status indicator and activate/deactivate button. - Closes #173. --- .../networks/templates/connections_list.html | 86 +++++++++---------- 1 file changed, 41 insertions(+), 45 deletions(-) diff --git a/plinth/modules/networks/templates/connections_list.html b/plinth/modules/networks/templates/connections_list.html index 8b481484f..2fb6cc00f 100644 --- a/plinth/modules/networks/templates/connections_list.html +++ b/plinth/modules/networks/templates/connections_list.html @@ -22,6 +22,14 @@ {% block page_head %} {% endblock %} @@ -58,6 +67,32 @@ aria-hidden="true"> + {% if connection.is_active %} +
+ {% csrf_token %} + + +
+ {% else %} +
+ {% csrf_token %} + + +
+ {% endif %} + + {% if connection.is_active %} + + Active + {% else %} + + Inactive + {% endif %} + @@ -65,45 +100,6 @@ {{ connection.type }} - - {% if connection.is_active %} -
- - -
- {% else %} -
- - -
- {% endif %} - {% endfor %}