mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 10:50:23 +01:00
Allow to use same Domain for IPv4/IPv6
Signed-off-by: Mograine <ghiot.pierre@gmail.com>
This commit is contained in:
@@ -9,7 +9,7 @@ $(document).ready(function() {
|
||||
"columnDefs": [ {
|
||||
"targets": 2,
|
||||
"render": function ( data, type, row ) {
|
||||
return "<button id=\"" + row[0] + "\" class=\"btn btn-danger btn-xs deleteCustomDNS\" type=\"button\">" +
|
||||
return "<button class=\"btn btn-danger btn-xs deleteCustomDNS\" type=\"button\" data-domain='"+row[0]+"' data-ip='"+row[1]+"'>" +
|
||||
"<span class=\"glyphicon glyphicon-trash\"></span>" +
|
||||
"</button>";
|
||||
}
|
||||
@@ -44,11 +44,14 @@ function addCustomDNS()
|
||||
|
||||
function deleteCustomDNS()
|
||||
{
|
||||
var ip = $(this).attr("data-ip");
|
||||
var domain = $(this).attr("data-domain");
|
||||
|
||||
$.ajax({
|
||||
url: "scripts/pi-hole/php/customdns.php",
|
||||
method: "post",
|
||||
dataType: 'json',
|
||||
data: {"action":"delete", "domain": $(this).prop('id')},
|
||||
data: {"action":"delete", "domain": domain, "ip": ip},
|
||||
success: function(response) {
|
||||
if (response.success)
|
||||
table.ajax.reload();
|
||||
|
||||
Reference in New Issue
Block a user