mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
networks: First boot view for network topology wizard
Signed-off-by: Nektarios Katakis <iam@nektarioskatakis.xyz> [sunil: Use the term 'network topology' consistently] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
e0e0a5dd60
commit
4dd1035cf3
@ -0,0 +1,24 @@
|
||||
{% extends "base_firstboot.html" %}
|
||||
{% comment %}
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
|
||||
{% load bootstrap %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
{% include "network_topology_content.html" %}
|
||||
|
||||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
{{ form|bootstrap }}
|
||||
|
||||
<input type="submit" class="btn btn-link" name="skip"
|
||||
value="{% trans "Skip this step" %}"/>
|
||||
<input type="submit" class="btn btn-primary pull-right" name="next"
|
||||
value="{% trans "Next" %}"/>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
@ -421,6 +421,23 @@ class NetworkTopologyView(FormView):
|
||||
return super().form_valid(form)
|
||||
|
||||
|
||||
class NetworkTopologyFirstBootView(NetworkTopologyView):
|
||||
"""View for network topology form during first wizard."""
|
||||
template_name = 'network_topology_firstboot.html'
|
||||
|
||||
def get_success_url(self):
|
||||
"""Return next fistboot step."""
|
||||
return reverse_lazy(first_boot.next_step())
|
||||
|
||||
def form_valid(self, form):
|
||||
"""Mark the first wizard step as done, save value and redirect."""
|
||||
first_boot.mark_step_done('network_topology_wizard')
|
||||
if 'skip' in form.data:
|
||||
return FormView.form_valid(self, form)
|
||||
|
||||
return super().form_valid(form)
|
||||
|
||||
|
||||
class RouterConfigurationView(FormView):
|
||||
"""View for router configuration form."""
|
||||
template_name = 'router_configuration_update.html'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user