Actually, valid xhtml would be
<input disabled="disabled"/>

On Jan 6, 2008 5:38 PM, pangel <[EMAIL PROTECTED]> wrote:

>
> so %tr{:style => nil} will render <tr> right? In this case, is there a
> clean way to add 'disabled' to a form input?
>
> (I was expecting something like %input{:disabled => nil} to render
> <input disabled>)
>
> On Jan 5, 11:19 am, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
> > %tr{:style => status == :expected ? nil : "display :none;"}
> >   %td Expected month
> >   %td= f.date_select "expected_date", :order => [:month, :year]
> >
> > Attribute hashes are Ruby code. You can do anything in them that you
> > could do in a normal hash literal (plus a little more if you want to).
> >
> > - Nathan
> >
> > bartocc wrote:
> > > Hi,
> >
> > > is there an Dryier way to write this with HAML ?
> > > The difference concerns the line %tr{:style => "display :none;"}
> >
> > >   - if status == :expected
> > >     %tr
> > >       %td Expected month
> > >       %td= f.date_select "expected_date", :order => [:month, :year]
> > >   - else
> > >     %tr{:style => "display :none;"}
> > >       %td Expected month
> > >       %td= f.date_select "expected_date", :order => [:month, :year]
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" 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/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to