META-INF.resources.edit_password_policy.jsp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.password.policies.admin.web
Show all versions of com.liferay.password.policies.admin.web
Liferay Password Policies Admin Web
The newest version!
<%--
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
--%>
<%@ include file="/init.jsp" %>
<%
long passwordPolicyId = ParamUtil.getLong(request, "passwordPolicyId");
PasswordPolicy passwordPolicy = PasswordPolicyLocalServiceUtil.fetchPasswordPolicy(passwordPolicyId);
if (passwordPolicy == null) {
passwordPolicy = new PasswordPolicyImpl();
passwordPolicy.setNew(true);
}
boolean defaultPolicy = BeanParamUtil.getBoolean(passwordPolicy, request, "defaultPolicy");
PasswordPoliciesConfiguration passwordPoliciesConfiguration = (PasswordPoliciesConfiguration)request.getAttribute(PasswordPoliciesConfiguration.class.getName());
portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(String.valueOf(renderResponse.createRenderURL()));
renderResponse.setTitle(passwordPolicy.isNew() ? LanguageUtil.get(request, "new-password-policy") : passwordPolicy.getName());
%>
<%
for (long duration : _sort(passwordPoliciesConfiguration.resetTicketMaxAgeDurations())) {
%>
<%
}
%>
Liferay.Util.toggleBoxes(
' changeable',
' changeableSettings'
);
Liferay.Util.toggleBoxes(
' checkSyntax',
' syntaxSettings'
);
Liferay.Util.toggleBoxes(
' expireable',
' expirationSettings'
);
Liferay.Util.toggleBoxes(
' history',
' historySettings'
);
Liferay.Util.toggleBoxes(
' lockout',
' lockoutSettings'
);
<%
if (passwordPolicy != null) {
PortalUtil.addPortletBreadcrumbEntry(request, passwordPolicy.getName(), null);
PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(request, "edit"), currentURL);
}
else {
PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(request, "add-user"), currentURL);
}
%>
<%!
private static long[] _sort(long[] array) {
Arrays.sort(array);
return array;
}
%>
<%@ include file="/action/delete_password_policy.jspf" %>