blob: 149c4951c308bfb57facc7f74475c3eaf0fa59cb [file] [log] [blame]
<!--
Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<!-- appServer/serverInstAdminPassword.jsf -->
<!initPage
setResourceBundle(key="i18nc" bundle="org.glassfish.common.admingui.Strings");
setResourceBundle(key="help_common" bundle="org.glassfish.common.admingui.Helplinks")
/>
<!composition template="/templates/default.layout" guiTitle="$resource{i18nc.domain.AdminPasswordTitle}" >
<!define name="content">
<event>
<!beforeCreate
setSessionAttribute(key="domainTabs" value="adminPassword");
setPageSessionAttribute(key="selfUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/admin-service/jmx-connector/system");
gf.getEntityAttrs(endpoint="#{pageSession.selfUrl}.json", valueMap="#{pageSession.valueMap}");
setPageSessionAttribute(key="authRealm" value="#{pageSession.valueMap['authRealmName']}");
getUserInfo(Realm="#{pageSession.authRealm}", configName="#{pageSession.configName}", User="#{sessionScope.userName}", GroupList="#{pageSession.group}" );
/>
</event>
<sun:form id="propertyForm" autoComplete="off">
#include "/common/appServer/domainTabs.inc"
#include "/common/shared/alertMsg.inc"
<!-- Page Title -->
<sun:title id="propertyContentPage" title="$resource{i18nc.domain.AdminPasswordTitle}" helpText="$resource{i18nc.domain.AdminPasswordTitleHelp}" >
<!facet pageButtonsTop>
<sun:panelGroup id="topButtons">
<sun:button id="saveButton" text="$resource{i18n.button.Save}"
onClick=" if ( checkPSW() ){ return submitAndDisable(this, '$resource{i18n.button.Processing}'); } return false; " >
<!command
prepareSuccessfulMsg();
saveUser( Realm="#{pageSession.authRealm}" configName="#{pageSession.configName}" UserId="#{sessionScope.userName}" GroupList="#{pageSession.group}" Password="#{pageSession.password}" CreateNew="false");
/>
</sun:button>
</sun:panelGroup>
</facet>
</sun:title>
<sun:propertySheet id="propertySheet">
<!-- Text Field section -->
<sun:propertySheetSection id="propertSectionTextField">
<sun:property id="userIdProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.domain.Userid}">
<sun:staticText id="UserId" text="#{sessionScope.userName}"/>
</sun:property>
<sun:property id="groupListProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.domain.GroupList}">
<sun:staticText id="GroupList" text="#{pageSession.group}"/>
</sun:property>
<sun:property id="newPasswordProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.domain.NewPassword}">
<sun:passwordField id="NewPassword" name="password" columns="$int{25}" maxLength="#{sessionScope.fieldLengths['maxLength.server.NewPassword']}" text="#{pageSession.password}" >
<!afterCreate
getClientId(component="$this{component}" clientId=>$page{ps1});
/>
</sun:passwordField>
</sun:property>
<sun:property id="confirmPasswordProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.domain.ConfirmNewPassword}">
<sun:passwordField id="ConfirmPassword" name="password" columns="$int{25}" maxLength="#{sessionScope.fieldLengths['maxLength.server.ConfirmNewPassword']}" text="#{pageSession.confirmPassword}" >
<!afterCreate
getClientId(component="$this{component}" clientId=>$page{ps2});
/>
</sun:passwordField>
</sun:property>
</sun:propertySheetSection>
</sun:propertySheet>
<sun:hidden id="helpKey" value="$resource{help_common.serverInstAdminPassword}" />
<sun:hidden id="secureAdminEnabled" value="#{sessionScope.secureAdminEnabled}" />
</sun:form>
<f:verbatim>
<script type="text/javascript">
function checkPSW() {
return checkPSWInCommon(#{secureAdminEnabled},'#{ps1}','#{ps2}','$resource{i18nc.msg.JS.security.adminsWithEmptyPW}','$resource{i18n.msg.JS.manageUser.passwordNotMatch}','$resource{i18n.msg.JS.manageUser.setEmptyAdminPassword}')
}
</script>
</f:verbatim>
</define>
</composition>