* Fixed the error message for edit the document module.

This commit is contained in:
tianshujie
2023-10-17 10:41:40 +08:00
parent 1b2eaa7cb7
commit 7bc4a46595
3 changed files with 22 additions and 17 deletions
+10 -2
View File
@@ -1911,8 +1911,16 @@ class treeModel extends model
if((empty($module->root) or empty($module->name)) and in_array($self->type, array('doc', 'api')))
{
$this->app->loadLang('doc');
if(empty($module->root)) helper::end(js::alert(sprintf($this->lang->error->notempty, $this->lang->doc->lib)));
if(empty($module->name)) helper::end(js::alert(sprintf($this->lang->error->notempty, $this->lang->doc->catalogName)));
if(empty($module->root))
{
dao::$errors['root'] = sprintf($this->lang->error->notempty, $this->lang->doc->lib);
return false;
}
if(empty($module->name))
{
dao::$errors['name'] = sprintf($this->lang->error->notempty, $this->lang->doc->catalogName);
return false;
}
}
$modules = $self->type == 'story' ? $this->getOptionMenu($self->root, 'story', 0, 'all') : array();