From 7e2149cd82fa23b523dff13647855123019dcbc0 Mon Sep 17 00:00:00 2001 From: Gary Kim Date: Tue, 8 Oct 2019 19:35:30 +0800 Subject: [PATCH] Show error if tag name is empty Signed-off-by: Gary Kim --- apps/systemtags/js/admin.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/systemtags/js/admin.js b/apps/systemtags/js/admin.js index 12ad23495e8..d99fb0e1eda 100644 --- a/apps/systemtags/js/admin.js +++ b/apps/systemtags/js/admin.js @@ -1,5 +1,6 @@ /** * @copyright Copyright (c) 2016 Joas Schilling + * @copyright Copyright (c) 2019 Gary Kim * * @license GNU AGPL version 3 or any later version * @@ -83,6 +84,11 @@ userAssignable: level === 3 }; + if (!data.name) { + OCP.Toast.error(t('systemtags_manager', 'Tag name is empty')); + return; + } + if (tagId) { var model = this.collection.get(tagId); model.save(data); -- 2.39.5