Updated Branches:
  refs/heads/master 0d784d945 -> a586a1af6

Change Label (back) to rendering class="control-label"


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/9df0250b
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/9df0250b
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/9df0250b

Branch: refs/heads/master
Commit: 9df0250b46fcacbcc566517a0d281273f9271238
Parents: 0d784d9
Author: Howard M. Lewis Ship <[email protected]>
Authored: Tue Sep 3 16:26:49 2013 -0700
Committer: Howard M. Lewis Ship <[email protected]>
Committed: Tue Sep 3 16:26:49 2013 -0700

----------------------------------------------------------------------
 54_RELEASE_NOTES.txt                                     | 11 +++++++++++
 .../org/apache/tapestry5/corelib/components/Label.java   |  2 +-
 .../apache/tapestry5/integration/app1/MiscTests.groovy   |  4 ++--
 .../org/apache/tapestry5/integration/app1/FormTests.java |  6 ++++--
 4 files changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9df0250b/54_RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/54_RELEASE_NOTES.txt b/54_RELEASE_NOTES.txt
index faad914..1840d92 100644
--- a/54_RELEASE_NOTES.txt
+++ b/54_RELEASE_NOTES.txt
@@ -196,6 +196,17 @@ http://twitter.github.com/bootstrap/base-css.html#forms
 
 You may also use the new FormGroup mixin for most fields.
 
+## Form element components
+
+TextField, PasswordField, TextArea, and Select now render the CSS class 
attribute "form-control"; you may add additional
+CSS class names with the `class` informal parameter.  Generally, you will want 
to add Bootstrap `col-md-x` class names
+to control the size of the element (otherwise it will stretch to 100% of the 
available width).
+
+## LabelComponent
+
+The Label component now renders the CSS class attribute as "control-label"; 
additional CSS class names may be provided
+using the `class` informal parameter.
+
 ## BeanEditor / BeanEditForm
 
 The property edit blocks contributed to the BeanBlockSource service should 
expect to be nested inside a

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9df0250b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Label.java
----------------------------------------------------------------------
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Label.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Label.java
index 7bb9f4a..b030929 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Label.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Label.java
@@ -64,7 +64,7 @@ public class Label
     {
         decorator.beforeLabel(field);
 
-        labelElement = writer.element("label");
+        labelElement = writer.element("label", "class", "control-label");
 
         resources.renderInformalParameters(writer);
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9df0250b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/MiscTests.groovy
----------------------------------------------------------------------
diff --git 
a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/MiscTests.groovy
 
b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/MiscTests.groovy
index f0a5c3d..b2bde4e 100644
--- 
a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/MiscTests.groovy
+++ 
b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/MiscTests.groovy
@@ -40,8 +40,8 @@ class MiscTests extends TapestryCoreTestCase {
     {
         openLinks "Override Label Class Demo"
 
-        assertSourcePresent "<label for=\"firstName\">First Name</label>",
-                            "<label for=\"lastName\" 
class=\"dummyClassName\">Last Name</label>"
+        assertSourcePresent "<label for=\"firstName\" 
class=\"control-label\">First Name</label>",
+                            "<label for=\"lastName\" class=\"control-label 
dummyClassName\">Last Name</label>"
 
     }
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9df0250b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java
----------------------------------------------------------------------
diff --git 
a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java
 
b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java
index 4c551b6..9e4ce92 100644
--- 
a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java
+++ 
b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java
@@ -16,6 +16,7 @@ package org.apache.tapestry5.integration.app1;
 
 import org.apache.tapestry5.corelib.components.Form;
 import org.apache.tapestry5.integration.TapestryCoreTestCase;
+import org.apache.tapestry5.test.TapestryTestConfiguration;
 import org.testng.annotations.Test;
 
 import java.text.SimpleDateFormat;
@@ -24,6 +25,7 @@ import java.util.Date;
 /**
  * Tests for the {@link Form} component as well as many form control 
components.
  */
+@TapestryTestConfiguration(webAppFolder = "src/test/app1")
 public class FormTests extends TapestryCoreTestCase
 {
 
@@ -508,10 +510,10 @@ public class FormTests extends TapestryCoreTestCase
         // ComponentFieldValidator.isRequired()
 
         assertSourcePresent(
-                "[Before label for Value]<label 
for=\"value\">Value</label>[After label for Value]",
+                "[Before label for Value]<label for=\"value\" 
class=\"control-label\">Value</label>[After label for Value]",
                 "[Before field Value]",
                 "[After field Value (optional)]",
-                "[Before label for Required Value]<label 
for=\"requiredValue\">Required Value</label>[After label for Required Value]",
+                "[Before label for Required Value]<label for=\"requiredValue\" 
class=\"control-label\">Required Value</label>[After label for Required Value]",
                 "[Before field Required Value]", "[After field Required Value 
(required)]");
     }
 

Reply via email to