[TYPO3-core] RFC: Fix bugs #3397 (submit as image) and #2938 (editIcons)

Franz Holzinger franz at fholzinger.com
Wed Jun 28 15:57:03 CEST 2006


Martin Kutschker a écrit :

>Franz Holzinger schrieb:
>  
>
>>Martin Kutschker a écrit :
>>
>>
>>    
>>
>>>Ernesto Baschny [cron IT] schrieb:
>>>
>>>
>>>
>>>      
>>>
>>>>Martin Kutschker schrieb am 08.06.2006 19:03:
>>>>
>>>>
>>>>  
>>>>
>>>>
>>>>        
>>>>
>>>>>>Problem 1: graphical submit is rendered with IMAGE and a str_replace
>>>>>>which leaves unwanted image attributes in the input element. Can be
>>>>>>solved by using IMG_RESOURCE.
>>>>>>      
>>>>>>
>>>>>>            
>>>>>>
>>>>>Attached is the new patch.
>>>>>
>>>>>It uses IMG_RESOURCE but adds altText, titleText and params of IMAGE.
>>>>>
>>>>>I have also modified getAltParam in a way that it may prevent the
>>>>>setting of longdesc which is only valid for img elements.
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>>Reviewed and tested: works ("This Page Is Valid XHTML 1.1!")
>>>>
>>>>+1 from me.
>>>>  
>>>>
>>>>        
>>>>
>>>Another one, please :-)
>>>
>>>
>>>
>>>+                        if ($image)    {
>>>+                            $fieldCode=sprintf('<input type="image"
>>>name="%s"%s src="%s"%s />',
>>>+                                $confData['fieldname'],
>>>$elementIdAttribute, $image, $params);
>>>                        } else    {
>>>                            $fieldCode=sprintf('<input type="submit"
>>>name="%s"%s value="%s"%s />',
>>>                                $confData['fieldname'],
>>>$elementIdAttribute,
>>>      
>>>
>>Is the rather duplicate code needed here?
>>    
>>
>
>I don't think that using if or ?: to resolve the different attributes 
>(type, src, value) makes the code easier to read.
>
>  
>
+1 From reading the code.

- Franz







More information about the TYPO3-team-core mailing list