struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amashche...@apache.org
Subject [1/2] struts git commit: WW-4630 - <s:submit> generates a value attribute for type=image which violates W3C
Date Wed, 04 May 2016 20:01:39 GMT
Repository: struts
Updated Branches:
  refs/heads/master f238cf4f1 -> c4d2b687b
  refs/heads/support-2-3 76eb8f38a -> 731fde544


WW-4630 - <s:submit> generates a value attribute for type=image which violates W3C


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/c4d2b687
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/c4d2b687
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/c4d2b687

Branch: refs/heads/master
Commit: c4d2b687be8bdb454a11c5376bb475a8fa7f9c67
Parents: f238cf4
Author: Aleksandr Mashchenko <amashchenko@apache.org>
Authored: Wed May 4 22:54:28 2016 +0300
Committer: Aleksandr Mashchenko <amashchenko@apache.org>
Committed: Wed May 4 22:54:28 2016 +0300

----------------------------------------------------------------------
 core/src/main/resources/template/simple/submit.ftl             | 6 +++---
 .../test/java/org/apache/struts2/views/jsp/ui/SubmitTest.java  | 2 +-
 .../resources/org/apache/struts2/views/jsp/ui/Submit-1.txt     | 2 +-
 .../resources/org/apache/struts2/views/jsp/ui/Submit-2.txt     | 2 +-
 .../resources/org/apache/struts2/views/jsp/ui/Submit-5.txt     | 2 +-
 .../resources/org/apache/struts2/views/jsp/ui/Submit-6.txt     | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/c4d2b687/core/src/main/resources/template/simple/submit.ftl
----------------------------------------------------------------------
diff --git a/core/src/main/resources/template/simple/submit.ftl b/core/src/main/resources/template/simple/submit.ftl
index 24db4a8..d77b5d0 100644
--- a/core/src/main/resources/template/simple/submit.ftl
+++ b/core/src/main/resources/template/simple/submit.ftl
@@ -61,6 +61,9 @@
 </#if>
 <#else>
 <input type="submit"<#rt/>
+<#if parameters.nameValue?has_content>
+ value="<@s.property value="parameters.nameValue"/>"<#rt/>
+</#if>
 </#if>
 <#if parameters.id?has_content>
  id="${parameters.id?html}"<#rt/>
@@ -68,9 +71,6 @@
 <#if parameters.name?has_content>
  name="${parameters.name?html}"<#rt/>
 </#if>
-<#if parameters.nameValue?has_content>
- value="<@s.property value="parameters.nameValue"/>"<#rt/>
-</#if>
 <#if parameters.disabled!false>
  disabled="disabled"<#rt/>
 </#if>

http://git-wip-us.apache.org/repos/asf/struts/blob/c4d2b687/core/src/test/java/org/apache/struts2/views/jsp/ui/SubmitTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/struts2/views/jsp/ui/SubmitTest.java b/core/src/test/java/org/apache/struts2/views/jsp/ui/SubmitTest.java
index 2a33037..71fbb14 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/ui/SubmitTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/SubmitTest.java
@@ -232,7 +232,7 @@ public class SubmitTest extends AbstractUITagTest {
         tag.doStartTag();
         tag.doEndTag();
 
-        assertEquals("<input type=\"submit\" id=\"myname\" name=\"myname\" value=\"Submit\"/>",
writer.toString().trim());
+        assertEquals("<input type=\"submit\" value=\"Submit\" id=\"myname\" name=\"myname\"/>",
writer.toString().trim());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/struts/blob/c4d2b687/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-1.txt
----------------------------------------------------------------------
diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-1.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-1.txt
index ef5882c..330df2c 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-1.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-1.txt
@@ -1,3 +1,3 @@
 <tr>
-    <td colspan="2"><div class="formButton"><input type="submit" id="myname"
name="myname" value="bar" disabled="disabled" tabindex="1"/></div></td>
+    <td colspan="2"><div class="formButton"><input type="submit" value="bar"
id="myname" name="myname" disabled="disabled" tabindex="1"/></div></td>
 </tr>

http://git-wip-us.apache.org/repos/asf/struts/blob/c4d2b687/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-2.txt
----------------------------------------------------------------------
diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-2.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-2.txt
index 36b1554..e4b7c8b 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-2.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-2.txt
@@ -1,3 +1,3 @@
 <tr>
-    <td colspan="2"><div class="formButton"><input type="submit" id="myname"
name="myname" value="Submit" title="mytitle"/></div></td>
+    <td colspan="2"><div class="formButton"><input type="submit" value="Submit"
id="myname" name="myname" title="mytitle"/></div></td>
 </tr>

http://git-wip-us.apache.org/repos/asf/struts/blob/c4d2b687/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-5.txt
----------------------------------------------------------------------
diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-5.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-5.txt
index d83c44f..8632bc0 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-5.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-5.txt
@@ -1,3 +1,3 @@
 <tr>
-    <td colspan="2"><div class="formButton"><input type="image" alt="bar"
id="myname" name="myname" value="bar" disabled="disabled"/></div></td>
+    <td colspan="2"><div class="formButton"><input type="image" alt="bar"
id="myname" name="myname" disabled="disabled"/></div></td>
 </tr>

http://git-wip-us.apache.org/repos/asf/struts/blob/c4d2b687/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-6.txt
----------------------------------------------------------------------
diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-6.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-6.txt
index 9cd5d02..41dba2a 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-6.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Submit-6.txt
@@ -1,3 +1,3 @@
 <tr>
-    <td colspan="2"><div class="formButton"><input type="image" alt="mylabel"
src="some.gif" id="myname" name="myname" value="bar"/></div></td>
+    <td colspan="2"><div class="formButton"><input type="image" alt="mylabel"
src="some.gif" id="myname" name="myname"/></div></td>
 </tr>


Mime
View raw message