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

<div class="sheet">
	<div class="panel-group panel-group-flush">
		<aui:fieldset collapsed="<%= false %>" collapsible="<%= true %>" label="enabling-imagemagick-provides-document-preview-functionality">
			<aui:input label="enabled" name="imageMagickEnabled" type="checkbox" value="<%= ImageMagickUtil.isEnabled() %>" />

			<aui:input cssClass="lfr-input-text-container" label="path" name="imageMagickPath" type="text" value="<%= ImageMagickUtil.getGlobalSearchPath() %>" />
		</aui:fieldset>

		<aui:fieldset collapsed="<%= false %>" collapsible="<%= true %>" label="resource-limits">

			<%
			Properties resourceLimitsProperties = ImageMagickUtil.getResourceLimitsProperties();

			for (String label : ImageMagickResourceLimitConstants.PROPERTY_NAMES) {
			%>

				<aui:input cssClass="lfr-input-text-container" label="<%= label %>" name="<%= PropsKeys.IMAGEMAGICK_RESOURCE_LIMIT + label %>" type="text" value="<%= resourceLimitsProperties.getProperty(label) %>" />

			<%
			}
			%>

		</aui:fieldset>

		<aui:button-row>
			<aui:button cssClass="save-server-button" data-cmd="updateExternalServices" primary="<%= true %>" value="save" />
		</aui:button-row>
	</div>
</div>