diff --git a/framework/control.class.php b/framework/control.class.php index b38c0d3523..5407b83e3e 100644 --- a/framework/control.class.php +++ b/framework/control.class.php @@ -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'; } } } diff --git a/lib/zin/wg/detailbody/v1.php b/lib/zin/wg/detailbody/v1.php index 7c46cf53ee..5b0758f27b 100644 --- a/lib/zin/wg/detailbody/v1.php +++ b/lib/zin/wg/detailbody/v1.php @@ -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) + ) ); } diff --git a/lib/zin/wg/filelist/v1.php b/lib/zin/wg/filelist/v1.php index 3b7a0d2500..7618c37aab 100644 --- a/lib/zin/wg/filelist/v1.php +++ b/lib/zin/wg/filelist/v1.php @@ -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); diff --git a/module/bug/ui/edit.html.php b/module/bug/ui/edit.html.php index 4d1ee9b685..5ed9f7c900 100644 --- a/module/bug/ui/edit.html.php +++ b/module/bug/ui/edit.html.php @@ -112,10 +112,7 @@ detailBody section ( set::title($lang->bug->legendComment), - editor - ( - set::name('comment'), - ) + editor(set::name('comment')) ) ), history(),