All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.edit_cp_definition_link.jsp Maven / Gradle / Ivy

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" %>

<%
CPDefinitionLinkDisplayContext cpDefinitionLinkDisplayContext = (CPDefinitionLinkDisplayContext)request.getAttribute(WebKeys.PORTLET_DISPLAY_CONTEXT);

CPDefinitionLink cpDefinitionLink = cpDefinitionLinkDisplayContext.getCPDefinitionLink();
long cpDefinitionLinkId = cpDefinitionLinkDisplayContext.getCPDefinitionLinkId();

CPDefinition cpDefinition = cpDefinitionLink.getCPDefinition();

boolean neverExpire = ParamUtil.getBoolean(request, "neverExpire", true);

if (cpDefinitionLink.getExpirationDate() != null) {
	neverExpire = false;
}
%>


	

	
		
		
		
		
		
		

		

		

		

		

		

		
			
		

		<%
		boolean pending = false;

		if (cpDefinitionLink != null) {
			pending = cpDefinitionLink.isPending();
		}
		%>

		
			
<% String saveButtonLabel = "save"; if (cpDefinitionLink.isDraft() || cpDefinitionLink.isApproved() || cpDefinitionLink.isExpired() || cpDefinitionLink.isScheduled()) { saveButtonLabel = "save-as-draft"; } String publishButtonLabel = "publish"; if (cpDefinitionLinkDisplayContext.hasWorkflowDefinitionLink()) { publishButtonLabel = "submit-for-workflow"; } %>
var publishButton = A.one('#publishButton'); publishButton.on('click', () => { var workflowActionInput = A.one('#workflowAction'); if (workflowActionInput) { workflowActionInput.val('<%= WorkflowConstants.ACTION_PUBLISH %>'); } });




© 2015 - 2024 Weber Informatics LLC | Privacy Policy