diff --git a/Teknik/Scripts/.eslintrc b/Teknik/Scripts/.eslintrc
index 6ed2981..99b4fa1 100644
--- a/Teknik/Scripts/.eslintrc
+++ b/Teknik/Scripts/.eslintrc
@@ -24,6 +24,7 @@
"Uint8Array": false,
// Common.js Functions
+ "deleteConfirm": false,
"disableButton": false,
"enableButton": false,
"removeAmp": false,
diff --git a/Teknik/Scripts/Admin/UploadSearch.js b/Teknik/Scripts/Admin/UploadSearch.js
index 434fae1..90ad618 100644
--- a/Teknik/Scripts/Admin/UploadSearch.js
+++ b/Teknik/Scripts/Admin/UploadSearch.js
@@ -33,7 +33,7 @@ function LinkUploadDelete(selector) {
$(selector).click(function () {
var deleteUrl = $(this).attr('id');
var uploadID = $(this).data('upload-id');
- bootbox.confirm("Are you sure you want to delete this upload?", function (result) {
+ deleteConfirm("Are you sure you want to delete this upload?", function (result) {
if (result) {
if (deleteUrl !== '') {
window.open(deleteUrl, '_blank');
diff --git a/Teknik/Scripts/Admin/UserInfo.js b/Teknik/Scripts/Admin/UserInfo.js
index d05cd6f..a4c4fb7 100644
--- a/Teknik/Scripts/Admin/UserInfo.js
+++ b/Teknik/Scripts/Admin/UserInfo.js
@@ -67,7 +67,7 @@ $(function () {
});
$('#delete_account').click(function () {
- bootbox.confirm("Are you sure you want to delete this account?", function (result) {
+ deleteConfirm("Are you sure you want to delete this account?", function (result) {
if (result) {
$.ajax({
type: "POST",
diff --git a/Teknik/Scripts/Blog/Blog.js b/Teknik/Scripts/Blog/Blog.js
index 0b73169..545d91e 100644
--- a/Teknik/Scripts/Blog/Blog.js
+++ b/Teknik/Scripts/Blog/Blog.js
@@ -170,7 +170,7 @@ function linkPostDelete(selector) {
$(selector).click(function () {
var object = $(this);
var post_id = object.attr("id");
- bootbox.confirm("Are you sure you want to delete your post?", function (result) {
+ deleteConfirm("Are you sure you want to delete your post?", function (result) {
if (result) {
$.ajax({
type: "POST",
@@ -195,7 +195,7 @@ function linkCommentDelete(selector) {
$(selector).click(function () {
var object = $(this);
var post_id = object.attr("id");
- bootbox.confirm("Are you sure you want to delete your comment?", function (result) {
+ deleteConfirm("Are you sure you want to delete your comment?", function (result) {
if (result) {
$.ajax({
type: "POST",
diff --git a/Teknik/Scripts/Paste/ViewPaste.js b/Teknik/Scripts/Paste/ViewPaste.js
index 56bebea..8a550a3 100644
--- a/Teknik/Scripts/Paste/ViewPaste.js
+++ b/Teknik/Scripts/Paste/ViewPaste.js
@@ -9,7 +9,7 @@ $(document).ready(function () {
$('#delete-paste').click(function () {
var id = $(this).data('paste-url');
- bootbox.confirm("Are you sure you want to delete this paste?", function (result) {
+ deleteConfirm("Are you sure you want to delete this paste?", function (result) {
if (result) {
$.ajax({
type: "POST",
diff --git a/Teknik/Scripts/User/AccountSettings.js b/Teknik/Scripts/User/AccountSettings.js
index 56e99f7..13ac379 100644
--- a/Teknik/Scripts/User/AccountSettings.js
+++ b/Teknik/Scripts/User/AccountSettings.js
@@ -38,7 +38,7 @@ $(document).ready(function () {
$('#delete_account').click(function () {
disableButton('#delete_account', 'Deleting Account...');
- bootbox.confirm("Are you sure you want to delete your account?", function (result) {
+ deleteConfirm("Are you sure you want to delete your account?", function (result) {
if (result) {
$.ajax({
type: "POST",
diff --git a/Teknik/Scripts/User/DeveloperSettings.js b/Teknik/Scripts/User/DeveloperSettings.js
index a3b3a1a..cc1bb7d 100644
--- a/Teknik/Scripts/User/DeveloperSettings.js
+++ b/Teknik/Scripts/User/DeveloperSettings.js
@@ -127,29 +127,42 @@ function editClientSave() {
function deleteClient(clientId) {
disableButton('.deleteClient[data-clientId="' + clientId + '"]', 'Deleting...');
- bootbox.confirm("
Are you sure you want to delete this client?
This is irreversable and all applications using these client credentials will stop working.", function (result) {
- if (result) {
- $.ajax({
- type: "POST",
- url: deleteClientURL,
- data: AddAntiForgeryToken({ clientId: clientId }),
- success: function (response) {
- if (response.result) {
- $('#client_' + clientId).remove();
- if ($('#clientList li').length <= 0) {
- $('#clientList').html('
No Clients
');
+ bootbox.confirm({
+ message: "
Are you sure you want to delete this client?
This is irreversable and all applications using these client credentials will stop working.",
+ buttons: {
+ confirm: {
+ label: 'Delete',
+ className: 'btn-danger'
+ },
+ cancel: {
+ label: 'Cancel',
+ className: 'btn-default'
+ }
+ },
+ callback: function (result) {
+ if (result) {
+ $.ajax({
+ type: "POST",
+ url: deleteClientURL,
+ data: AddAntiForgeryToken({ clientId: clientId }),
+ success: function (response) {
+ if (response.result) {
+ $('#client_' + clientId).remove();
+ if ($('#clientList li').length <= 0) {
+ $('#clientList').html('