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