ui: app: Fix an incorrect HTML tag nesting

- <div> is not allowed inside a <p> tag. Browsers will close and reopen <p> if
one tries to place a <div> inside a <p>. Avoid this.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa 2024-11-16 08:33:42 -08:00 committed by Veiko Aasa
parent 7602cf6172
commit 11cb883518
No known key found for this signature in database
GPG Key ID: 478539CAE680674E

View File

@ -7,52 +7,56 @@
{% if port_forwarding_info.ports %} {% if port_forwarding_info.ports %}
<h3>{% trans "Port Forwarding" %}</h3> <h3>{% trans "Port Forwarding" %}</h3>
<p> {% url 'networks:index' as networks_url %}
{% url 'networks:index' as networks_url %} {% if port_forwarding_info.network_topology_type != "to_router" %}
{% if port_forwarding_info.network_topology_type != "to_router" %} <p>
{% blocktrans trimmed %} {% blocktrans trimmed %}
Your FreedomBox is <a href="{{ networks_url }}">not behind a router</a>. Your FreedomBox is <a href="{{ networks_url }}">not behind a router</a>.
No action is necessary. No action is necessary.
{% endblocktrans %} {% endblocktrans %}
<span class="fa fa-check" aria-hidden="true"></span> <span class="fa fa-check" aria-hidden="true"></span>
{% elif port_forwarding_info.router_configuration_type == 'dmz' %} </p>
{% elif port_forwarding_info.router_configuration_type == 'dmz' %}
<p>
{% blocktrans trimmed %} {% blocktrans trimmed %}
Your FreedomBox is <a href="{{ networks_url }}"> behind a router</a> and Your FreedomBox is <a href="{{ networks_url }}"> behind a router</a> and
you are using the DMZ feature to forward all ports. No further router you are using the DMZ feature to forward all ports. No further router
configuration is necessary. configuration is necessary.
{% endblocktrans %} {% endblocktrans %}
<span class="fa fa-check" aria-hidden="true"></span> <span class="fa fa-check" aria-hidden="true"></span>
{% else %} </p>
{% else %}
<p>
{% blocktrans trimmed %} {% blocktrans trimmed %}
Your FreedomBox is <a href="{{ networks_url }}">behind a router</a> and Your FreedomBox is <a href="{{ networks_url }}">behind a router</a> and
you are not using the DMZ feature. You will need to set up port you are not using the DMZ feature. You will need to set up port
forwarding on your router. You should forward the following ports for forwarding on your router. You should forward the following ports for
{{ service_name }}: {{ service_name }}:
{% endblocktrans %} {% endblocktrans %}
</p>
<div class="table-responsive table-port-forwarding-info"> <div class="table-responsive table-port-forwarding-info">
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th>{% trans "Service Name" %}</th> <th>{% trans "Service Name" %}</th>
<th>{% trans "Protocol" %}</th> <th>{% trans "Protocol" %}</th>
<th>{% trans "From Router/WAN Ports" %}</th> <th>{% trans "From Router/WAN Ports" %}</th>
<th>{% blocktrans %}To {{box_name}} Ports{% endblocktrans %}</th> <th>{% blocktrans %}To {{box_name}} Ports{% endblocktrans %}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for port in port_forwarding_info.ports %} {% for port in port_forwarding_info.ports %}
<tr> <tr>
<td>{{ port.name }}</td> <td>{{ port.name }}</td>
<td>{{ port.protocol }}</td> <td>{{ port.protocol }}</td>
<td>{{ port.ports }}</td> <td>{{ port.ports }}</td>
<td>{{ port.ports }}</td> <td>{{ port.ports }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div> </div>
{% endif %} {% endif %}
</p>
{% endif %} {% endif %}