fix js integrations

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2023-10-18 14:25:02 +02:00
parent 462a798cb6
commit a11d26522a
23 changed files with 596 additions and 583 deletions

View File

@@ -1,30 +1,31 @@
export default function() {
/*
* ipsandports - check for internal ip and output a notice if private-range ip is given
*/
$('#ip').on('change', function () {
var ipval = $(this).val();
if (ipval.length > 0) {
$('#ipnote').remove();
$('#ip').removeClass('is-invalid');
$.ajax({
url: "admin_ipsandports.php?page=overview&action=jqCheckIP",
type: "POST",
data: {
ip: ipval
},
dataType: "json",
success: function (json) {
if (json != 0) {
$('#ip').addClass('is-invalid');
$('#ip').parent().append(json);
export default function () {
$(function () {
/*
* ipsandports - check for internal ip and output a notice if private-range ip is given
*/
$('#ip').on('change', function () {
var ipval = $(this).val();
if (ipval.length > 0) {
$('#ipnote').remove();
$('#ip').removeClass('is-invalid');
$.ajax({
url: "admin_ipsandports.php?page=overview&action=jqCheckIP",
type: "POST",
data: {
ip: ipval
},
dataType: "json",
success: function (json) {
if (json != 0) {
$('#ip').addClass('is-invalid');
$('#ip').parent().append(json);
}
},
error: function (a, b) {
console.log(a, b);
}
},
error: function (a, b) {
console.log(a, b);
}
});
}
});
}
});
});
}