Project

General

Profile

Feature #17886 » tceforms_disable_group_controls.patch

Administrator Admin, 2007-12-05 10:23

View differences:

t3lib/class.t3lib_tceforms.php (working copy)
}
// Creating the element:
$noList = isset($config['disable_controls']) && t3lib_div::inList($config['disable_controls'], 'list');
$params = array(
'size' => $size,
'dontShowMoveIcons' => ($maxitems<=1),
......
'style' => isset($config['selectedListStyle']) ? ' style="'.htmlspecialchars($config['selectedListStyle']).'"' : ' style="'.$this->defaultMultipleSelectorStyle.'"',
'info' => $info,
'thumbnails' => $thumbsnail,
'readOnly' => $disabled
'readOnly' => $disabled,
'noBrowser' => $noList || isset($config['disable_controls']) && t3lib_div::inList($config['disable_controls'], 'browser'),
'noList' => $noList,
);
$item.= $this->dbFileIcons($PA['itemFormElName'],'file',implode(',',$tempFT),$itemArray,'',$params,$PA['onFocus']);
if(!$disabled) {
if(!$disabled && !(isset($config['disable_controls']) && t3lib_div::inList($config['disable_controls'], 'upload'))) {
// Adding the upload field:
if ($this->edit_docModuleUpload) $item.='<input type="file" name="'.$PA['itemFormElName_file'].'"'.$this->formWidth().' size="60" />';
}
......
// Create selector box of the options
$sSize = $params['autoSizeMax'] ? t3lib_div::intInRange($itemArrayC+1,t3lib_div::intInRange($params['size'],1),$params['autoSizeMax']) : $params['size'];
if (!$selector) {
$selector = '<select size="'.$sSize.'"'.$this->insertDefStyle('group').' multiple="multiple" name="'.$fName.'_list" '.$onFocus.$params['style'].$disabled.'>'.implode('',$opt).'</select>';
$selector = '<select ' . ($params['noList'] ? 'style="display: none"' : 'size="'.$sSize.'"'.$this->insertDefStyle('group')).' multiple="multiple" name="'.$fName.'_list" '.$onFocus.$params['style'].$disabled.'>'.implode('',$opt).'</select>';
}
......
'L' => array(),
'R' => array(),
);
if (!$params['readOnly']) {
if (!$params['readOnly'] && !$params['noList']) {
if (!$params['noBrowser']) {
// check against inline uniqueness
$inlineParent = $this->inline->getStructureLevel(-1);
......
'
<tr>
<td valign="top">'.
$selector.'<br />'.
$this->wrapLabels($params['info']).
$selector.
($params['noList'] ? '' : '<br />'.$this->wrapLabels($params['info'])) .
'</td>
<td valign="top">'.
implode('<br />',$icons['L']).'</td>
(2-2/3)