diff --git a/public/viewjs/manageapikeys.js b/public/viewjs/manageapikeys.js index 16f708c5..cac20c17 100644 --- a/public/viewjs/manageapikeys.js +++ b/public/viewjs/manageapikeys.js @@ -29,11 +29,18 @@ $(document).on('click', '.apikey-delete-button', function(e) { var button = $(e.currentTarget); var objectName = button.attr('data-apikey-key'); + var objectDescription = button.attr('data-apikey-description'); var objectId = button.attr('data-apikey-id'); + if (objectDescription) + { + objectName = objectDescription; + } + bootbox.confirm({ message: __t('Are you sure you want to delete API key "%s"?', objectName), closeButton: false, + className: "text-break", buttons: { confirm: { label: __t('Yes'), diff --git a/views/manageapikeys.blade.php b/views/manageapikeys.blade.php index 48bb25a1..3474c139 100644 --- a/views/manageapikeys.blade.php +++ b/views/manageapikeys.blade.php @@ -92,6 +92,7 @@ href="#" data-apikey-id="{{ $apiKey->id }}" data-apikey-key="{{ $apiKey->api_key }}" + data-apikey-description="{{ $apiKey->description }}" data-toggle="tooltip" title="{{ $__t('Delete this item') }}">