diff --git a/admin/inc/class.admin_categories.inc.php b/admin/inc/class.admin_categories.inc.php
index 1ac2b7daf1..e4bbb091b6 100644
--- a/admin/inc/class.admin_categories.inc.php
+++ b/admin/inc/class.admin_categories.inc.php
@@ -127,10 +127,10 @@ class admin_categories
{
$cats = new categories($content['owner'] ? $content['owner'] : categories::GLOBAL_ACCOUNT,$content['appname']);
- if ($content['delete']['delete'])
+ if ($content['delete']['delete'] || $content['delete']['subs'])
{
$button = 'delete';
- $delete_subs = $content['delete']['subs'];
+ $delete_subs = $content['delete']['subs']?true:false;
}
else
{
diff --git a/admin/js/app.js b/admin/js/app.js
index 6cd3bf7b9a..20f8bd392f 100644
--- a/admin/js/app.js
+++ b/admin/js/app.js
@@ -767,5 +767,27 @@ app.classes.admin = AppJS.extend(
}
return true;
+ },
+
+ /**
+ * Delete confirmation dialog
+ *
+ */
+ delete_category: function ()
+ {
+ var _buttons = [
+ {"button_id": "delete[cancel]","text": 'Cancel', id: 'delete[cancel]', image: 'cancel', "default":true},
+ {"button_id": "delete[delete]","text": 'Delete', id: 'delete[delete]', image: 'delete'},
+ {"button_id": "delete[subs]","text": 'Delete including sub-enteries', id: 'delete[subs]', image: 'delete'},
+ ];
+ var self = this;
+ var delDialog_callBack = function (_buttons)
+ {
+ if (_buttons != "delete[cancel]")
+ {
+ self.et2.getInstanceManager().submit(_buttons);
+ }
+ };
+ et2_dialog.show_dialog(delDialog_callBack,"Are you sure you want to delete this category ?","Delete",{},_buttons);
}
});
diff --git a/admin/templates/default/categories.edit.xet b/admin/templates/default/categories.edit.xet
index fa2bd97914..e3f2147c51 100644
--- a/admin/templates/default/categories.edit.xet
+++ b/admin/templates/default/categories.edit.xet
@@ -17,14 +17,13 @@
-
+
-
+
-
@@ -41,7 +40,6 @@
-
-
+
+
diff --git a/preferences/inc/class.preferences_categories_ui.inc.php b/preferences/inc/class.preferences_categories_ui.inc.php
index 0574533134..a3b4b9c318 100644
--- a/preferences/inc/class.preferences_categories_ui.inc.php
+++ b/preferences/inc/class.preferences_categories_ui.inc.php
@@ -1,7 +1,7 @@