diff --git a/plinth/modules/networks/networks.py b/plinth/modules/networks/networks.py index 685829ebb..4752a43cf 100644 --- a/plinth/modules/networks/networks.py +++ b/plinth/modules/networks/networks.py @@ -11,9 +11,15 @@ from django.views.decorators.http import require_POST from plinth import kvstore, network from plinth.modules import first_boot, networks - -from .forms import (ConnectionTypeSelectForm, EthernetForm, GenericForm, - PPPoEForm, RouterConfigurationWizardForm, WifiForm) +from .forms import ( + ConnectionTypeSelectForm, + EthernetForm, + GenericForm, + PPPoEForm, + WifiForm, + RouterConfigurationWizardForm, + InternetConnectionTypeForm, +) logger = logging.getLogger(__name__) @@ -444,3 +450,20 @@ def router_configuration_help_page(request): }) return TemplateResponse(request, html, template_kwargs) + + +def internet_connection_type_help_page(request): + """ + Show the internet connection type page. + Used for first boot step and networks page. + """ + # stub for now + if request.method == 'POST': + resp = reverse_lazy('networks:index') + else: + html = "internet_connectivity_type.html" + template_kwargs = {'form': InternetConnectionTypeForm} + + resp = TemplateResponse(request, html, template_kwargs) + + return resp diff --git a/plinth/modules/networks/templates/internet_connectivity_content.html b/plinth/modules/networks/templates/internet_connectivity_content.html new file mode 100644 index 000000000..985df9924 --- /dev/null +++ b/plinth/modules/networks/templates/internet_connectivity_content.html @@ -0,0 +1,20 @@ +{% comment %} +# SPDX-License-Identifier: AGPL-3.0-or-later +{% endcomment %} + +{% load bootstrap %} +{% load i18n %} +{% load static %} + +
+ {% blocktrans trimmed %} + Select an option that best describes the type of Internet connection. + This information is used only to guide you with further setup. + {% endblocktrans %} +
diff --git a/plinth/modules/networks/templates/internet_connectivity_type.html b/plinth/modules/networks/templates/internet_connectivity_type.html new file mode 100644 index 000000000..c8e1d23bf --- /dev/null +++ b/plinth/modules/networks/templates/internet_connectivity_type.html @@ -0,0 +1,22 @@ +{% extends "base.html" %} +{% comment %} +# SPDX-License-Identifier: AGPL-3.0-or-later +{% endcomment %} + +{% load bootstrap %} +{% load i18n %} +{% load static %} + +{% block content %} + {% include "internet_connectivity_content.html" %} + + + +{% endblock %} diff --git a/plinth/modules/networks/urls.py b/plinth/modules/networks/urls.py index 4953a5e3c..abf054380 100644 --- a/plinth/modules/networks/urls.py +++ b/plinth/modules/networks/urls.py @@ -33,4 +33,7 @@ urlpatterns = [ url(r'^sys/networks/firstboot/$', public(views.router_configuration_help_page), name='firstboot_router_setup'), + url(r'^sys/networks/internet-connection-type/$', + views.internet_connection_type_help_page, + name='internet_connection_type_setup'), ]