svn commit: r582475 - in /ofbiz/branches/release4.0/applications: content/webapp/content/WEB-INF/actions/survey/ content/widget/ order/webapp/ordermgr/WEB-INF/ order/webapp/ordermgr/order/

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

svn commit: r582475 - in /ofbiz/branches/release4.0/applications: content/webapp/content/WEB-INF/actions/survey/ content/widget/ order/webapp/ordermgr/WEB-INF/ order/webapp/ordermgr/order/

jleroux@apache.org
Author: jleroux
Date: Sat Oct  6 02:59:16 2007
New Revision: 582475

URL: http://svn.apache.org/viewvc?rev=582475&view=rev
Log:
Applied fix from trunk for revision: 582474

Modified:
    ofbiz/branches/release4.0/applications/content/webapp/content/WEB-INF/actions/survey/ViewSurveyResponses.bsh
    ofbiz/branches/release4.0/applications/content/widget/SurveyScreens.xml
    ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/controller.xml
    ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/orderitems.ftl

Modified: ofbiz/branches/release4.0/applications/content/webapp/content/WEB-INF/actions/survey/ViewSurveyResponses.bsh
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/content/webapp/content/WEB-INF/actions/survey/ViewSurveyResponses.bsh?rev=582475&r1=582474&r2=582475&view=diff
==============================================================================
--- ofbiz/branches/release4.0/applications/content/webapp/content/WEB-INF/actions/survey/ViewSurveyResponses.bsh (original)
+++ ofbiz/branches/release4.0/applications/content/webapp/content/WEB-INF/actions/survey/ViewSurveyResponses.bsh Sat Oct  6 02:59:16 2007
@@ -22,6 +22,21 @@
 import org.ofbiz.base.util.*;
 import org.ofbiz.content.survey.*;
 
+if (survey == null) {
+    surveyResponseId = parameters.get("surveyResponseId");
+    if (!UtilValidate.isEmpty(surveyResponseId)) {
+        surveyResponse = delegator.findByPrimaryKey("SurveyResponse", UtilMisc.toMap("surveyResponseId", surveyResponseId));
+        if (surveyResponse != null) {
+            surveyId = surveyResponse.getString("surveyId");
+            if (!UtilValidate.isEmpty(surveyId)) {
+                survey = delegator.findByPrimaryKey("Survey", UtilMisc.toMap("surveyId", surveyId));
+                context.put("survey", survey);
+                context.put("surveyId", surveyId);
+            }
+        }
+    }
+}
+
 if (survey != null) {
     surveyWrapper = new SurveyWrapper(delegator, surveyId);
     context.put("surveyWrapper", surveyWrapper);

Modified: ofbiz/branches/release4.0/applications/content/widget/SurveyScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/content/widget/SurveyScreens.xml?rev=582475&r1=582474&r2=582475&view=diff
==============================================================================
--- ofbiz/branches/release4.0/applications/content/widget/SurveyScreens.xml (original)
+++ ofbiz/branches/release4.0/applications/content/widget/SurveyScreens.xml Sat Oct  6 02:59:16 2007
@@ -26,8 +26,6 @@
                 <set field="titleProperty" value="PageTitleFindSurvey"/>
                 <set field="tabButtonItem" value="Survey"/>
                 <set field="labelTitleProperty" value="PageTitleFindSurvey"/>
-                
-                <set field="surveyId" from-field="parameters.surveyId"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonSurveyDecorator">
@@ -56,8 +54,6 @@
         <section>
             <actions>
                 <set field="headerItem" value="survey"/>
-                <set field="surveyId" from-field="parameters.surveyId"/>
-                <entity-one entity-name="Survey" value-name="survey"/>
             </actions>
             <widgets>
                 <decorator-screen name="mainContentDecorator" location="component://content/widget/CommonScreens.xml">

Modified: ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/controller.xml?rev=582475&r1=582474&r2=582475&view=diff
==============================================================================
--- ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/controller.xml (original)
+++ ofbiz/branches/release4.0/applications/order/webapp/ordermgr/WEB-INF/controller.xml Sat Oct  6 02:59:16 2007
@@ -434,7 +434,7 @@
         <response name="error" type="request" value="orderentry"/>
     </request-map>
     <request-map uri="additemsurvey">
-        <security https="false" auth="false"/>
+        <security https="true" auth="true"/>
         <event type="service" invoke="createSurveyResponse"/>
         <response name="success" type="request" value="additem"/>
         <response name="error" type="view" value="main"/>

Modified: ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/orderitems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/orderitems.ftl?rev=582475&r1=582474&r2=582475&view=diff
==============================================================================
--- ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/orderitems.ftl (original)
+++ ofbiz/branches/release4.0/applications/order/webapp/ordermgr/order/orderitems.ftl Sat Oct  6 02:59:16 2007
@@ -370,7 +370,7 @@
                     <td align="right" colspan="2">
                       <div class="tabletext" style="font-size: xx-small;">
                         <b><i>${uiLabelMap.CommonSurveys}</i>:</b>
-                          <a href="/content/control/ViewSurveyResponses?surveyResponseId=${survey.surveyResponseId}&amp;surveyId=${survey.surveyId}<#if survey.partyId?exists>&amp;partyId=${survey.partyId}</#if>&amp;externalLoginKey=${externalLoginKey}" class="buttontext" style="font-size: xx-small;">${survey.surveyId}</a>
+                          <a href="/content/control/ViewSurveyResponses?surveyResponseId=${survey.surveyResponseId}&amp;surveyId=${survey.surveyId}&amp;externalLoginKey=${externalLoginKey}" class="buttontext" style="font-size: xx-small;">${survey.surveyId}</a>
                       </div>
                     </td>
                     <td>&nbsp;</td>