[TYPO3-dev] Bug in constant editor using color selector in TYPO3 trunk

Patrick Rodacker patrick.rodacker at the-reflection.de
Sun Jan 13 17:30:23 CET 2008


Hi devs,

I stumbled about a small bug using the recent SVN version concerning the 
constant editor of the template module. If I try to set a constant of 
tpye=color the selected value does not get inserted into the text field 
next to the colors select list.

I did some research and found out, that the inline JS does not work for 
me, which should update the input text field with the selected value. In 
commit 2790 ids have been applied to the input fields in the file 
class.t3lib_tsparser_ext.php.

The relevant parts (line 1193 ff.):
									$p_field='<select id="'.$fN.'" name="C'.$fN.'" 
onChange="document.'.$this->ext_CEformName.'[\''.$fN.'\'].value=this.options[this.selectedIndex].value; 
uFormUrl('.$aname.');">'.$p_field.'</select>';

									$p_field.='<input type="text" name="'.$fN.'" 
value="'.$fV.'"'.$GLOBALS["TBE_TEMPLATE"]->formWidth(7).' 
onChange="uFormUrl('.$aname.')">';


AFAIK the JS code:

document.'.$this->ext_CEformName.'[\''.$fN.'\'].value=this.options[this.selectedIndex].value;

should get the form element where the name attribute is $fN, but it gets 
the field where the id attribute is equal to $fN;

If anybody could confirm this I will write a bug entry and provide a patch.


Regs
Patrick




More information about the TYPO3-dev mailing list