* Fix workflow extra editor submit bug.
This commit is contained in:
@@ -642,6 +642,7 @@ class control extends baseControl
|
||||
else
|
||||
{
|
||||
$config[$field->field] = array('required' => false, 'type' => 'string');
|
||||
if($field->control == 'richtext') $config[$field->field]['control'] = 'editor';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,13 +29,22 @@ class detailBody extends wg
|
||||
{
|
||||
global $app;
|
||||
|
||||
$fields = $app->control->appendExtendForm('info', data($app->getModuleName()));
|
||||
$data = data($app->getModuleName());
|
||||
$fields = $app->control->appendExtendForm('info', $data);
|
||||
$extraMain = array();
|
||||
foreach($fields as $field)
|
||||
{
|
||||
$fieldControl = $field->control;
|
||||
$extraMain[] = section
|
||||
(
|
||||
$field->control == 'file' && $data->files ? fileList
|
||||
(
|
||||
set::files($data->files),
|
||||
set::extra($field->field),
|
||||
set::fieldset(false),
|
||||
set::showEdit(true),
|
||||
set::showDelete(true)
|
||||
) : null,
|
||||
set::title($field->name),
|
||||
formGroup
|
||||
(
|
||||
@@ -45,6 +54,7 @@ class detailBody extends wg
|
||||
set::control($field->control),
|
||||
set::items($field->items),
|
||||
set::value($field->value)
|
||||
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ class fileList extends wg
|
||||
'method?:string="view"',
|
||||
'showDelete?:bool=true',
|
||||
'showEdit?:bool=true',
|
||||
'extra?:string=""',
|
||||
'object?:object',
|
||||
'padding?:bool=true'
|
||||
);
|
||||
@@ -34,11 +35,13 @@ class fileList extends wg
|
||||
$method = $this->prop('method');
|
||||
$showDelete = $this->prop('showDelete');
|
||||
$showEdit = $this->prop('showEdit');
|
||||
$extra = $this->prop('extra');
|
||||
$object = (object)$this->prop('object');
|
||||
$fileListView = h::ul(setClass('files-list col relative'));
|
||||
|
||||
foreach($files as $file)
|
||||
{
|
||||
if($file->extra != $extra) continue;
|
||||
$fileItemView = html($app->loadTarget('file')->printFile($file, $method, $showDelete, $showEdit, $object));
|
||||
|
||||
$fileListView->add($fileItemView);
|
||||
|
||||
@@ -112,10 +112,7 @@ detailBody
|
||||
section
|
||||
(
|
||||
set::title($lang->bug->legendComment),
|
||||
editor
|
||||
(
|
||||
set::name('comment'),
|
||||
)
|
||||
editor(set::name('comment'))
|
||||
)
|
||||
),
|
||||
history(),
|
||||
|
||||
Reference in New Issue
Block a user