META-INF.resources.commerce_price_lists.edit_commerce_price_list.jsp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.commerce.pricing.web
Show all versions of com.liferay.commerce.pricing.web
Liferay Commerce Pricing Web
The newest version!
<%--
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
--%>
<%@ include file="/init.jsp" %>
<%
CommercePriceListDisplayContext commercePriceListDisplayContext = (CommercePriceListDisplayContext)request.getAttribute(WebKeys.PORTLET_DISPLAY_CONTEXT);
CommercePriceList commercePriceList = commercePriceListDisplayContext.getCommercePriceList();
String headerTitle = LanguageUtil.get(request, "add-price-list");
if (commercePriceList != null) {
headerTitle = commercePriceList.getName();
}
%>
document
.getElementById(' publishButton')
.addEventListener('click', (e) => {
e.preventDefault();
var form = document.getElementById(' fm');
if (!form) {
throw new Error('Form with id: fm not found!');
}
var workflowActionInput = document.getElementById(
' workflowAction'
);
if (workflowActionInput) {
workflowActionInput.value =
'<%= WorkflowConstants.ACTION_PUBLISH %>';
}
submitForm(form);
});