This commit is contained in:
reneeteng
2019-08-01 17:23:48 +08:00
3 changed files with 10 additions and 7 deletions
+3 -1
View File
@@ -36,8 +36,10 @@ class searchModel extends model
/* The built-in modules and user defined modules all have the subStatus field, so set its configuration first. */
if($field->field == 'subStatus')
{
$field = $this->workflowfield->getByField($module, 'subStatus');
$searchConfig['fields'][$field->field] = $field->name;
$searchConfig['params'][$field->field] = array('operator' => '=', 'control' => 'select', 'values' => $this->workflowfield->getSubStatusList($module));
$searchConfig['params'][$field->field] = array('operator' => '=', 'control' => 'select', 'values' => $field->options);
continue;
}
+1 -1
View File
@@ -23,7 +23,7 @@ class translateModel extends model
$data = fixer::input('post')->add('createdBy', $this->app->user->account)->get();
if(empty($data->name)) dao::$errors['name'] = sprintf($this->lang->error->notempty, $this->lang->translate->name);
if(empty($data->code)) dao::$errors['code'] = sprintf($this->lang->error->notempty, $this->lang->translate->code);
if(!baseValidater::checkREG($data->code, '|^[A-Za-z0-9_]+$|')) dao::$errors['code'] = $this->lang->translate->notice->failRuleCode;
if(!baseValidater::checkREG($data->code, '|^[a-z0-9_]+$|')) dao::$errors['code'] = $this->lang->translate->notice->failRuleCode;
if(dao::isError()) return false;
$langs = empty($this->config->global->langs) ? array() : json_decode($this->config->global->langs, true);