* add new version and upgrade.
This commit is contained in:
@@ -59,6 +59,7 @@ class control extends baseControl
|
||||
}
|
||||
}
|
||||
|
||||
/* Append editor field to this module config from workflow. */
|
||||
$textareaFields = $this->dao->select('*')->from(TABLE_WORKFLOWFIELD)->where('module')->eq($this->moduleName)->andWhere('control')->eq('textarea')->andWhere('buildin')->eq('0')->fetchAll('field');
|
||||
if($textareaFields)
|
||||
{
|
||||
@@ -306,14 +307,14 @@ class control extends baseControl
|
||||
$notEmptyRule = $this->loadModel('workflowrule')->getByTypeAndRule('system', 'notempty');
|
||||
|
||||
$requiredFields = '';
|
||||
$mustPostValue = '';
|
||||
$mustPostFields = '';
|
||||
foreach($fields as $field)
|
||||
{
|
||||
if($field->buildin or !$field->show or !isset($layouts[$field->field])) continue;
|
||||
if($notEmptyRule && strpos(",$field->rules,", ",$notEmptyRule->id,") !== false)
|
||||
{
|
||||
$requiredFields .= ",{$field->field}";
|
||||
if($field->control == 'radio' or $field->control == 'checkbox') $mustPostValue .= ",{$field->field}";
|
||||
if($field->control == 'radio' or $field->control == 'checkbox') $mustPostFields .= ",{$field->field}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,7 +330,7 @@ class control extends baseControl
|
||||
{
|
||||
$message[$requiredField][] = sprintf($this->lang->error->notempty, $fields[$requiredField]->name);
|
||||
}
|
||||
elseif(strpos(",{$mustPostValue},", ",{$requiredField},") !== false and !isset($_POST[$requiredField]))
|
||||
elseif(strpos(",{$mustPostFields},", ",{$requiredField},") !== false and !isset($_POST[$requiredField]))
|
||||
{
|
||||
$message[$requiredField][] = sprintf($this->lang->error->notempty, $fields[$requiredField]->name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user