You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2007/10/06 11:57:23 UTC
svn commit: r582474 - in /ofbiz/trunk/applications:
content/webapp/content/WEB-INF/actions/survey/ViewSurveyResponses.bsh
content/widget/SurveyScreens.xml order/webapp/ordermgr/WEB-INF/controller.xml
order/webapp/ordermgr/order/orderitems.ftl
Author: jleroux
Date: Sat Oct 6 02:57:22 2007
New Revision: 582474
URL: http://svn.apache.org/viewvc?rev=582474&view=rev
Log:
A patch from Bilgin Ibryam "survey screen fix" (https://issues.apache.org/jira/browse/OFBIZ-1227) - OFBIZ-1227
Modified:
ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/survey/ViewSurveyResponses.bsh
ofbiz/trunk/applications/content/widget/SurveyScreens.xml
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl
Modified: ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/survey/ViewSurveyResponses.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/survey/ViewSurveyResponses.bsh?rev=582474&r1=582473&r2=582474&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/survey/ViewSurveyResponses.bsh (original)
+++ ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/survey/ViewSurveyResponses.bsh Sat Oct 6 02:57:22 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/trunk/applications/content/widget/SurveyScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/SurveyScreens.xml?rev=582474&r1=582473&r2=582474&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/SurveyScreens.xml (original)
+++ ofbiz/trunk/applications/content/widget/SurveyScreens.xml Sat Oct 6 02:57:22 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">
@@ -57,8 +55,6 @@
<actions>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
<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/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml?rev=582474&r1=582473&r2=582474&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml Sat Oct 6 02:57:22 2007
@@ -475,7 +475,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/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl?rev=582474&r1=582473&r2=582474&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl Sat Oct 6 02:57:22 2007
@@ -369,7 +369,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}&surveyId=${survey.surveyId}<#if survey.partyId?exists>&partyId=${survey.partyId}</#if>&externalLoginKey=${externalLoginKey}" class="buttontext" style="font-size: xx-small;">${survey.surveyId}</a>
+ <a href="/content/control/ViewSurveyResponses?surveyResponseId=${survey.surveyResponseId}&surveyId=${survey.surveyId}&externalLoginKey=${externalLoginKey}" class="buttontext" style="font-size: xx-small;">${survey.surveyId}</a>
</div>
</td>
<td colspan="5"> </td>