<?php
 class filesField extends baseField { var $Conf = array( 'xtype' => 'filelistselect', 'icon' => 'folder_edit.png', 'height' => 200, ); function edit($addConf,$R) { $R['xtype'] = ''; $R['autoSize'] = true; if(is_string($R['value']) AND is_array(unserialize($R['value']))) { $R['value'] = unserialize($R['value']); } if(!is_array($R['value'])) { $R['value'] = false; } if($R['conf']['cnt']) { $R['showTxt'] = array('file','txt|de'); $R['struct'] = array('file' => ''); foreach($this->Mizu->project['conf']['lngs'] as $k => $v) { $R['struct']['txt|'.$k] = ''; } } else { $R['showTxt'] = array('file','txt'); $R['struct'] = array('file' => '','txt' => ''); } return parent::edit($addConf,$R); } } ?>