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

<clay:sheet-header>
	<h2 class="sheet-title"><liferay-ui:message key="settings" /></h2>
</clay:sheet-header>

<clay:sheet-section>
	<h3 class="sheet-subtitle"><liferay-ui:message key="enable-publications" /></h3>

	<div class="sheet-text"><liferay-ui:message key="publications-help" /></div>

	<liferay-ui:error key="stagingEnabled" message="staging-is-enabled-for-at-least-one-site-or-asset-library-in-the-current-virtual-instance" />

	<div class="form-group">
		<aui:input inlineLabel="right" label="" labelCssClass="simple-toggle-switch" name="enablePublications" type="toggle-switch" value="<%= publicationsConfigurationDisplayContext.isPublicationsEnabled() %>" />
	</div>
</clay:sheet-section>

<div id="<portlet:namespace />sandboxOnly">
	<clay:sheet-section>
		<h3 class="sheet-subtitle"><liferay-ui:message key="sandbox-only" /></h3>

		<div class="sheet-text"><liferay-ui:message key="sandbox-only-help" /></div>

		<div class="form-group">
			<aui:input inlineLabel="right" label="" labelCssClass="simple-toggle-switch" name="enableSandboxOnly" type="toggle-switch" value="<%= publicationsConfigurationDisplayContext.isSandboxOnlyEnabled() %>" />
		</div>
	</clay:sheet-section>
</div>

<div id="<portlet:namespace />unapprovedChanges">
	<clay:sheet-section>
		<h3 class="sheet-subtitle"><liferay-ui:message key="allow-unapproved-changes" /></h3>

		<div class="sheet-text"><liferay-ui:message key="allow-unapproved-changes-help" /></div>

		<div class="form-group">
			<aui:input inlineLabel="right" label="" labelCssClass="simple-toggle-switch" name="enableUnapprovedChanges" type="toggle-switch" value="<%= publicationsConfigurationDisplayContext.isUnapprovedChangesAllowed() %>" />
		</div>
	</clay:sheet-section>
</div>

<clay:sheet-footer>
	<aui:button primary="<%= true %>" type="submit" value="save" />
</clay:sheet-footer>

<aui:script>
	Liferay.Util.toggleBoxes(
		'<portlet:namespace />enablePublications',
		'<portlet:namespace />sandboxOnly',
		<%= publicationsConfigurationDisplayContext.isPublicationsEnabled() ? false : null %>
	);

	Liferay.Util.toggleBoxes(
		'<portlet:namespace />enablePublications',
		'<portlet:namespace />unapprovedChanges',
		<%= publicationsConfigurationDisplayContext.isPublicationsEnabled() ? false: null %>
	);
</aui:script>