This is an automated email from the ASF dual-hosted git repository.

svenmeier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/master by this push:
     new 6ff1084  WICKET-6727 align css marker with other css classes
6ff1084 is described below

commit 6ff10841d5dca741a43c0c2637a6d5ec7845dba2
Author: Sven Meier <svenme...@apache.org>
AuthorDate: Fri Mar 13 19:26:12 2020 +0100

    WICKET-6727 align css marker with other css classes
---
 .../src/main/java/org/apache/wicket/Application.properties    |  7 ++++---
 .../html/form/validation/FormComponentFeedbackBorder.java     |  8 +++++---
 .../html/form/validation/FormComponentFeedbackIndicator.java  | 11 ++++++-----
 .../markup/html/form/feedback/FeedbackFormPage_result2.html   |  2 +-
 .../html/form/feedback/FeedbackIndicatorFormPage_result2.html |  2 +-
 5 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/wicket-core/src/main/java/org/apache/wicket/Application.properties 
b/wicket-core/src/main/java/org/apache/wicket/Application.properties
index f6e8137..d63888d 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Application.properties
+++ b/wicket-core/src/main/java/org/apache/wicket/Application.properties
@@ -86,7 +86,8 @@ AutoLabel.CSS.required=required
 AutoLabel.CSS.invalid=error
 AutoLabel.CSS.disabled=disabled
 
+FormComponentFeedbackBorder.CSS.error=feedbackBorderERROR
+FormComponentFeedbackIndicator.CSS.error=feedbackIndicatorERROR
+
 Component.CSS.hidden=wicket--hidden
-Form.CSS.hidden-fields=wicket--hidden-fields
-FormComponentFeedbackBorder.CSS.error-indicator=wicket--color-red
-FormComponentFeedbackIndicator.CSS.error-indicator=wicket--color-red
+Form.CSS.hidden-fields=wicket--hidden-fields
\ No newline at end of file
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/validation/FormComponentFeedbackBorder.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/validation/FormComponentFeedbackBorder.java
index 62eef73..d9134bc 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/validation/FormComponentFeedbackBorder.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/validation/FormComponentFeedbackBorder.java
@@ -42,6 +42,9 @@ public class FormComponentFeedbackBorder extends Border 
implements IFeedback
 {
        private static final long serialVersionUID = 1L;
 
+       private static final String ERROR_CSS_CLASS_KEY = CssUtils
+               .key(FormComponentFeedbackBorder.class, "error");
+
        /** Visible property cache. */
        private boolean visible;
 
@@ -72,13 +75,12 @@ public class FormComponentFeedbackBorder extends Border 
implements IFeedback
                {
                        return visible;
                }
-               
+
                @Override
                protected void onComponentTag(ComponentTag tag)
                {
                        super.onComponentTag(tag);
-                       tag.put("class",
-                               
getString(CssUtils.key(FormComponentFeedbackBorder.class, "error-indicator")));
+                       tag.put("class", getString(ERROR_CSS_CLASS_KEY));
                }
        }
 
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/validation/FormComponentFeedbackIndicator.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/validation/FormComponentFeedbackIndicator.java
index 05d5578..536e91c 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/validation/FormComponentFeedbackIndicator.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/validation/FormComponentFeedbackIndicator.java
@@ -37,6 +37,9 @@ import org.apache.wicket.markup.html.panel.Panel;
  */
 public class FormComponentFeedbackIndicator extends Panel implements IFeedback
 {
+       public static final String ERROR_CSS_CLASS_KEY = CssUtils
+               .key(FormComponentFeedbackIndicator.class, "error");
+
        private static final long serialVersionUID = 1L;
 
        /** The message filter for this indicator component */
@@ -74,12 +77,11 @@ public class FormComponentFeedbackIndicator extends Panel 
implements IFeedback
                        protected void onComponentTag(ComponentTag tag)
                        {
                                super.onComponentTag(tag);
-                               tag.put("class", getString(
-                                       
CssUtils.key(FormComponentFeedbackIndicator.class, "error-indicator")));
+                               tag.put("class", 
getString(ERROR_CSS_CLASS_KEY));
                        }
                });
        }
-       
+
        /**
         * Set the component's visibility according to the existence (or not) 
of feedback messages
         */
@@ -88,8 +90,7 @@ public class FormComponentFeedbackIndicator extends Panel 
implements IFeedback
        {
                super.onConfigure();
                // Get the messages for the current page
-               setVisible(new 
FeedbackCollector(getPage()).collect(getFeedbackMessageFilter())
-                       .size() > 0);
+               setVisible(new 
FeedbackCollector(getPage()).collect(getFeedbackMessageFilter()).size() > 0);
        }
 
        /**
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/feedback/FeedbackFormPage_result2.html
 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/feedback/FeedbackFormPage_result2.html
index f3c9297..3eab8aa 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/feedback/FeedbackFormPage_result2.html
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/feedback/FeedbackFormPage_result2.html
@@ -5,7 +5,7 @@
                <wicket:body>
        <input type="text" wicket:id="input" value="" 
name="feedback:feedback_body:input">
 </wicket:body>
-           <span wicket:id="errorIndicator" class="wicket--color-red">*</span>
+           <span wicket:id="errorIndicator" 
class="feedbackBorderERROR">*</span>
        </wicket:border></span>
 </form>
 </body>
diff --git 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/feedback/FeedbackIndicatorFormPage_result2.html
 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/feedback/FeedbackIndicatorFormPage_result2.html
index 3e2258e..bbb6774 100644
--- 
a/wicket-core/src/test/java/org/apache/wicket/markup/html/form/feedback/FeedbackIndicatorFormPage_result2.html
+++ 
b/wicket-core/src/test/java/org/apache/wicket/markup/html/form/feedback/FeedbackIndicatorFormPage_result2.html
@@ -2,7 +2,7 @@
 <body>
 <form wicket:id="form" id="form1" method="post" 
action="./org.apache.wicket.markup.html.form.feedback.FeedbackIndicatorFormPage?1-2.-form">
        <input type="text" wicket:id="input" value="" name="input">
-<span wicket:id="feedback"><wicket:panel><span wicket:id="indicator" 
class="wicket--color-red">*</span></wicket:panel></span>
+<span wicket:id="feedback"><wicket:panel><span wicket:id="indicator" 
class="feedbackIndicatorERROR">*</span></wicket:panel></span>
 </form>
 </body>
 </html>
\ No newline at end of file

Reply via email to