From 4865a64d2b38314263875d35b6a6f848091f8fdb Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Thu, 2 Jun 2016 16:49:11 +0530 Subject: [PATCH] networks: Allow shared connections to have IPs Setting IP address on a shared connection can be usefull. This tells Network Manager to pick the provided network range (inferred from IP/netmask) instead of something in 10.42.x.x. This can be used to give predicatable IPs, static IPs and to make large static reservations (instead of the default 8). --- plinth/modules/networks/forms.py | 2 - .../templates/connections_create.html | 47 +---------------- .../networks/templates/connections_edit.html | 51 +++++++++++-------- plinth/network.py | 3 +- 4 files changed, 34 insertions(+), 69 deletions(-) diff --git a/plinth/modules/networks/forms.py b/plinth/modules/networks/forms.py index c08b5ee3f..99db5f111 100644 --- a/plinth/modules/networks/forms.py +++ b/plinth/modules/networks/forms.py @@ -94,7 +94,6 @@ available over this interfaces. Select Internal only for trusted networks.'), return choices - def get_settings(self): """Return settings dict from cleaned data.""" settings = {} @@ -149,7 +148,6 @@ class PPPoEForm(EthernetForm): show_password = forms.BooleanField(label=_('Show password'), required=False) - def get_settings(self): """Return setting dict from cleaned data.""" settings = super().get_settings() diff --git a/plinth/modules/networks/templates/connections_create.html b/plinth/modules/networks/templates/connections_create.html index 4c3f48707..e56606b1d 100644 --- a/plinth/modules/networks/templates/connections_create.html +++ b/plinth/modules/networks/templates/connections_create.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "connections_edit.html" %} {% comment %} # # This file is part of Plinth. @@ -37,48 +37,3 @@ {% endblock %} - -{% block page_js %} - - - -{% endblock %} diff --git a/plinth/modules/networks/templates/connections_edit.html b/plinth/modules/networks/templates/connections_edit.html index 2f5b56a51..d73f923de 100644 --- a/plinth/modules/networks/templates/connections_edit.html +++ b/plinth/modules/networks/templates/connections_edit.html @@ -43,29 +43,40 @@