<%--
/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * The contents of this file are subject to the terms of the Liferay Enterprise
 * Subscription License ("License"). You may not use this file except in
 * compliance with the License. You can obtain a copy of the License by
 * contacting Liferay, Inc. See the License for the specific language governing
 * permissions and limitations under the License, including but not limited to
 * distribution rights of the Software.
 *
 *
 *
 */
--%>

<%@ include file="/init.jsp" %>

<%
CPDefinitionDisplayLayoutDisplayContext cpDefinitionDisplayLayoutDisplayContext = (CPDefinitionDisplayLayoutDisplayContext)request.getAttribute(WebKeys.PORTLET_DISPLAY_CONTEXT);

CPDisplayLayout cpDisplayLayout = cpDefinitionDisplayLayoutDisplayContext.getCPDisplayLayout();

String layoutPageTemplateEntryName = cpDefinitionDisplayLayoutDisplayContext.getLayoutPageTemplateEntryName(cpDisplayLayout);
%>

<aui:input id="pagesContainerInput" ignoreRequestValue="<%= true %>" name="layoutPageTemplateEntryUuid" type="hidden" value="<%= (cpDisplayLayout == null) ? StringPool.BLANK : cpDisplayLayout.getLayoutPageTemplateEntryUuid() %>" />

<aui:field-wrapper cssClass="mt-3" helpMessage="product-display-page-help" label="product-display-page">
	<p class="text-default">
		<span class="<%= Validator.isNull(layoutPageTemplateEntryName) ? "hide" : StringPool.BLANK %>" id="<portlet:namespace />displayPageItemRemove" role="button">
			<aui:icon cssClass="icon-monospaced" image="times" markupView="lexicon" />
		</span>
		<span id="<portlet:namespace />displayPageNameInput">
			<c:choose>
				<c:when test="<%= Validator.isNull(layoutPageTemplateEntryName) %>">
					<span class="text-muted"><liferay-ui:message key="none" /></span>
				</c:when>
				<c:otherwise>
					<%= layoutPageTemplateEntryName %>
				</c:otherwise>
			</c:choose>
		</span>
	</p>
</aui:field-wrapper>

<aui:button name="chooseLayoutPageTemplateEntry" value="choose" />