Index: t3lib/class.t3lib_tceforms.php
===================================================================
--- t3lib/class.t3lib_tceforms.php (revision 5734)
+++ t3lib/class.t3lib_tceforms.php (working copy)
@@ -1063,6 +1063,41 @@
$size = t3lib_div::intInRange($config['size']?$config['size']:30,5,$this->maxInputWidth);
$evalList = t3lib_div::trimExplode(',',$config['eval'],1);
+ // cssclass and id will show the kind of field
+ if (in_array('date', $evalList)) {
+ $inputId = uniqid('datefield-');
+ $cssClass = 'tceforms-textfield tceforms-datefield';
+ } elseif (in_array('datetime', $evalList)) {
+ $inputId = uniqid('datetimefield-');
+ $cssClass = 'tceforms-textfield tceforms-datetimefield';
+ } elseif (in_array('timesec', $evalList)) {
+ $inputId = uniqid('timesecfield-');
+ $cssClass = 'tceforms-textfield tceforms-timesecfield';
+ } elseif (in_array('year', $evalList)) {
+ $inputId = uniqid('yearfield-');
+ $cssClass = 'tceforms-textfield tceforms-yearfield';
+ } elseif (in_array('time', $evalList)) {
+ $inputId = uniqid('timefield-');
+ $cssClass = 'tceforms-textfield tceforms-timefield';
+ } elseif (in_array('int', $evalList)) {
+ $inputId = uniqid('intfield-');
+ $cssClass = 'tceforms-textfield tceforms-intfield';
+ } elseif (in_array('double2', $evalList)) {
+ $inputId = uniqid('double2field-');
+ $cssClass = 'tceforms-textfield tceforms-double2field';
+ } else {
+ $inputId = uniqid('textfield-');
+ $cssClass = 'tceforms-textfield';
+ }
+ if (isset($config['wizards']['link'])) {
+ $inputId = uniqid('linkfield-');
+ $cssClass = 'tceforms-textfield tceforms-linkfield';
+ } elseif (isset($config['wizards']['color'])) {
+ $inputId = uniqid('colorfield-');
+ $cssClass = 'tceforms-textfield tceforms-colorfield';
+ }
+
+
if($this->renderReadonly || $config['readOnly']) {
$itemFormElValue = $PA['itemFormElValue'];
if (in_array('date',$evalList)) {
@@ -1114,7 +1149,7 @@
$checkSetValue = gmdate('Y');
}
$cOnClick = 'typo3form.fieldGet('.$paramsList.',1,\''.$checkSetValue.'\');'.implode('',$PA['fieldChangeFunc']);
- $item .= '';
+ $item .= '';
}
if ((in_array('date',$evalList) || in_array('datetime',$evalList)) && $PA['itemFormElValue']>0){
// Add server timezone offset to UTC to our stored date
@@ -1124,7 +1159,8 @@
$PA['fieldChangeFunc'] = array_merge(array('typo3form.fieldGet'=>'typo3form.fieldGet('.$paramsList.');'), $PA['fieldChangeFunc']);
$mLgd = ($config['max']?$config['max']:256);
$iOnChange = implode('',$PA['fieldChangeFunc']);
- $item.='formWidth($size).' maxlength="'.$mLgd.'" onchange="'.htmlspecialchars($iOnChange).'"'.$PA['onFocus'].' />'; // This is the EDITABLE form field.
+
+ $item.='formWidth($size).' maxlength="'.$mLgd.'" onchange="'.htmlspecialchars($iOnChange).'"'.$PA['onFocus'].' />'; // This is the EDITABLE form field.
$item.=''; // This is the ACTUAL form field - values from the EDITABLE field must be transferred to this field which is the one that is written to the database.
$this->extJSCODE.='typo3form.fieldSet('.$paramsList.');';
@@ -1254,8 +1290,8 @@
}
if (count($classes)) {
- $class = ' class="'.implode(' ',$classes).'"';
- } else $class='';
+ $class = ' class="tceforms-textarea '.implode(' ',$classes).'"';
+ } else $class='tceforms-textarea';
$evalList = t3lib_div::trimExplode(',',$config['eval'],1);
foreach ($evalList as $func) {
@@ -1280,7 +1316,7 @@
$iOnChange = implode('',$PA['fieldChangeFunc']);
$item.= '
-