mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-06 10:20:43 +00:00
networks: Add network view and url for internet connection help page
Signed-off-by: Nektarios Katakis <iam@nektarioskatakis.xyz> [sunil: Use SPDX license identifier] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
8134371bbb
commit
bcd4c52851
@ -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
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
{% comment %}
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
|
||||
{% load bootstrap %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
|
||||
<h1>
|
||||
{% blocktrans trimmed %}
|
||||
What Type Of Internet Connection Do You Have?
|
||||
{% endblocktrans %}
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
{% 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 %}
|
||||
</p>
|
||||
@ -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" %}
|
||||
|
||||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
{{ form|bootstrap }}
|
||||
|
||||
<input type="submit" class="btn btn-primary"
|
||||
value="{% trans "Submit" %}"/>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
@ -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'),
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user