Feature #15431 » 0002292_1.patch
typo3/wizard_forms.php 2006-01-24 13:09:03.000000000 +0000 | ||
---|---|---|
// Field type selector:
|
||
$opt=array();
|
||
$opt[]='<option value=""></option>';
|
||
$types = explode(',','input,textarea,select,check,radio,password,file,hidden,submit,property,label');
|
||
$types = explode(',','fieldset,input,textarea,select,check,radio,password,file,hidden,submit,property,label');
|
||
foreach($types as $t) {
|
||
$opt[]='
|
||
<option value="'.$t.'"'.($confData['type']==$t?' selected="selected"':'').'>'.$LANG->getLL('forms_type_'.$t,1).'</option>';
|
||
... | ... | |
}
|
||
|
||
// Required checkbox:
|
||
if (!t3lib_div::inList('check,hidden,submit,label',$confData['type'])) {
|
||
if (!t3lib_div::inList('check,hidden,submit,label,fieldset',$confData['type'])) {
|
||
$temp_cells[$LANG->getLL('forms_required')]='<input type="checkbox" name="FORMCFG[c]['.(($k+1)*2).'][required]" value="1"'.($confData['required']?' checked="checked"':'').' title="'.$LANG->getLL('forms_required',1).'" />';
|
||
}
|
||
|
||
... | ... | |
if ($this->special=='formtype_mail' && $confData['type']=='file') {
|
||
$confData['fieldname'] = 'attachment'.(++$this->attachmentCounter);
|
||
}
|
||
if (!t3lib_div::inList('label',$confData['type'])) {
|
||
if (!t3lib_div::inList('label,fieldset',$confData['type'])) {
|
||
$temp_cells[$LANG->getLL('forms_fieldName')]='<input type="text"'.$this->doc->formWidth(10).' name="FORMCFG[c]['.(($k+1)*2).'][fieldname]" value="'.htmlspecialchars($confData['fieldname']).'" title="'.$LANG->getLL('forms_fieldName',1).'" />';
|
||
}
|
||
|
||
... | ... | |
$temp_cells[$LANG->getLL('forms_options')]='<textarea '.$this->doc->formWidthText(15).' rows="4" name="FORMCFG[c]['.(($k+1)*2).'][options]" title="'.$LANG->getLL('forms_options',1).'">'.t3lib_div::formatForTextarea($confData['default']).'</textarea>';
|
||
} elseif ($confData['type']=='check') {
|
||
$temp_cells[$LANG->getLL('forms_checked')]='<input type="checkbox" name="FORMCFG[c]['.(($k+1)*2).'][default]" value="1"'.(trim($confData['default'])?' checked="checked"':'').' title="'.$LANG->getLL('forms_checked',1).'" />';
|
||
} elseif ($confData['type'] && $confData['type']!='file') {
|
||
} elseif ($confData['type'] && $confData['type']!='file' && $confData['type']!='fieldset') {
|
||
$temp_cells[$LANG->getLL('forms_default')]='<input type="text"'.$this->doc->formWidth(15).' name="FORMCFG[c]['.(($k+1)*2).'][default]" value="'.htmlspecialchars($confData['default']).'" title="'.$LANG->getLL('forms_default',1).'" />';
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
-- typo3/sysext/lang/locallang_wizards.xml.old 2006-01-24 13:06:21.000000000 +0000
|
||
++ typo3/sysext/lang/locallang_wizards.xml 2006-01-24 13:06:44.000000000 +0000
|
||
... | ... | |
<label index="forms_type_submit">Submit Button</label>
|
||
<label index="forms_type_property">Property</label>
|
||
<label index="forms_type_label">Label</label>
|
||
<label index="forms_type_fieldset">Fieldset</label>
|
||
<label index="forms_required">Required</label>
|
||
<label index="forms_fieldName">Field</label>
|
||
<label index="forms_cols">Columns</label>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
-- typo3/sysext/cms/tslib/class.tslib_content.php.old 2006-01-24 13:57:54.000000000 +0000
|
||
++ typo3/sysext/cms/tslib/class.tslib_content.php 2006-01-24 14:28:09.000000000 +0000
|
||
... | ... | |
$fieldCode=sprintf('<input type="reset" name="%s"'.$elementIdAttribute.' value="%s"'.$addParams.' />',
|
||
$confData['fieldname'], t3lib_div::deHSCentities(htmlspecialchars($value)));
|
||
break;
|
||
case 'fieldset':
|
||
if ($fieldsetopen) {
|
||
$fieldCode='</fieldset>';
|
||
} else {
|
||
$fieldCode='';
|
||
}
|
||
$fieldCode.='<fieldset><legend>'.$confData['label'].'</legend>';
|
||
$fieldsetopen = true;
|
||
break;
|
||
case 'label':
|
||
$fieldCode = nl2br(htmlspecialchars(trim($parts[2])));
|
||
break;
|
||
... | ... | |
|
||
// Field:
|
||
$fieldLabel = $confData['label'];
|
||
if ($conf['accessibility'] && trim($fieldLabel) && !preg_match('/^(radio|label|hidden|comment)$/',$confData['type'])) {
|
||
if ($conf['accessibility'] && trim($fieldLabel) && !preg_match('/^(radio|label|hidden|comment|fieldset)$/',$confData['type'])) {
|
||
$fieldLabel = '<label for="'.$prefix.$fName.'">'.$fieldLabel.'</label>';
|
||
}
|
||
|
||
... | ... | |
if ($confData['type']=='label' && $conf['LABEL.']['layout']) {
|
||
$result = $conf['LABEL.']['layout'];
|
||
}
|
||
if ($confData['type']=='fieldset') {
|
||
$result = '###FIELD###';
|
||
}
|
||
$result = str_replace('###FIELD###',$fieldCode,$result);
|
||
$result = str_replace('###LABEL###',$labelCode,$result);
|
||
$result = str_replace('###COMMENT###',$commentCode,$result); //RTF
|
||
... | ... | |
}
|
||
}
|
||
}
|
||
|
||
if ($fieldsetopen) {
|
||
$content.='</fieldset>';
|
||
}
|
||
|
||
if ($conf['stdWrap.']) $content=$this->stdWrap($content, $conf['stdWrap.']);
|
||
|
||
|