$(document).ready(function () { //Create a new api key $(document).on('click', 'a.createApiKey', function () { var dialog = bootbox.dialog({ title: 'Generating new key...', message: '
The api key creation call failed.
'); }, success: function (data) { if (data.status === "true") { dialog.find('.modal-title').html('New Key'); dialog.find('.bootbox-body').html('' + '' + data.description + '
'); } } }); }); return false; }); //Delete key $(document).on('click', 'a.keyManageDelete', function () { var keyval = $(this).data('keyval'); var dialog = bootbox.dialog({ title: 'Deleting key...', message: 'The api key delete failed.
'); }, success: function (data) { if (data.status === "true") { dialog.find('.modal-title').html('Key Deleted'); dialog.find('.bootbox-body').html('' + '' + data.description + '
'); } } }); }); return false; }); //Request key upgrade $(document).on('click', 'a.keyManageRequestUpgrade', function () { var keyval = $(this).data('keyval'); var dialog = bootbox.dialog({ title: 'Sending request...', message: 'The key upgrade request failed.
'); }, success: function (data) { if (data.status === "true") { dialog.find('.modal-title').html('Request Sent'); dialog.find('.bootbox-body').html('' + '' + data.description + '
' + data.description + '
'); } } }); }); return false; }); });