Show error if tag name is empty
Signed-off-by: Gary Kim <gary@garykim.dev>
This commit is contained in:
parent
b7803665c1
commit
7e2149cd82
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue