mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Improved API key delete confirmation dialog (references #2625)
This commit is contained in:
parent
5f26e914a2
commit
0270f6aa08
@ -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'),
|
||||
|
@ -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') }}">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
|
Loading…
x
Reference in New Issue
Block a user