Login  Register

svn commit: r1340659 - in /ofbiz/branches/release11.04: ./ applications/content/webapp/content/survey/EditSurveyQuestions.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

svn commit: r1340659 - in /ofbiz/branches/release11.04: ./ applications/content/webapp/content/survey/EditSurveyQuestions.ftl

jleroux@apache.org
14119 posts
Author: jleroux
Date: Sun May 20 10:15:23 2012
New Revision: 1340659

URL: http://svn.apache.org/viewvc?rev=1340659&view=rev
Log:
"Applied fix from trunk for revision: 1340657  "
------------------------------------------------------------------------
r1340657 | jleroux | 2012-05-20 12:13:22 +0200 (dim., 20 mai 2012) | 7 lines

A patch from Harsha Chadhar for "Remove Survey Question Option not working." https://issues.apache.org/jira/browse/OFBIZ-4878

On trying to delete/remove Survey Question Options for Survey Question Type= Selected Option, the following error is occurred :
Url : https://demo-trunk.ofbiz.apache.org:8443/content/control/removeSurveyQuestionAppl?surveyId=1501&surveyQuestionId=10000&surveyOptionSeqId=00001

Error calling event: org.ofbiz.webapp.event.EventHandlerException: Found URL parameter [surveyId] passed to secure (https) request-map with uri [removeSurveyQuestionAppl] with an event that calls service [deleteSurveyQuestionAppl]; this is not allowed for security reasons! The data should be encrypted by making it part of the request body (a form field) instead of the request URL. Moreover it would be kind if you could create a Jira sub-task of https://issues.apache.org/jira/browse/OFBIZ-2330 (check before if a sub-task for this error does not exist). If you are not sure how to create a Jira issue please have a look before at http://cwiki.apache.org/confluence/x/JIB2 Thank you in advance for your help.

------------------------------------------------------------------------


Modified:
    ofbiz/branches/release11.04/   (props changed)
    ofbiz/branches/release11.04/applications/content/webapp/content/survey/EditSurveyQuestions.ftl

Propchange: ofbiz/branches/release11.04/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1340657

Modified: ofbiz/branches/release11.04/applications/content/webapp/content/survey/EditSurveyQuestions.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/content/webapp/content/survey/EditSurveyQuestions.ftl?rev=1340659&r1=1340658&r2=1340659&view=diff
==============================================================================
--- ofbiz/branches/release11.04/applications/content/webapp/content/survey/EditSurveyQuestions.ftl (original)
+++ ofbiz/branches/release11.04/applications/content/webapp/content/survey/EditSurveyQuestions.ftl Sun May 20 10:15:23 2012
@@ -284,8 +284,15 @@ under the License.
         <tr<#if alt_row> class="alternate-row"</#if>>
           <td>${option.description?if_exists}</td>
           <td>${option.sequenceNum?if_exists}</td>
-          <td><a href="<@ofbizUrl>EditSurveyQuestions?surveyId=${requestParameters.surveyId}&amp;surveyQuestionId=${option.surveyQuestionId}&amp;surveyOptionSeqId=${option.surveyOptionSeqId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonEdit}</a>
-          <td><a href="<@ofbizUrl>removeSurveyQuestionAppl?surveyId=${requestParameters.surveyId}&amp;surveyQuestionId=${option.surveyQuestionId}&amp;surveyOptionSeqId=${option.surveyOptionSeqId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonRemove}</a>
+          <td><a href="<@ofbizUrl>EditSurveyQuestions?surveyId=${requestParameters.surveyId}&amp;surveyQuestionId=${option.surveyQuestionId}&amp;surveyOptionSeqId=${option.surveyOptionSeqId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonEdit}</a></td>
+          <td>
+            <form id="deleteSurveyQuestionOption_${option_index}" action="<@ofbizUrl>deleteSurveyQuestionOption</@ofbizUrl>" method="post">
+              <input type="hidden" name="surveyId" value="${requestParameters.surveyId}" />
+              <input type="hidden" name="surveyQuestionId" value="${option.surveyQuestionId}" />
+              <input type="hidden" name="surveyOptionSeqId" value="${option.surveyOptionSeqId}" />
+              <a href="javascript:document.getElementById('deleteSurveyQuestionOption_${option_index}').submit();"" class="buttontext">${uiLabelMap.CommonRemove}</a>
+            </form>
+          </td>
         </tr>
         <#assign alt_row = !alt_row>
       </#list>