Can you create a ticket for this issue with all the argument discussed here?

Thanks,
Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80


Marijn Huizendveld wrote:
> I too agree with Bernhard that we need some more control over row  
> level attributes. Introducing yet another configuration seems like a  
> mistake to me. Using more intelligent CSS seems to be the way to go  
> here, Tom is right on the money about that. Perhaps the backwards  
> compatible behavior should be configurable... Not the most elegant  
> solution but perhaps suited for this case?
> 
> Kind regards,
> 
> Marijn
> 
> On Feb 5, 2009, at 5:45 PM, Tom Boutell wrote:
> 
>> Yes, Bernhard is right. To expand on that, it's really a mistake to
>> have rowAttributes, labelAttributes, etc. as I first suggested,
>> because it's very verbose and if you use CSS intelligently you don't
>> need more than just attributes set on the row container (<li> or <tr>
>> depending on decorator):
>>
>> .special-row label {
>>  CSS for label
>> }
>>
>> .special-row input {
>>  CSS for widget
>> }
>>
>> .special-row {
>>  CSS for container itself
>> }
>>
>> There's a backwards compatibility issue here, but it's backwards
>> compatible with something pretty tough to use in any effective way. (:
>> If we must be backwards compatible, then please give us a
>> special-cased attribute 'row-class' that sets the class of the row
>> rather than the widget. That would be a lot less tedious than four
>> levels of arrays. And HTML has no row-class attribute, so there's no
>> conflict there.
>>
>> On Thu, Feb 5, 2009 at 10:19 AM, Bernhard Schussek <[email protected] 
>>> wrote:
>>>
>>> Hi Tom,
>>>
>>> 2009/2/5 Tom Boutell <[email protected]>:
>>>> I believe ->render() and ->renderRow() would be much more useful if
>>>> they accepted attributes intended for the formatting element that
>>>> contains the row, not just the attribute itself.
>>> I absolutely agree. If I use the method renderRow(), I am abstracting
>>> on a row-based level and I want to influence the attributes for the
>>> row. This is why I think passing the attributes given to renderRow()
>>> to the <tr> tag only would be fine.
>>>
>>> If I want to tune the attributes for the single widget, I can still
>>> render it individually.
>>>
>>> Example:
>>>
>>> $form['email']->renderRow(array('class' => 'foobar'));
>>> <tr class="foobar">...</tr>
>>> vs.
>>> $form['email']->render(array('class' => 'foobar'));
>>> <input class="foobar" ... />
>>>
>>>
>>> Bernhard
>>>
>>
>>
>> -- 
>> Tom Boutell
>>
>> www.punkave.com
>> www.boutell.com
>>
> 
> 
> > 
> 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to