redirectToXui.tag revision 4c2ed873ce0d69780e28220e175a838a6829d4ea
4632N/A<%@ tag import="com.sun.identity.console.XuiRedirectHelper" %>
4632N/A<%--
4632N/A ~ The contents of this file are subject to the terms of the Common Development and
4632N/A ~ Distribution License (the License). You may not use this file except in compliance with the
4632N/A ~ License.
4632N/A ~
4632N/A ~ You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
4632N/A ~ specific language governing permission and limitations under the License.
4632N/A ~
4632N/A ~ When distributing Covered Software, include this CDDL Header Notice in each file and include
4632N/A ~ the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
4632N/A ~ Header, with the fields enclosed by brackets [] replaced by your own identifying
4632N/A ~ information: "Portions copyright [year] [name of copyright owner]".
4632N/A ~
4632N/A ~ Copyright 2015 ForgeRock AS.
4632N/A --%>
4632N/A<%@ tag pageEncoding="UTF-8" %>
4632N/A<%@ tag description="Replaces the current window location with the XUI page for the realm, or Home if XUI is disabled" %>
4632N/A<%@ attribute name="xuiPath" type="java.lang.String" required="true" description="The path to the XUI page to redirect to" %>
4632N/A<%@ attribute name="realm" type="java.lang.String" required="true" description="The realm to go back to, or empty string" %>
4632N/A
4632N/A<script language="javascript">
4632N/A
4632N/A function redirectToXui() {
4632N/A var realm = ${realm};
4632N/A var template = <%= XuiRedirectHelper.isXuiAdminConsoleEnabled() ? "'" + xuiPath + "'" : "'../task/Home'" %>;
4632N/A document.location.replace(template.replace("{realm}", realm));
}
</script>