Prevent Copy to Clipboard button from submitting in assets since we wrapped listings in a form to allow for bulk actions this caused buttons like this to act as submits unless we add type='button'

This commit is contained in:
johnnyq 2024-01-27 03:04:43 -05:00
parent e139190377
commit 8562906fa6
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
if (empty($asset_ip)) {
$asset_ip_display = "-";
} else {
$asset_ip_display = "$asset_ip<button class='btn btn-sm' data-clipboard-text=" . $asset_ip . "><i class='far fa-copy text-secondary'></i></button>";
$asset_ip_display = "$asset_ip<button class='btn btn-sm' type='button' data-clipboard-text=" . $asset_ip . "><i class='far fa-copy text-secondary'></i></button>";
}
$asset_nat_ip = nullable_htmlentities($row['asset_nat_ip']);
$asset_mac = nullable_htmlentities($row['asset_mac']);