Author: jleroux
Date: Thu Sep 1 13:34:17 2016
New Revision: 1758774
URL: http://svn.apache.org/viewvc?rev=1758774&view=rev
Log:
A patch from Pierre Smits for "Maximise the utilisation of the Label
CommonStatus in various ecommerce forms" https://issues.apache.org/
jira/browse/OFBIZ-8102
There are forms in the ecommerce component referencing the status. This
issue is about applying the CommonLabel label where it is possible in these
forms.
Modified:
ofbiz/trunk/applications/product/src/main/java/org/
apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java
ofbiz/trunk/framework/widget/src/main/java/org/apache/
ofbiz/widget/renderer/macro/MacroFormRenderer.java
ofbiz/trunk/specialpurpose/ecommerce/widget/ForumForms.xml
ofbiz/trunk/specialpurpose/ecommerce/widget/blog/BlogForms.xml
Modified: ofbiz/trunk/applications/product/src/main/java/org/
apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/
product/src/main/java/org/apache/ofbiz/shipment/
thirdparty/dhl/DhlServices.java?rev=1758774&r1=1758773&
r2=1758774&view=diff
============================================================
==================
--- ofbiz/trunk/applications/product/src/main/java/org/
apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java (original)
+++ ofbiz/trunk/applications/product/src/main/java/org/
apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java Thu Sep 1 13:34:17
2016
@@ -809,20 +809,9 @@ public class DhlServices {
return handleDhlShipmentConfirmResponse(responseString,
shipmentRouteSegment, shipmentPackageRouteSegs, locale);
} catch (GenericEntityException e) {
Debug.logError(e, module);
- if (shipmentConfirmResponseString != null) {
- Debug.logError("Got XML ShipmentConfirmRespose: " +
shipmentConfirmResponseString, module);
- return ServiceUtil.returnError(UtilMisc.toList(
- UtilProperties.getMessage(resourceError,
- "FacilityShipmentFedexRateTempl
ateReadingError",
- UtilMisc.toMap("errorString",
e.toString()), locale),
- UtilProperties.getMessage(resourceError,
- "FacilityShipmentFedexShipmentC
onfirmResponse",
- UtilMisc.toMap("
shipmentConfirmResponseString", shipmentConfirmResponseString), locale)));
- } else {
- return ServiceUtil.returnError(UtilProperties.getMessage(
resourceError,
- "FacilityShipmentFedexRateTemplateReadingError",
- UtilMisc.toMap("errorString", e.toString()),
locale));
- }
+ return ServiceUtil.returnError(UtilProperties.getMessage(
resourceError,
+ "FacilityShipmentFedexRateTemplateReadingError",
+ UtilMisc.toMap("errorString", e.toString()), locale));
} catch (GenericServiceException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(UtilProperties.getMessage(
resourceError,
Modified: ofbiz/trunk/framework/widget/src/main/java/org/apache/
ofbiz/widget/renderer/macro/MacroFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/
src/main/java/org/apache/ofbiz/widget/renderer/macro/
MacroFormRenderer.java?rev=1758774&r1=1758773&r2=1758774&view=diff
============================================================
==================
--- ofbiz/trunk/framework/widget/src/main/java/org/apache/
ofbiz/widget/renderer/macro/MacroFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/main/java/org/apache/
ofbiz/widget/renderer/macro/MacroFormRenderer.java Thu Sep 1 13:34:17
2016
@@ -22,6 +22,7 @@ import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.io.StringWriter;
+import java.net.URLEncoder;
import java.rmi.server.UID;
import java.sql.Timestamp;
import java.util.HashSet;
@@ -2866,6 +2867,7 @@ public final class MacroFormRenderer imp
String newQueryString = sb.toString();
String urlPath = UtilHttp.removeQueryStringFromTarget(
paginateTarget);
linkUrl = rh.makeLink(this.request, this.response,
urlPath.concat(newQueryString));
+ linkUrl = URLEncoder.encode(linkUrl, "UTF-8");
}
StringWriter sr = new StringWriter();
sr.append("<@renderSortField ");
@@ -2873,7 +2875,7 @@ public final class MacroFormRenderer imp
sr.append(sortFieldStyle);
sr.append("\" title=\"");
sr.append(titleText);
- sr.append("\" linkUrl=\"");
+ sr.append("\" linkUrl=r\"");
sr.append(linkUrl);
sr.append("\" ajaxEnabled=");
sr.append(Boolean.toString(ajaxEnabled));
Modified: ofbiz/trunk/specialpurpose/ecommerce/widget/ForumForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/
ecommerce/widget/ForumForms.xml?rev=1758774&r1=1758773&r2=
1758774&view=diff
============================================================
==================
--- ofbiz/trunk/specialpurpose/ecommerce/widget/ForumForms.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/widget/ForumForms.xml Thu Sep 1
13:34:17 2016
@@ -254,7 +254,7 @@ under the License.
</field>
<field name="textData" title="${uiLabelMap.ContentText}"
id-name="textData"><textarea rows="20" cols="60"/></field>
- <field name="statusId" >
+ <field name="statusId" title="${uiLabelMap.CommonStatus}">
<drop-down allow-empty="false" no-current-selected-key="
SUBSCRIBE_BRONZE">
<list-options list-name="statusList" key-name="statusId"/>
</drop-down>
@@ -359,7 +359,7 @@ under the License.
<entity-options entity-name="CharacterSet"
key-field-name="characterSetId"/>
</drop-down>
</field>
- <field name="statusId">
+ <field name="statusId" title="${uiLabelMap.CommonStatus}">
<drop-down allow-empty="true">
<entity-options entity-name="StatusItem"
key-field-name="statusId">
<entity-constraint name="statusTypeId"
value="CONTENT_STATUS"/>
@@ -397,7 +397,7 @@ under the License.
<entity-options entity-name="DataTemplateType"
key-field-name="dataTemplateTypeId"/>
</drop-down>
</field>
- <field name="statusId">
+ <field name="statusId" title="${uiLabelMap.CommonStatus}">
<drop-down allow-empty="true">
<entity-options entity-name="StatusItem"
key-field-name="statusId">
<entity-constraint name="statusTypeId"
value="CONTENT_STATUS"/>
@@ -580,7 +580,7 @@ under the License.
<field name="privilegeEnumId" >
<ignored />
</field>
- <field name="statusId" >
+ <field name="statusId" title="${uiLabelMap.CommonStatus}">
<hidden value="CTNT_PUBLISHED"/>
</field>
<field name="contentAssocTypeId" >
Modified: ofbiz/trunk/specialpurpose/ecommerce/widget/blog/BlogForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/
ecommerce/widget/blog/BlogForms.xml?rev=1758774&r1=
1758773&r2=1758774&view=diff
============================================================
==================
--- ofbiz/trunk/specialpurpose/ecommerce/widget/blog/BlogForms.xml
(original)
+++ ofbiz/trunk/specialpurpose/ecommerce/widget/blog/BlogForms.xml Thu
Sep 1 13:34:17 2016
@@ -98,7 +98,7 @@
<field name="textData" title="${uiLabelMap.EcommerceRespond}"
map-name="rsp" widget-style="inputBox dojo-ResizableTextArea">
<textarea cols="60" rows="12"/>
</field>
- <field name="statusId">
+ <field name="statusId" title="${uiLabelMap.CommonStatus}">
<radio no-current-selected-key="CTNT_INITIAL_DRAFT">
<option key="CTNT_PUBLISHED" description="${uiLabelMap.
ContentBlogPost}"/>
<option key="CTNT_INITIAL_DRAFT"
description="${uiLabelMap.ContentBlogPreview}"/>
@@ -165,7 +165,7 @@
<field name="textData" title="${uiLabelMap.EcommerceRespond}"
map-name="electronicText" widget-style="inputBox dojo-ResizableTextArea">
<textarea cols="60" rows="12"/>
</field>
- <field name="statusId">
+ <field name="statusId" title="${uiLabelMap.CommonStatus}">
<radio no-current-selected-key="CTNT_INITIAL_DRAFT">
<option key="CTNT_PUBLISHED" description="${uiLabelMap.
ContentBlogPost}"/>
<option key="CTNT_INITIAL_DRAFT"
description="${uiLabelMap.ContentBlogPreview}"/>