UserProfileForm.jsp

 

<%@ page session="false" buffer="none" %><%-- Licensed Materials - Property of IBM, 5724-E76, (C) Copyright IBM Corp. 2001, 2004 - All Rights reserved. --%><%@ taglib uri="/WEB-INF/tld/portal.tld" prefix="wps" %><%@ include file="BidiInclude.jsp" %><wps:defineObjects/><wps:constants /><jsp:useBean id="userWrapper" class="com.ibm.wps.puma.UserWrapper" scope="request"/><jsp:useBean id="errorBean" class="com.ibm.portal.puma.UserState" scope="request"/><jsp:useBean id="reqAttributes" class="java.util.Vector" scope="request" /><%@ page import="com.ibm.portal.admin.LanguageList" %><%@ page import="com.ibm.portal.admin.Language" %><%@ page import="com.ibm.wps.portlets.admin.localizedsetting.utils.LocaleSettingUtil" %><%@ page import="java.util.*" %><%@ page import="java.io.*" %><script language="JavaScript">function doSubmit(action)
{
document.UserProfileForm.currentAction.value=action;
document.UserProfileForm.submit();
return false;
}
</script><%
String titleKey="ok";
String titleIcon=wpsBaseURL + "/images/admin/header_ok.gif";
if (userWrapper.isSelfcare())
{
titleKey="continue";
titleIcon=wpsBaseURL + "/images/admin/header_next" + bidiImageRTL + ".gif";
}
Properties pumaProperties=new Properties();
InputStream is=getClass ().getResourceAsStream ("/config/puma.properties");
pumaProperties.load(is);
String dt=com.ibm.wps.puma.UserManager.instance().getDirectoryType();
if (dt==null)
{
dt="";
}
boolean isReadOnly=(dt.equals("SSPM"));
%><%-- extra table needed to replace table removed from home.jsp on Netscape 4.x --%><table cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td><form name='UserProfileForm' method="post"
<% if (userWrapper.isSelfcare() && userWrapper.isAddAction()) { %>action='<wps:url command="ConfirmEnrollment" reqid="no"/>'
<% } else if (userWrapper.isSelfcare() && !userWrapper.isAddAction()) { %>action='<wps:url command="FinishSelfcare" reqid="no"/>'
<%} else {%>action=<%=request.getAttribute("save_uri")%><%}%> ><%-- start admin header --%><table cellspacing="0" cellpadding="4" border="0" width="100%"><tr class="wpsTableAdminHead"><td class="wpsTableAdminHead" align="<%= bidiAlignLeft %>" nowrap>&nbsp;<%=userWrapper.getPageTitle()%></td><%--
<% if (!userWrapper.isSelfcare()) { %><td class="wpsTableAdminHead" align="right" nowrap><a href="<%=wpsDocURL%>/InfoCenter/help/manage_users.html" class="wpsLabelText" style="text-decoration: none;" target="PortalServerHelpWindow" title='<wps:text bundle="nls.button" key="help" />' alt='<wps:text bundle="nls.button" key="help" />' onClick="javascript: window.open('<%=wpsDocURL%>/InfoCenter/help/manage_users.html','PortalServerHelpWindow','resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,width=450,height=260,screenX=200,screenY=200,top=200,left=200').focus();"><img border="0" align="absmiddle" src='<%=wpsBaseURL%>/images/admin/header_help.gif' title='<wps:text bundle="nls.button" key="help" />' alt='<wps:text bundle="nls.button" key="help" />' /></a></td><% } %>--%></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%"><tr><td><table border="0" cellspacing="0" width="100%"><tr><td class="wpsInlineHelpText" ><img src="<%=wpsBaseURL%>/images/admin/msg_inline_help.gif" border="0"/>&nbsp;
<% if (userWrapper.isSelfcare() && userWrapper.isAddAction())
{ %><wps:text key="enrollment.privacy" bundle="nls.registration"><wps:textParam><A href='<wps:urlFind file="privacy.html" />' target="_new" ><wps:text key="enrollment.privacy.link" bundle="nls.registration"></wps:text></A></wps:textParam></wps:text><% } else if (userWrapper.isSelfcare() && ! userWrapper.isAddAction())
{
if (!isReadOnly) { %><wps:text key="selfcare.enter.PersonalData" bundle="nls.registration" /><% } else { %><wps:text key="selfcare.enter.subhead" bundle="nls.registration" /><% }
}
%>&nbsp;&nbsp;</td></tr><tr><td class="wpsEditText"><span class="wpsFieldErrorText"><wps:text key='<%= errorBean.getState("ReturnedErrorMessage") %>' bundle="nls.registration" /></span><table border="0" ><tr><% if (userWrapper.isAddAction()) { %><td align="<%= bidiAlignRight %>"><%= reqAttributes.contains("UID")?"*":"&nbsp;&nbsp;" %></td><td align="<%= bidiAlignLeft %>" class="wpsEditText" ><label for="wps.uid"><wps:text key="userid" bundle="nls.field" /></label></td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td><input dir="ltr" class="wpsEditField" type="text" id="wps.uid" name="wps.uid" value='<% escapeXmlWriter.write((String)userWrapper.getAttributeNotNull("uid")); %>' ></td><td class="wpsFieldErrorText"><wps:text key='<%= errorBean.getState("uid") %>' bundle="nls.registration"><wps:textParam><%= pumaProperties.get("puma.UID.min") %></wps:textParam><wps:textParam><%= pumaProperties.get("puma.UID.max") %></wps:textParam></wps:text></td><% } else if (!userWrapper.isAddAction()) { %><td>&nbsp;</td><td align="<%= bidiAlignLeft %>"><wps:text key="userid" bundle="nls.field" />&nbsp;&nbsp;
<% escapeXmlWriter.write((String)userWrapper.getAttributeNotNull("uid")); %></td><td>&nbsp;</td><% } %></tr><%
if (!isReadOnly)
{
%><tr><td align="<%= bidiAlignRight %>"><%= (reqAttributes.contains("PASSWORD") && userWrapper.isAddAction())?"*":"&nbsp;&nbsp;" %></td><td align="<%= bidiAlignLeft %>" class="wpsEditText"><label for="wps.userPassword"><wps:text key="password" bundle="nls.field" /></label></td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td><input dir="ltr" class="wpsEditField" type="password" id="wps.userPassword" name="wps.userPassword" value="" ></td><td class="wpsFieldErrorText"><wps:text key='<%= errorBean.getState("userPassword") %>' bundle="nls.registration" ><wps:textParam><%= pumaProperties.get("puma.PASSWORD.min") %></wps:textParam><wps:textParam><%= pumaProperties.get("puma.PASSWORD.max") %></wps:textParam></wps:text></td></tr><tr><td align="<%= bidiAlignRight %>"><%= (reqAttributes.contains("PASSWORD") && userWrapper.isAddAction())?"*":"&nbsp;&nbsp;" %></td><td align="<%= bidiAlignLeft %>" class="wpsEditText"><label for="confirmPassword"><wps:text key="password.confirm" bundle="nls.field" /></label></td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td><input dir="ltr" class="wpsEditField" type="password" id="confirmPassword" name="confirmPassword" value="" ></td></tr><%
} else {
%><input type="hidden" dir="ltr" id="wps.userPassword" name="wps.userPassword" value="" ><%
}
%><wps:if notLocale="ja,ko,zh,zh_TW"><%
if (!isReadOnly)
{
%><tr><td align="<%= bidiAlignRight %>"><%= reqAttributes.contains("GIVENNAME")?"*":"&nbsp;&nbsp;" %></td><td align="<%= bidiAlignLeft %>" class="wpsEditText"><label for="wps.givenName"><wps:text key="person.givenname" bundle="nls.field"/></label></td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td><input class="wpsEditField" type="text" id="wps.givenName" name="wps.givenName" value='<% escapeXmlWriter.write((String)userWrapper.getAttributeNotNull("givenName")); %>' ></td><td class="wpsFieldErrorText"><wps:text key='<%= errorBean.getState("givenName") %>' bundle="nls.registration"><wps:textParam><%= pumaProperties.get("puma.GIVEN_NAME.min") %></wps:textParam><wps:textParam><%= pumaProperties.get("puma.GIVEN_NAME.max") %></wps:textParam></wps:text></td></tr><% } else { // display the names as read-only %><tr><td align="<%= bidiAlignLeft %>"><wps:text key="person.givenname" bundle="nls.field" />&nbsp;&nbsp;<%escapeXmlWriter.write((String)userWrapper.getAttributeNotNull("givenName")); %></td></tr><% } %></wps:if><%
if (!isReadOnly)
{
%><tr><td align="<%= bidiAlignRight %>"><%= reqAttributes.contains("SN")?"*":"&nbsp;&nbsp;" %></td><td align="<%= bidiAlignLeft %>" class="wpsEditText"><label for="wps.sn"><wps:text key="person.familyname" bundle="nls.field"/></label></td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td><input class="wpsEditField" type="text" id="wps.sn" name="wps.sn" value='<% escapeXmlWriter.write((String)userWrapper.getAttributeNotNull("sn")); %>' ></td><td class="wpsFieldErrorText"><wps:text key='<%= errorBean.getState("sn") %>' bundle="nls.registration"><wps:textParam><%= pumaProperties.get("puma.SN.min") %></wps:textParam><wps:textParam><%= pumaProperties.get("puma.SN.max") %></wps:textParam></wps:text></td></tr><% } else { %><tr><td align="<%= bidiAlignLeft %>"><wps:text key="person.familyname" bundle="nls.field" />&nbsp;&nbsp;<%escapeXmlWriter.write((String)userWrapper.getAttributeNotNull("sn")); %></td></tr><% } %><wps:if locale="ja,ko,zh,zh_TW"><%
if (!isReadOnly)
{
%><tr><td align="<%= bidiAlignRight %>"><%= reqAttributes.contains("GIVENNAME")?"*":"&nbsp;&nbsp;" %></td><td align="<%= bidiAlignLeft %>" class="wpsEditText"><label for="wps.givenName"><wps:text key="person.givenname" bundle="nls.field"/></label></td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td><input class="wpsEditField" type="text" id="wps.givenName" name="wps.givenName" value='<% escapeXmlWriter.write((String)userWrapper.getAttributeNotNull("givenName")); %>' ></td><td class="wpsFieldErrorText"><wps:text key='<%= errorBean.getState("givenName") %>' bundle="nls.registration" ><wps:textParam><%= pumaProperties.get("puma.GIVEN_NAME.min") %></wps:textParam><wps:textParam><%= pumaProperties.get("puma.GIVEN_NAME.max") %></wps:textParam></wps:text></td></tr><% } else { %><tr><td align="<%= bidiAlignLeft %>"><wps:text key="person.givenname" bundle="nls.field" />&nbsp;&nbsp;<%escapeXmlWriter.write((String)userWrapper.getAttributeNotNull("givenName")); %></td></tr><% } %></wps:if><tr><td align="<%= bidiAlignRight %>"><%= reqAttributes.contains("MAIL")?"*":"&nbsp;&nbsp;" %></td><td align="<%= bidiAlignLeft %>" class="wpsEditText"><label for="wps.ibm-primaryEmail"><wps:text key="person.email" bundle="nls.field" /></label></td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td><input dir="ltr" class="wpsEditField" type="text" id="wps.ibm-primaryEmail" name="wps.ibm-primaryEmail" value='<% escapeXmlWriter.write((String)userWrapper.getAttributeNotNull("ibm-primaryEmail")); %>' ></td><td class="wpsFieldErrorText"><wps:text key='<%= errorBean.getStatus("ibm-primaryEmail") %>' bundle="nls.registration" ><wps:textParam><%= pumaProperties.get("puma.MAIL.min") %></wps:textParam><wps:textParam><%= pumaProperties.get("puma.MAIL.max") %></wps:textParam></wps:text></td></tr><%--Changes for ISC to disable these controls --%><% if (!(com.ibm.wps.services.product.Product.isISCEnabled())) {
%><tr><td align="<%= bidiAlignRight %>"><%= reqAttributes.contains("PREFERREDLANGUAGE")?"*":"&nbsp;&nbsp;" %></td><td align="<%= bidiAlignLeft %>" class="wpsEditText"><label for="wps.preferredLanguage"><wps:text key="preferredLanguage" bundle="nls.registration" /></label></td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td><select id="wps.preferredLanguage" name="wps.preferredLanguage"><% String language=userWrapper.getAttributeNotNull("preferredLanguage");%><option value="" <% if(language.equals("")) {%> selected <% } %> ><wps:text key="none" bundle="nls.registration" /><% LanguageList langList= userWrapper.getAllLanguagesSupportedByPortal(request);
Locale currentLocale=userWrapper.getCurrentLocale(request);
List aList=LocaleSettingUtil.getSortedLanguageList(langList,currentLocale);
Language aLang=null;
Locale locale=null;
if (aList != null)
{
Iterator it=aList.iterator();
boolean match=false;
for (int n=0; it.hasNext(); n++) {
aLang=(Language)it.next();
locale=aLang.getLocale();
%><option value="<%=locale%>" <% if(language.equals(locale.toString())) { match=true; %> selected <% } %> ><%= aLang.getTitle (currentLocale) %><%
}
if (!language.equals("") && (match == false)) {
%><option value="<%=language%>" selected> <%=language%><%
}
}
%></select></td><td>&nbsp;</td><td>&nbsp;</td></tr><!--
<tr><td align="<%= bidiAlignRight %>"><%= reqAttributes.contains("INTEREST")?"*":"&nbsp;&nbsp;" %></td><td align="<%= bidiAlignLeft %>" class="wpsEditText"><label for="wps.Interest"><wps:text key="interests" bundle="nls.registration" /></label></td></tr><tr><td>&nbsp;&nbsp</td><td><select id="wps.Interest" name="wps.Interest"><% String interest=userWrapper.getAttributeNotNull("Interest"); %><option value="" <% if(interest.equals("")) {%> selected <% } %> ><wps:text key="nothingSelected" bundle="nls.registration" /><option value="sport" <% if(interest.equals("sport")) {%> selected <% } %> ><wps:text key="sport" bundle="nls.registration" /><option value="music" <% if(interest.equals("music")) {%> selected <% } %> ><wps:text key="music" bundle="nls.registration" /><option value="politics" <% if(interest.equals("politics")) {%> selected <% } %> ><wps:text key="politics" bundle="nls.registration" /></select></td></tr>-->
<% } %><%-- End of ISC --%><% if (!isReadOnly) { %><tr><td class ="wpsEditSmText" colspan="3"><wps:text key="requiredfield" bundle="nls.registration" /></td></tr><% } else { %><tr><td class ="wpsEditSmText" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr><% } %></table></td></tr></table></td></tr></table><%-- start admin footer --%><table cellspacing="4" cellpadding="0" border="0"><tr><td><table bgcolor="#ccccc" class="wpsTaskIconBorderTable" border="1" cellpadding="3" cellspacing="0"><tr><td class="wpsTaskIconTextBackground" onClick="return doSubmit('submit');" style="cursor: pointer;" nowrap><a href="#" style="text-decoration:none;" alt="" ><span class="wpsTaskIconText"><wps:text bundle="nls.button" key="<%=titleKey%>" /></span></a></td></tr></table></td><td><table bgcolor="#ccccc" class="wpsTaskIconBorderTable" border="1" cellpadding="3" cellspacing="0"><tr><td class="wpsTaskIconTextBackground" nowrap><a style="text-decoration: none;"
<% if (userWrapper.isSelfcare() && userWrapper.isAddAction()) { %>href="<wps:url home='public' reqid='no'/>"
<% } else if (userWrapper.isSelfcare() && !userWrapper.isAddAction()) { %>href="<wps:url home='protected' reqid='no'/>"
<% } else { %>href="#" onclick="return doSubmit('cancel');"
<%} %>><span class="wpsTaskIconText"><wps:text bundle="nls.registration" key="button.cancel" /></span></a></td></tr></table></td></tr></table><%-- end admin footer --%><input type="hidden" name="currentAction" /><script language="JavaScript"><%
String dt1=com.ibm.wps.puma.UserManager.instance().getDirectoryType();
if (dt1==null) {
dt1="";
}
boolean isReadOnly1=(dt1.equals("SSPM"));
if (!isReadOnly1) {
%>function setFocus()
{
document.UserProfileForm.elements['<%= userWrapper.getFocusField() %>'].focus();
}
<%
} else {
%>function setFocus()
{
document.UserProfileForm.elements['wps.ibm-primaryEmail'].focus();
}
<%
}
%>setTimeout(setFocus, 300);
</script></form></td></tr></table>