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

<%
String redirect = ParamUtil.getString(request, "redirect");

portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(redirect);

long[] categoryIds = ParamUtil.getLongValues(request, "categoryIds");

renderResponse.setTitle(LanguageUtil.format(request, "assign-display-page-template-for-x-categories", categoryIds.length));
%>

<portlet:actionURL name="/asset_categories_admin/set_asset_category_display_page_template" var="setCategoryDisplayPageTemplateURL">
	<portlet:param name="categoryIds" value="<%= StringUtil.merge(categoryIds) %>" />
	<portlet:param name="redirect" value="<%= redirect %>" />
</portlet:actionURL>

<liferay-frontend:edit-form
	action="<%= setCategoryDisplayPageTemplateURL %>"
	name="fm"
>
	<liferay-frontend:edit-form-body>
		<liferay-frontend:fieldset-group>
			<liferay-frontend:fieldset
				label="display-page"
			>
				<liferay-asset:select-asset-display-page
					classNameId="<%= PortalUtil.getClassNameId(AssetCategory.class) %>"
					classPK="<%= 0 %>"
					classTypeId="<%= 0 %>"
					groupId="<%= scopeGroupId %>"
					parentClassPK='<%= ParamUtil.getLong(request, "parentCategoryId") %>'
					showViewInContextLink="<%= true %>"
				/>
			</liferay-frontend:fieldset>
		</liferay-frontend:fieldset-group>
	</liferay-frontend:edit-form-body>

	<liferay-frontend:edit-form-footer>
		<aui:button type="submit" />

		<aui:button href="<%= redirect %>" type="cancel" />
	</liferay-frontend:edit-form-footer>
</liferay-frontend:edit-form>