struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4964) Missing javascript in form-validate.ftl
Date Thu, 13 Dec 2018 20:26:00 GMT

    [ https://issues.apache.org/jira/browse/WW-4964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16720574#comment-16720574
] 

ASF GitHub Bot commented on WW-4964:
------------------------------------

aleksandr-m closed pull request #290: [WW-4964] Drops duplicated import of utils.js
URL: https://github.com/apache/struts/pull/290
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/core/src/main/resources/template/xhtml/form-validate.ftl b/core/src/main/resources/template/xhtml/form-validate.ftl
index 2d140b7cc..5a65e0c0f 100644
--- a/core/src/main/resources/template/xhtml/form-validate.ftl
+++ b/core/src/main/resources/template/xhtml/form-validate.ftl
@@ -20,7 +20,6 @@
 -->
 <#if parameters.validate!false == true>
 	<script type="text/javascript" src="${base}/struts/xhtml/validation.js"></script>
-	<script type="text/javascript" src="${base}/struts/utils.js"></script>
 	<#if parameters.onsubmit??>
 		${tag.addParameter('onsubmit', "${parameters.onsubmit}; return validateForm_${parameters.id?replace('[^a-zA-Z0-9_]',
'_', 'r')}();")}
 	<#else>
diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt
index efb3596b5..ca4358a65 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt
@@ -1,5 +1,4 @@
 <script type="text/javascript" src="/struts/xhtml/validation.js"></script>
-<script type="text/javascript" src="/struts/utils.js"></script>
 <form id="testAction" name="myForm" onsubmit="submitMe(); return validateForm_testAction();"
action="/testAction.action" method="post" enctype="myEncType" title="mytitle" accept-charset="UTF-8"
onreset="clearErrorMessages(this);clearErrorLabels(this);">
 <table class="wwFormTable"> <tr>
     <td class="tdLabel"></td>
diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt
index 62d566c43..99ea36859 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt
@@ -1,5 +1,4 @@
 <script type="text/javascript" src="/struts/xhtml/validation.js"></script>
-<script type="text/javascript "src="/struts/utils.js"></script>
 <form id="doubleValidationAction" name="myForm" onsubmit="submitMe(); return validateForm_doubleValidationAction();"
action="/doubleValidationAction.action" method="post" enctype="myEncType" title="mytitle"
accept-charset="UTF-8" onreset="clearErrorMessages(this);clearErrorLabels(this);">
 <table class="wwFormTable"> <tr>
     <td class="tdLabel"></td>
diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-22.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-22.txt
index 136dc15c6..c03ae9d78 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-22.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-22.txt
@@ -1,5 +1,4 @@
 <script type="text/javascript" src="/struts/xhtml/validation.js"></script>
-<script type="text/javascript "src="/struts/utils.js"></script>
 <form id="doubleValidationAction" name="myForm" onsubmit="submitMe(); return validateForm_doubleValidationAction();"
action="/doubleValidationAction.action" method="post" enctype="myEncType" title="mytitle"
accept-charset="UTF-8" onreset="clearErrorMessages(this);clearErrorLabels(this);">
 <table class="wwFormTable"> <tr>
     <td class="tdLabel"></td>
diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-24.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-24.txt
index a27432a4b..b6178cd99 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-24.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-24.txt
@@ -1,5 +1,4 @@
 <script type="text/javascript" src="/struts/xhtml/validation.js"></script>
-<script type="text/javascript "src="/struts/utils.js"></script>
 <form id="doubleValidationAction" name="myForm" onsubmit="submitMe(); return validateForm_doubleValidationAction();"
action="/doubleValidationAction.action" method="post" enctype="myEncType" title="mytitle"
accept-charset="UTF-8" onreset="clearErrorMessages(this);clearErrorLabels(this);">
 <table class="wwFormTable"> <tr>
     <td class="tdLabel"></td>


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Missing javascript in form-validate.ftl
> ---------------------------------------
>
>                 Key: WW-4964
>                 URL: https://issues.apache.org/jira/browse/WW-4964
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Tags
>    Affects Versions: 2.5.17
>            Reporter: nikos dimitrakas
>            Assignee: Lukasz Lenart
>            Priority: Major
>             Fix For: 2.6
>
>
> There are two versions of form-validate.ftl, one in xhtml theme and one in css_xhtml
theme. The one in css_xhtml is missing the script tag for utils.js (and also some special
character cleaning). This causes the following error on the client: 
> Uncaught ReferenceError: StrutsUtils is not defined
>  at validation.js:161
> (anonymous) @ validation.js:161



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message