<%--
/**
 * 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);

renderResponse.setTitle(LanguageUtil.get(request, "add-category"));
%>

<portlet:actionURL name="/server_admin/edit_server" var="addLogCategoryURL" />

<liferay-frontend:edit-form
	action="<%= addLogCategoryURL %>"
	method="post"
	name="fm"
>
	<liferay-frontend:edit-form-body>
		<aui:input name="<%= Constants.CMD %>" type="hidden" value="addLogLevel" />
		<aui:input name="redirect" type="hidden" value="<%= String.valueOf(redirect) %>" />

		<aui:input cssClass="lfr-input-text-container" label="logger-name" name="loggerName" type="text" />

		<aui:select label="log-level" name="priority">

			<%
			for (int i = 0; i < _ALL_PRIORITIES.length; i++) {
			%>

				<aui:option label="<%= _ALL_PRIORITIES[i] %>" selected="<%= Objects.equals(String.valueOf(Level.INFO), _ALL_PRIORITIES[i]) %>" />

			<%
			}
			%>

		</aui:select>
	</liferay-frontend:edit-form-body>

	<liferay-frontend:edit-form-footer>
		<liferay-frontend:edit-form-buttons
			redirect="<%= redirect %>"
		/>
	</liferay-frontend:edit-form-footer>
</liferay-frontend:edit-form>