<%--
/**
 * Copyright (c) 2000-2017 Liferay, Inc. All rights reserved.
 *
 * The contents of this file are subject to the terms of the Liferay Enterprise
 * pSubscription 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="/html/portlet/admin/init.jsp" %>

<liferay-ui:error key="shutdownMinutes" message="please-enter-the-number-of-minutes" />

<aui:button-row>

	<%
	String taglibShutdown = renderResponse.getNamespace() + "saveServer('shutdown');";
	%>

	<c:choose>
		<c:when test="<%= ShutdownUtil.isInProcess() %>">
			<aui:button onClick="<%= taglibShutdown %>" value="cancel-shutdown" />
		</c:when>
		<c:otherwise>
			<aui:fieldset>
				<aui:input label="number-of-minutes" name="minutes" size="3" type="text">
					<aui:validator name="digits" />
					<aui:validator name="min">1</aui:validator>
					<aui:validator name="required" />
				</aui:input>

				<aui:input cssClass="lfr-textarea-container" label="custom-message" name='<%= "message" + GetterUtil.getString(ShutdownUtil.getMessage()) %>' type="textarea" />
			</aui:fieldset>

			<aui:button onClick="<%= taglibShutdown %>" value="shutdown" />
		</c:otherwise>
	</c:choose>
</aui:button-row>