cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r372260 - in /cocoon: branches/BRANCH_2_1_X/status.xml trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
Date Wed, 25 Jan 2006 16:31:33 GMT
Author: jbq
Date: Wed Jan 25 08:31:25 2006
New Revision: 372260

URL: http://svn.apache.org/viewcvs?rev=372260&view=rev
Log:
Fix COCOON-1699: Enable MultiValueFields with checkbox style to be disabled

Modified:
    cocoon/branches/BRANCH_2_1_X/status.xml
    cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl

Modified: cocoon/branches/BRANCH_2_1_X/status.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/status.xml?rev=372260&r1=372259&r2=372260&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/status.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/status.xml Wed Jan 25 08:31:25 2006
@@ -180,6 +180,9 @@
   <release version="@version@" date="@date@">
 -->
   <release version="2.1.9" date="TBD">
+    <action dev="JBQ" type="fix" fixes-bug="COCOON-1699" due-to="Paul Focke" due-to-email="paul@outerthought.org">
+       CForms: Enable MultiValueFields with checkbox style to be disabled
+    </action>
     <action dev="JBQ" type="fix" fixes-bug="COCOON-1719">
        IncludeTransformer: source must not be cached if an error occurs
     </action>

Modified: cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl?rev=372260&r1=372259&r2=372260&view=diff
==============================================================================
--- cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
(original)
+++ cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
Wed Jan 25 08:31:25 2006
@@ -93,9 +93,9 @@
       <xsl:attribute name="onchange">forms_submitForm(this)</xsl:attribute>
     </xsl:if>
 
-  	<xsl:if test="@state = 'disabled'">
-  		<xsl:attribute name="disabled">disabled</xsl:attribute>
-  	</xsl:if>
+    <xsl:if test="@state = 'disabled'">
+      <xsl:attribute name="disabled">disabled</xsl:attribute>
+    </xsl:if>
 
     <!--+
         | @listbox-size needs to be handled separately as even if it is not
@@ -413,12 +413,16 @@
   <xsl:template match="fi:multivaluefield[fi:styling/@list-type='checkbox']">
     <xsl:variable name="id" select="@id"/>
     <xsl:variable name="values" select="fi:values/fi:value/text()"/>
+    <xsl:variable name="state" select="@state" />
 
     <span id="{@id}" title="{fi:hint}">
       <xsl:for-each select="fi:selection-list/fi:item">
         <xsl:variable name="value" select="@value"/>
         <xsl:variable name="item-id" select="concat($id, ':', position())"/>
         <input id="{$item-id}" type="checkbox" value="{@value}" name="{$id}">
+          <xsl:if test="$state = 'disabled'">
+            <xsl:attribute name="disabled">disabled</xsl:attribute>
+          </xsl:if>
           <xsl:if test="$values[. = $value]">
             <xsl:attribute name="checked">checked</xsl:attribute>
           </xsl:if>



Mime
View raw message