Show error if tag name is empty

Signed-off-by: Gary Kim <gary@garykim.dev>
This commit is contained in:
Gary Kim 2019-10-08 19:35:30 +08:00
parent b7803665c1
commit 7e2149cd82
No known key found for this signature in database
GPG Key ID: 9349B59FB54594AC
1 changed files with 6 additions and 0 deletions

View File

@ -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);