Added copy to clipboard for contact and asset ajax modal credentials fixed issue with clipboard because jquery ui was declared last mved it up
This commit is contained in:
@@ -467,7 +467,7 @@ ob_start();
|
|||||||
if (empty($credential_username)) {
|
if (empty($credential_username)) {
|
||||||
$credential_username_display = "-";
|
$credential_username_display = "-";
|
||||||
} else {
|
} else {
|
||||||
$credential_username_display = "$credential_username";
|
$credential_username_display = "$credential_username <button type='button' class='btn btn-sm clipboardjs' data-clipboard-text='$credential_username'><i class='far fa-copy text-secondary'></i></button>";
|
||||||
}
|
}
|
||||||
$credential_password = nullable_htmlentities(decryptCredentialEntry($row['credential_password']));
|
$credential_password = nullable_htmlentities(decryptCredentialEntry($row['credential_password']));
|
||||||
$credential_otp_secret = nullable_htmlentities($row['credential_otp_secret']);
|
$credential_otp_secret = nullable_htmlentities($row['credential_otp_secret']);
|
||||||
@@ -513,6 +513,7 @@ ob_start();
|
|||||||
<td><?php echo $credential_username_display; ?></td>
|
<td><?php echo $credential_username_display; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<button class="btn p-0" type="button" data-toggle="popover" data-trigger="focus" data-placement="top" data-content="<?php echo $credential_password; ?>"><i class="fas fa-2x fa-ellipsis-h text-secondary"></i><i class="fas fa-2x fa-ellipsis-h text-secondary"></i></button>
|
<button class="btn p-0" type="button" data-toggle="popover" data-trigger="focus" data-placement="top" data-content="<?php echo $credential_password; ?>"><i class="fas fa-2x fa-ellipsis-h text-secondary"></i><i class="fas fa-2x fa-ellipsis-h text-secondary"></i></button>
|
||||||
|
<button type='button' class='btn btn-sm clipboardjs' data-clipboard-text='<?php echo $credential_password; ?>'><i class='far fa-copy text-secondary'></i></button>
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo $otp_display; ?></td>
|
<td><?php echo $otp_display; ?></td>
|
||||||
<td><?php echo $credential_uri_display; ?></td>
|
<td><?php echo $credential_uri_display; ?></td>
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ ob_start();
|
|||||||
<div><i class="fa fa-fw fa-map-marker-alt text-secondary mr-2"></i><?php echo $location_name; ?></div>
|
<div><i class="fa fa-fw fa-map-marker-alt text-secondary mr-2"></i><?php echo $location_name; ?></div>
|
||||||
<?php }
|
<?php }
|
||||||
if ($contact_email) { ?>
|
if ($contact_email) { ?>
|
||||||
<div class="mt-2"><i class="fa fa-fw fa-envelope text-secondary mr-2"></i><a href='mailto:<?php echo $contact_email; ?>'><?php echo $contact_email; ?></a><button class='btn btn-sm clipboardjs' data-clipboard-text='<?php echo $contact_email; ?>'><i class='far fa-copy text-secondary'></i></button></div>
|
<div class="mt-2"><i class="fa fa-fw fa-envelope text-secondary mr-2"></i><a href='mailto:<?php echo $contact_email; ?>'><?php echo $contact_email; ?></a><button type="button" class='btn btn-sm clipboardjs' data-clipboard-text='<?php echo $contact_email; ?>'><i class='far fa-copy text-secondary'></i></button></div>
|
||||||
<?php }
|
<?php }
|
||||||
if ($contact_phone) { ?>
|
if ($contact_phone) { ?>
|
||||||
<div class="mt-2"><i class="fa fa-fw fa-phone text-secondary mr-2"></i><a href="tel:<?php echo "$contact_phone"?>"><?php echo $contact_phone; ?></a></div>
|
<div class="mt-2"><i class="fa fa-fw fa-phone text-secondary mr-2"></i><a href="tel:<?php echo "$contact_phone"?>"><?php echo $contact_phone; ?></a></div>
|
||||||
@@ -428,7 +428,7 @@ ob_start();
|
|||||||
if (empty($credential_username)) {
|
if (empty($credential_username)) {
|
||||||
$credential_username_display = "-";
|
$credential_username_display = "-";
|
||||||
} else {
|
} else {
|
||||||
$credential_username_display = "$credential_username";
|
$credential_username_display = "$credential_username <button type='button' class='btn btn-sm clipboardjs' data-clipboard-text='$credential_username'><i class='far fa-copy text-secondary'></i></button>";
|
||||||
}
|
}
|
||||||
$credential_password = nullable_htmlentities(decryptCredentialEntry($row['credential_password']));
|
$credential_password = nullable_htmlentities(decryptCredentialEntry($row['credential_password']));
|
||||||
$credential_otp_secret = nullable_htmlentities($row['credential_otp_secret']);
|
$credential_otp_secret = nullable_htmlentities($row['credential_otp_secret']);
|
||||||
@@ -472,6 +472,8 @@ ob_start();
|
|||||||
<td><?php echo $credential_username_display; ?></td>
|
<td><?php echo $credential_username_display; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<button class="btn p-0" type="button" data-toggle="popover" data-trigger="focus" data-placement="top" data-content="<?php echo $credential_password; ?>"><i class="fas fa-2x fa-ellipsis-h text-secondary"></i><i class="fas fa-2x fa-ellipsis-h text-secondary"></i></button>
|
<button class="btn p-0" type="button" data-toggle="popover" data-trigger="focus" data-placement="top" data-content="<?php echo $credential_password; ?>"><i class="fas fa-2x fa-ellipsis-h text-secondary"></i><i class="fas fa-2x fa-ellipsis-h text-secondary"></i></button>
|
||||||
|
|
||||||
|
<button type="button" class='btn btn-sm clipboardjs' data-clipboard-text='<?php echo $credential_password; ?>'><i class='far fa-copy text-secondary'></i></button>
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo $otp_display; ?></td>
|
<td><?php echo $otp_display; ?></td>
|
||||||
<td><?php echo $credential_uri_display; ?></td>
|
<td><?php echo $credential_uri_display; ?></td>
|
||||||
|
|||||||
+6
-8
@@ -669,14 +669,6 @@ if (mysqli_num_rows($os_sql) > 0) {
|
|||||||
|
|
||||||
<script src="js/bulk_actions.js"></script>
|
<script src="js/bulk_actions.js"></script>
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once "modals/asset_add_modal.php";
|
|
||||||
require_once "modals/asset_import_modal.php";
|
|
||||||
require_once "modals/asset_export_modal.php";
|
|
||||||
require_once "includes/footer.php";
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- JSON Autocomplete / type ahead -->
|
<!-- JSON Autocomplete / type ahead -->
|
||||||
<link rel="stylesheet" href="plugins/jquery-ui/jquery-ui.min.css">
|
<link rel="stylesheet" href="plugins/jquery-ui/jquery-ui.min.css">
|
||||||
<script src="plugins/jquery-ui/jquery-ui.min.js"></script>
|
<script src="plugins/jquery-ui/jquery-ui.min.js"></script>
|
||||||
@@ -692,3 +684,9 @@ require_once "includes/footer.php";
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once "modals/asset_add_modal.php";
|
||||||
|
require_once "modals/asset_import_modal.php";
|
||||||
|
require_once "modals/asset_export_modal.php";
|
||||||
|
require_once "includes/footer.php";
|
||||||
|
|||||||
+2
-2
@@ -41,7 +41,7 @@ $(document).on('click', '[data-toggle="ajax-modal"]', function (e) {
|
|||||||
|
|
||||||
// Build the modal HTML using the returned title and content.
|
// Build the modal HTML using the returned title and content.
|
||||||
var modalHtml =
|
var modalHtml =
|
||||||
'<div class="modal fade text-sm" id="' + modalId + '" tabindex="-1">' +
|
'<div class="modal fade" id="' + modalId + '" tabindex="-1">' +
|
||||||
' <div class="modal-dialog modal-'+ modalSize +'">' +
|
' <div class="modal-dialog modal-'+ modalSize +'">' +
|
||||||
' <div class="modal-content bg-dark">'
|
' <div class="modal-content bg-dark">'
|
||||||
+ response.content +
|
+ response.content +
|
||||||
@@ -50,7 +50,7 @@ $(document).on('click', '[data-toggle="ajax-modal"]', function (e) {
|
|||||||
'</div>';
|
'</div>';
|
||||||
|
|
||||||
// Append the modal to the body and show it.
|
// Append the modal to the body and show it.
|
||||||
$('body').append(modalHtml);
|
$('.content-wrapper').append(modalHtml);
|
||||||
var $modal = $('#' + modalId);
|
var $modal = $('#' + modalId);
|
||||||
$modal.modal('show');
|
$modal.modal('show');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user