feat: allow themes to define custom classes for categories via filter:admin.category.get

`datalist` isn't supported in all browsers but this will fallback to the original behavior. The first item in the list is the placeholder.
This commit is contained in:
Andrew Rodrigues
2019-02-04 13:54:48 -05:00
parent 8f69ffd41d
commit 5031bfe8c0
2 changed files with 9 additions and 1 deletions

View File

@@ -35,14 +35,17 @@ categoriesController.get = function (req, res, callback) {
req: req,
res: res,
category: category,
customClasses: [],
allCategories: data.allCategories,
}, next);
},
function (data) {
data.category.name = translator.escape(String(data.category.name));
res.render('admin/manage/category', {
category: data.category,
allCategories: data.allCategories,
customClasses: data.customClasses,
});
},
], callback);