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 2020/04/17 15:19:09 UTC
[ofbiz-framework] branch trunk updated: Fixed: Error removing an
uploaded party content
This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new 57805ae Fixed: Error removing an uploaded party content
57805ae is described below
commit 57805aebabaee62736ecf8c99810b5b673a2e37e
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Fri Apr 17 17:19:08 2020 +0200
Fixed: Error removing an uploaded party content
(OFBIZ-11597)
When you try to remove an uploaded party content you get this error:
ControlServlet |E| Error in request handler:
org.apache.ofbiz.webapp.control.RequestHandlerException:
Unknown request [removePartyContent/viewprofile];
this request does not exist or cannot be called directly.
While at it I also fixed the similar case for payment methods
---
applications/party/template/party/profileblocks/ContentList.ftl | 4 ++--
applications/party/template/party/profileblocks/PaymentMethods.ftl | 6 +++++-
applications/party/webapp/partymgr/WEB-INF/controller.xml | 7 +++++--
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/applications/party/template/party/profileblocks/ContentList.ftl b/applications/party/template/party/profileblocks/ContentList.ftl
index 4cc6919..49a505c 100644
--- a/applications/party/template/party/profileblocks/ContentList.ftl
+++ b/applications/party/template/party/profileblocks/ContentList.ftl
@@ -38,7 +38,7 @@ under the License.
<#if (content.contentName?has_content)>
<a href="<@o...@ofbizUrl>" target="_blank">${uiLabelMap.CommonView}</a>
</#if>
- <form name="removePartyContent_${pContent_index}" method="post" action="<@o...@ofbizUrl>">
+ <form name="removePartyContent_${pContent_index}" method="post" action="<@o...@ofbizUrl>">
<input type="hidden" name="contentId" value="${pContent.contentId}" />
<input type="hidden" name="partyId" value="${pContent.partyId}" />
<input type="hidden" name="partyContentTypeId" value="${pContent.partyContentTypeId}" />
@@ -52,4 +52,4 @@ under the License.
<#else>
${uiLabelMap.PartyNoContent}
</#if>
- </div>
\ No newline at end of file
+ </div>
diff --git a/applications/party/template/party/profileblocks/PaymentMethods.ftl b/applications/party/template/party/profileblocks/PaymentMethods.ftl
index a5ed3b8..aa0abe5 100644
--- a/applications/party/template/party/profileblocks/PaymentMethods.ftl
+++ b/applications/party/template/party/profileblocks/PaymentMethods.ftl
@@ -192,7 +192,11 @@ under the License.
</#if>
<#if security.hasEntityPermission("PAY_INFO", "_DELETE", session) || security.hasEntityPermission("ACCOUNTING", "_DELETE", session)>
- <a href="<@o...@ofbizUrl>">${uiLabelMap.CommonExpire}</a>
+ <form name="deletePaymentMethod_${paymentMethod.paymentMethodId}" method="post" action="<@o...@ofbizUrl>">
+ <input type="hidden" name="partyId" value="${partyId}" />
+ <input type="hidden" name="paymentMethodId" value="${paymentMethod.paymentMethodId}" />
+ <input type="submit" value="${uiLabelMap.CommonExpire}"/>
+ </form>
<#else>
</#if>
diff --git a/applications/party/webapp/partymgr/WEB-INF/controller.xml b/applications/party/webapp/partymgr/WEB-INF/controller.xml
index 1936fca..b88c306 100644
--- a/applications/party/webapp/partymgr/WEB-INF/controller.xml
+++ b/applications/party/webapp/partymgr/WEB-INF/controller.xml
@@ -1028,8 +1028,11 @@ under the License.
<request-map uri="removePartyContent">
<security auth="true" https="true"/>
<event type="service" invoke="removePartyContent"/>
- <response name="success" type="request-redirect" value="EditPartyContents">
- <redirect-parameter name="partyId"></redirect-parameter>
+ <response name="success" type="request-redirect" value="viewprofile">
+ <redirect-parameter name="partyId"/>
+ </response>
+ <response name="error" type="request-redirect" value="viewprofile">
+ <redirect-parameter name="partyId"/>
</response>
</request-map>