firewall rules/settings translation

This commit is contained in:
Eduardo Silva
2025-04-16 12:34:50 -03:00
parent dca75f05a4
commit c60da36047
8 changed files with 194 additions and 80 deletions

View File

@@ -1,9 +1,9 @@
{% extends 'base.html' %}
{% load i18n %}
{% block content %}
<div class="row">
<div class="col-md-4">
<div class="col-md-6">
<form method="post">
{% csrf_token %}
<div class="card">
@@ -56,9 +56,9 @@
</div>
<div class="card-footer">
<button type="submit" class="btn btn-primary">Submit</button>
<a class="btn btn-outline-secondary" href="{{ back_url }}">Back</a>
<a href='javascript:void(0)' class='btn btn-outline-danger' data-command='delete' onclick='openCommandDialog(this)'>Reset firewall to default</a>
<button type="submit" class="btn btn-primary">{% trans 'Save' %}</button>
<a class="btn btn-outline-secondary" href="{{ back_url }}">{% trans 'Back' %}</a>
<a href='javascript:void(0)' class='btn btn-outline-danger' data-command='delete' onclick='openCommandDialog(this)'>{% trans 'Reset firewall to default' %}</a>
</div>
</div>
</form>
@@ -74,7 +74,7 @@
<script>
function openCommandDialog(element) {
var command = element.getAttribute('data-command');
var confirmation = prompt("Reseting the firewall to default will remove all rules and settings. Are you sure you want to continue?\n\nType 'delete all rules and reset firewall' to confirm. ");
var confirmation = prompt("{% trans "Reseting the firewall to default will remove all rules and settings. Are you sure you want to continue?\n\nType 'delete all rules and reset firewall' to confirm." %}");
if (confirmation) {
var url = "/firewall/reset_to_default/?confirmation=" + encodeURIComponent(confirmation);
window.location.href = url;