click the "add" button on the static dhcp lease form

for people that forgot to click that button to add their lease
This commit is contained in:
glaszig 2019-08-01 17:37:48 +02:00
parent d18dbd7def
commit afbc50d1ee
2 changed files with 5 additions and 1 deletions

View file

@ -156,7 +156,7 @@ function DisplayDHCPConfig()
<!-- /.panel-heading -->
<div class="panel-body">
<p><?php $status->showMessages(); ?></p>
<form method="POST" action="?page=dhcpd_conf">
<form method="POST" action="?page=dhcpd_conf" class="js-dhcp-settings-form">
<?php CSRFToken() ?>
<!-- Nav tabs -->
<ul class="nav nav-tabs">

View file

@ -145,6 +145,10 @@ $(document).on("click", ".js-remove-dhcp-static-lease", function(e) {
$(this).parents(".js-dhcp-static-lease-row").remove();
});
$(document).on("submit", ".js-dhcp-settings-form", function(e) {
$(".js-add-dhcp-static-lease").trigger("click");
});
function setupBtns() {
$('#btnSummaryRefresh').click(function(){getAllInterfaces();});