summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorGary Kim <gary@garykim.dev>2019-10-08 19:35:30 +0800
committerGary Kim <gary@garykim.dev>2019-10-08 22:15:05 +0800
commit7e2149cd82fa23b523dff13647855123019dcbc0 (patch)
tree52578cf4e1860faef2b7c535d1950fe7e471ca6e /apps
parentb7803665c1c030378511161dd51c10ac17e6cf6b (diff)
downloadnextcloud-server-7e2149cd82fa23b523dff13647855123019dcbc0.tar.gz
nextcloud-server-7e2149cd82fa23b523dff13647855123019dcbc0.zip
Show error if tag name is empty
Signed-off-by: Gary Kim <gary@garykim.dev>
Diffstat (limited to 'apps')
-rw-r--r--apps/systemtags/js/admin.js6
1 files changed, 6 insertions, 0 deletions
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 <coding@schilljs.com>
+ * @copyright Copyright (c) 2019 Gary Kim <gary@garykim.dev>
*
* @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);