diff --git a/module/branch/lang/de.php b/module/branch/lang/de.php index c08782893f..e4e5855de3 100644 --- a/module/branch/lang/de.php +++ b/module/branch/lang/de.php @@ -16,3 +16,4 @@ $lang->branch->deleted = 'Löscht'; $lang->branch->confirmDelete = 'Möchten Sie diesen @branch@ löschen?'; $lang->branch->canNotDelete = 'Es sind Daten im @branch@ vorhanden. Löschen nicht möglich.'; +$lang->branch->nameNotEmpty = 'Name must not be empty!'; diff --git a/module/branch/lang/en.php b/module/branch/lang/en.php index eb9a8d7a76..6768fd3460 100644 --- a/module/branch/lang/en.php +++ b/module/branch/lang/en.php @@ -16,3 +16,4 @@ $lang->branch->deleted = 'Delete'; $lang->branch->confirmDelete = 'Do you want to delete this @branch@?'; $lang->branch->canNotDelete = 'There is data in @branch@. It cannot be deleted.'; +$lang->branch->nameNotEmpty = 'Name must not be empty!'; diff --git a/module/branch/lang/fr.php b/module/branch/lang/fr.php index d5b6775163..b06a97b3df 100644 --- a/module/branch/lang/fr.php +++ b/module/branch/lang/fr.php @@ -16,3 +16,4 @@ $lang->branch->deleted = 'Delete'; $lang->branch->confirmDelete = "Voulez-vous vraiment supprimer l'établissement @branch@ ?"; $lang->branch->canNotDelete = 'Attention ! Il y a des données dans @branch@. Suppression impossible !'; +$lang->branch->nameNotEmpty = 'Name must not be empty!'; diff --git a/module/branch/lang/vi.php b/module/branch/lang/vi.php index 71f9cb9868..8b1ef13d6a 100644 --- a/module/branch/lang/vi.php +++ b/module/branch/lang/vi.php @@ -16,3 +16,4 @@ $lang->branch->deleted = 'Xóa'; $lang->branch->confirmDelete = 'Bạn có muốn xóa @branch@ này?'; $lang->branch->canNotDelete = 'Có dữ liệu trong @branch@. Nó không thể bị xóa.'; +$lang->branch->nameNotEmpty = 'Name must not be empty!'; diff --git a/module/branch/lang/zh-cn.php b/module/branch/lang/zh-cn.php index 7b2223fb70..f60eceeeb3 100644 --- a/module/branch/lang/zh-cn.php +++ b/module/branch/lang/zh-cn.php @@ -16,3 +16,4 @@ $lang->branch->deleted = '已删除'; $lang->branch->confirmDelete = '是否删除该@branch@?'; $lang->branch->canNotDelete = '该@branch@下已经有数据,不能删除!'; +$lang->branch->nameNotEmpty = '名称不能为空!'; diff --git a/module/branch/model.php b/module/branch/model.php index 6cfd20c981..a509fa14ce 100644 --- a/module/branch/model.php +++ b/module/branch/model.php @@ -104,6 +104,7 @@ class branchModel extends model { foreach($data->branch as $branchID => $branch) { + if(!$branch) die(js::alert($this->lang->branch->nameNotEmpty)); if($oldBranches[$branchID] != $branch) $this->dao->update(TABLE_BRANCH)->set('name')->eq($branch)->where('id')->eq($branchID)->exec(); } }