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

<div class="alert alert-info">
	<liferay-ui:message key="use-the-form-below-to-rename-a-page,-moving-all-of-its-history-to-the-new-name" />
</div>

<aui:form action="<%= movePageURL %>" method="post" name="renameFm" onSubmit='<%= liferayPortletResponse.getNamespace() + "renamePage();" %>'>
	<aui:input name="<%= Constants.CMD %>" type="hidden" />
	<aui:input name="nodeId" type="hidden" value="<%= node.getNodeId() %>" />
	<aui:input name="title" type="hidden" value="<%= title %>" />
	<aui:input name="workflowAction" type="hidden" value="<%= WorkflowConstants.ACTION_PUBLISH %>" />

	<aui:input name="redirect" type="hidden" value="<%= redirect %>" />

	<aui:input name="currentTitle" type="resource" value="<%= wikiPage.getTitle() %>" />

	<aui:input name="newTitle" value="<%= newTitle %>" />

	<c:if test="<%= pending %>">
		<div class="alert alert-info">
			<liferay-ui:message key="there-is-a-publication-workflow-in-process" />
		</div>
	</c:if>

	<aui:button-row>
		<aui:button disabled="<%= pending %>" type="submit" value='<%= hasWorkflowDefinitionLink ? "submit-for-publication" : "rename" %>' />

		<aui:button href="<%= redirect %>" type="cancel" />
	</aui:button-row>
</aui:form>

<aui:script>
	function <portlet:namespace />renamePage() {
		document.<portlet:namespace />renameFm.<portlet:namespace /><%= Constants.CMD %>.value =
			'<%= Constants.RENAME %>';

		submitForm(document.<portlet:namespace />renameFm);
	}
</aui:script>