mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2025-08-27 05:41:15 +00:00
Legacy firewall migrate routines and export fw rules.
This commit is contained in:
@@ -58,6 +58,7 @@
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -66,4 +67,18 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block custom_page_scripts %}
|
||||
|
||||
<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. ");
|
||||
if (confirmation) {
|
||||
var url = "/firewall/reset_to_default/?confirmation=" + encodeURIComponent(confirmation);
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user