web: files: add notification, if create item with empty title

This commit is contained in:
Vladislav Makhov 2020-12-21 14:18:32 +03:00
parent c8f6e4e5c8
commit 89f8195ab6
3 changed files with 8 additions and 3 deletions

View File

@ -170,7 +170,10 @@ class FilesRowContent extends React.PureComponent {
const itemId = e.currentTarget.dataset.itemid;
if (itemTitle.trim() === "") return this.completeAction(itemId);
if (itemTitle.trim() === "") {
toastr.warning(this.props.t("CreateWithEmptyTitle"));
return this.completeAction(itemId);
}
let tab = item.fileExst
? window.open("/products/files/doceditor", "_blank")

View File

@ -117,5 +117,6 @@
"MoveItems": "<strong>{{qty}}</strong> elements has been moved",
"CopyItem": "<strong>{{title}}</strong> copied",
"CopyItems": "<strong>{{qty}}</strong> elements copied",
"ContainsSpecCharacter": "The title cannot contain any of the following characters: *+:\"<>?|/"
"ContainsSpecCharacter": "The title cannot contain any of the following characters: *+:\"<>?|/",
"CreateWithEmptyTitle": "Can't create folder or file with empty title"
}

View File

@ -117,5 +117,6 @@
"MoveItems": "Перемещено элементов: <strong>{{qty}}</strong>",
"CopyItem": "<strong>{{title}}</strong> скопирован",
"CopyItems": "Скопировано элементов: <strong>{{qty}}</strong>",
"ContainsSpecCharacter": "Название не должно содержать следующих символов: *+:\"<>?|/"
"ContainsSpecCharacter": "Название не должно содержать следующих символов: *+:\"<>?|/",
"CreateWithEmptyTitle": "Нельзя создать папку или файл с пустым названием"
}