Changeset 2827 in products


Ignore:
Timestamp:
Sep 15, 2010 7:06:35 PM (14 years ago)
Author:
dahoste
Message:

Small tweak to skin template to inject a CSS classname ('readonly') when the field instance being rendered is in fact readonly, to allow for visual styling of the element to clearly reflect the status. Note that this change has no effect if it is not partnered with a CSS stylesheet that assigns properties to the 'readonly' class (or a selector that includes it).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.ploneformgen.readonlystringfield/branches/dahoste/quintagroup/ploneformgen/readonlystringfield/skins/readonlystringfield/readonlystring.pt

    r826 r2827  
    3131               size="30" 
    3232               readonly="1" 
    33                tal:define="editable python:path('request/%s_editable|nothing' % fieldName)" 
     33               tal:define="editable python:path('request/%s_editable|nothing' % fieldName); 
     34                           readonly python:not editable and '1' or None;" 
    3435               tal:attributes="name fieldName; 
    3536                               id fieldName; 
     
    3738                               size widget/size; 
    3839                               maxlength widget/maxlength; 
    39                                readonly python:not editable and '1' or None" 
     40                               readonly readonly; 
     41                               class python: readonly and 'blurrable firstToFocus readonly' or 'blurrable firstToFocus'" 
    4042               /> 
    4143      </metal:use> 
Note: See TracChangeset for help on using the changeset viewer.