From 97b5e976dc92b99e281ecc45ebeba8ee042e29f2 Mon Sep 17 00:00:00 2001 From: Pranay Pandey Date: Wed, 29 Jun 2016 12:34:35 +0000 Subject: [PATCH] [OFBIZ-7554] Fixed issues with Forum Screens Delete and Update buttons. Issues fixed are: - Forum list on Forum Group View -- Delete button is not showing up and working. -- Update button is not working. - Forum Group Roles -- Delete button is not showing up and working. - Messages for Forum View -- Delete button is not showing up and working. -- Update button is not working. Thanks Mohammed Rehan Khan for reporting the issue and providing the patch. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1750624 13f79535-47bb-0310-9956-ffa450edef68 --- .../content/ContentManagementServices.java | 4 +- .../content/widget/forum/ForumForms.xml | 47 +++++++++++-------- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/applications/content/src/org/ofbiz/content/ContentManagementServices.java b/applications/content/src/org/ofbiz/content/ContentManagementServices.java index 39e5caa315..b7ee787cdd 100644 --- a/applications/content/src/org/ofbiz/content/ContentManagementServices.java +++ b/applications/content/src/org/ofbiz/content/ContentManagementServices.java @@ -412,9 +412,11 @@ public class ContentManagementServices { } else { if (deactivateExisting) { contentAssocExisting.put("thruDate", UtilDateTime.nowTimestamp()); + } else if (UtilValidate.isNotEmpty(context.get("thruDate"))) { + contentAssocExisting.put("thruDate", (Timestamp)context.get("thruDate")); } ModelService contentAssocModel = dispatcher.getDispatchContext().getModelService("updateContentAssoc"); - Map ctx = contentAssocModel.makeValid(contentAssoc, "IN"); + Map ctx = contentAssocModel.makeValid(contentAssocExisting, "IN"); contentAssocContext.putAll(ctx); thisResult = dispatcher.runSync("updateContentAssoc", contentAssocContext); String errMsg = ServiceUtil.getErrorMessage(thisResult); diff --git a/applications/content/widget/forum/ForumForms.xml b/applications/content/widget/forum/ForumForms.xml index 83cf51401c..7b04ab9403 100644 --- a/applications/content/widget/forum/ForumForms.xml +++ b/applications/content/widget/forum/ForumForms.xml @@ -42,8 +42,9 @@ under the License.
- - + + + @@ -56,16 +57,16 @@ under the License. - + - - - - - + + + + + - +
- - + + + - + +
@@ -148,18 +151,22 @@ under the License. + - - - - - - - - + + + + + + + + + + +