ServerEditCTS.jsp revision c9017e00251ffc95555d06319dd89fe1df9a2724
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott The contents of this file are subject to the terms of the Common Development and
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott Distribution License (the License). You may not use this file except in compliance with the
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott specific language governing permission and limitations under the License.
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott When distributing Covered Software, include this CDDL Header Notice in each file and include
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott Header, with the fields enclosed by brackets [] replaced by your own identifying
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott information: "Portions copyright [year] [name of copyright owner]".
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott Copyright 2013 ForgeRock AS.
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott<%@ page info="ServerEditCTS" language="java" %>
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott<%@taglib uri="/WEB-INF/jato.tld" prefix="jato" %>
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott<%@taglib uri="/WEB-INF/cc.tld" prefix="cc" %>
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott<jato:useViewBean className="com.sun.identity.console.service.ServerEditCTSViewBean" fireChildDisplayEvents="true" >
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott <cc:i18nbundle baseName="amConsole" id="amConsole" locale="<%=((com.sun.identity.console.base.AMViewBeanBase)viewBean).getUserLocale()%>"/>
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott <cc:header name="hdrCommon" pageTitle="webconsole.title" bundleID="amConsole" copyrightYear="2007" fireDisplayEvents="true">
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott <script language="javascript">
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott // Field names.
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott var storeLocationRadioButtonName = 'ServerEditCTS.cscorg-forgerock-services-cts-store-location';
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott var sslEnableCheckBoxName = 'ServerEditCTS.cscorg-forgerock-services-cts-store-ssl-enabled';
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott var directoryNameFieldName = 'ServerEditCTS.cscorg-forgerock-services-cts-store-directory-name';
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott var portFieldName = 'ServerEditCTS.cscorg-forgerock-services-cts-store-port';
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott var loginIdFieldName = 'ServerEditCTS.cscorg-forgerock-services-cts-store-loginid';
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott var passwordFieldName = 'ServerEditCTS.cscorg-forgerock-services-cts-store-password';
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott var maxConnectionsFieldName = 'ServerEditCTS.cscorg-forgerock-services-cts-store-max-connections';
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott // Set the initial state of the fields.
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott var radioBtns = document.getElementsByName(storeLocationRadioButtonName);
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott // Do nothing, there must be two radio buttons.
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott toggleExternalConfig((radioBtns[0].checked) ? radioBtns[0] : radioBtns[1]);
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott // Retrieves the first element of the given name.
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott function getFirstElementByName(name) {
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott var elements = document.getElementsByName(name);
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott return (elements.length > 0) ? elements[0] : null;
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott // Toggles the status of the external configuration fields.
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott function toggleExternalConfig(storeLocationRadioButton) {
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott var disabled = storeLocationRadioButton.value == 'default';
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott toggleField(sslEnableCheckBoxName, disabled);
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott toggleField(directoryNameFieldName, disabled);
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott toggleField(portFieldName, disabled);
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott toggleField(loginIdFieldName, disabled);
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott toggleField(passwordFieldName, disabled);
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott toggleField(maxConnectionsFieldName, disabled);
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott // Toggles the status of a given field.
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott function toggleField(fieldName, disabled) {
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott var field = getFirstElementByName(fieldName);
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott if (field != null) {
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott field.className = (disabled) ? 'TxtFldDis' : 'TxtFld';
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott <cc:form name="ServerEditCTS" method="post" defaultCommandChild="/button1">
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott <script language="javascript">
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott function confirmLogout() {
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott return confirm("<cc:text name="txtLogout" defaultValue="masthead.logoutMessage" bundleID="amConsole"/>");
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott <cc:primarymasthead name="mhCommon" bundleID="amConsole" logoutOnClick="return confirmLogout();" locale="<%=((com.sun.identity.console.base.AMViewBeanBase)viewBean).getUserLocale()%>"/>
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott <cc:breadcrumbs name="breadCrumb" bundleID="amConsole" />
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott <cc:tabs name="tabCommon" bundleID="amConsole" />
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott <table border="0" cellpadding="10" cellspacing="0" width="100%">
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott <cc:alertinline name="ialertCommon" bundleID="amConsole" />
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott <%-- PAGE CONTENT --------------------------------------------------------- --%>
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott <cc:pagetitle name="pgtitleThreeBtns" bundleID="amConsole" pageTitleText="page.title.server.edit" showPageTitleSeparator="true" viewMenuLabel="" pageTitleHelpMessage="" showPageButtonsTop="true" showPageButtonsBottom="false" />
c9017e00251ffc95555d06319dd89fe1df9a2724Robert Wapshott <table border="0" cellpadding="10" cellspacing="0" width="100%">
c9017e00251ffc95555d06319dd89fe1df9a2724Robert Wapshott <cc:button name="btnInherit" bundleID="amConsole" defaultValue="serverconfig.button.inherit" type="primary" />
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott <cc:propertysheet name="propertyAttributes" bundleID="amConsole" showJumpLinks="true"/>
e87637336bc6799910991bebc7cda8d7966eb4d5Robert Wapshott</jato:useViewBean>