123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2011
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml" requiredCapability="canUseAdministrationPortal">
- <!--
- ================================================================================
- formlogic_init
-
- Initializes the UTML navigation stuff.
- ================================================================================
- -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
- <!--
- ================================================================================
- render_page
-
- Renders the HTML output.
- ================================================================================
- -->
-
-
- <xts:block id="render_page" type="exec" mode="output" mimeType="text/html" processor="XSLT" dependency="formlogic_init">
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- get the presentation theme -->
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/connections.xslt"/>
- <!-- apply the form logic -->
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <!-- Keeps the status line clean. -->
- <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:dcx="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/connections/1/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:x="x"
- exclude-result-prefixes="xsl pf df dc dp lyt cp cf x utml">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- Get the portal common variables. -->
- <pf:variables/>
- <xsl:variable name="mname" select="'set_signons.xts'"/>
- <xsl:variable name="back-url"/>
- <xsl:template match="/">
- <xsl:variable name="object-name" select="key('env-param','m_name')"/>
- <xsl:variable name="isPowerCube" select="contains(key('env-param','connectionString'),';LOCAL;PC;')"/>
- <xsl:variable name="title" select="key('env-param','credential_title')"/>
- <xsl:variable name="browser-title">
- <xsl:choose>
- <xsl:when test="$title != ''">
- <xsl:value-of select="$title"/>
- </xsl:when>
- <xsl:when test="$object-name != ''">
- <xts:string id="IDS_PROP_SIGNON_CREDENTIALS_TITLE">
- <xts:param name="objectName">
- <xsl:value-of select="$object-name"/>
- </xts:param>
- </xts:string>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_PROP_SIGNON_CREDENTIALS_TITLE_NO_OBJECT"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- Start the HTML -->
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page longTitle="$browser-title">
- <dp:meta>
- <!-- Standard meta tags -->
- <pf:meta/>
- </dp:meta>
- <dp:script>
- <!-- Help system -->
- <pf:help context="HID_DATA_SOURCES_SIGNON"/>
- <script language="JavaScript" src="{$webcontent}/{$app}/js/utilities.js"/>
- <script language="JavaScript">
- <dcx:checkReservedChar/>
- function checkMandatory(obj, label)
- {
- obj.value = trim(obj.value);
- if (obj.value == '')
- {
- <xsl:variable name="errmsg">
- <xts:string id="IDS_ERR_MANDATORY" encode="javascript">
- <xts:param name="field">" + label + "</xts:param>
- </xts:string>
- </xsl:variable>
- window.alert("<xsl:value-of select="normalize-space($errmsg)"/>");
- obj.focus();
- return false;
- }
- return true;
- }
- var isFocusOnBox='false';
- function init()
- {
- <xsl:choose>
- <xsl:when test="$isPowerCube">document.pform.m_cube_password.focus();</xsl:when>
- <xsl:otherwise>document.pform.m_signon_password.focus();</xsl:otherwise>
- </xsl:choose>
- setFocus('true');
- }
- function validate()
- {
- var f = document.pform;
-
- <xsl:choose>
- <xsl:when test="$isPowerCube">
- if (f.m_cube_password.value != f.m_cube_confirm_password.value)
- {
- alert("<xts:string id="IDS_ERR_0003_PASSWORD_VERIF_FAILED" encode="javascript"/>");
- document.pform.m_cube_password.focus();
-
- return false;
- }
-
- if (!checkReservedChar(f.m_cube_password, '<xts:string id="IDS_PASSWORD" encode="javascript"/>'))
- {
- return false;
- }
- </xsl:when>
- <xsl:otherwise>
- if (!checkMandatory(f.m_signon_userid, "<xts:string id="IDS_USERID" encode="javascript"/>"))
- {
- return false;
- }
-
- if (f.m_signon_password.value != f.m_signon_confirm_password.value)
- {
- alert("<xts:string id="IDS_ERR_0003_PASSWORD_VERIF_FAILED" encode="javascript"/>");
- document.pform.m_signon_password.focus();
-
- return false;
- }
-
- if (!checkReservedChar(f.m_signon_userid, '<xts:string id="IDS_USERID" encode="javascript"/>'))
- {
- return false;
- }
-
- if (!checkReservedChar(f.m_signon_password, '<xts:string id="IDS_PASSWORD" encode="javascript"/>'))
- {
- return false;
- }
- </xsl:otherwise>
- </xsl:choose>
- return true;
- }
- function setFocus(bFocus)
- {
- isFocusOnBox=bFocus;
- }
-
- function handleKeyDown()
- {
- <xsl:if test="$browser='ie' ">
- keyPressed = event.keyCode;
- if (keyPressed == 13)
- {
- if (window.event.returnValue != false)
- {
- window.event.returnValue = false;
- return false;
- }
- if (window.event.returnValue == false)
- {
- window.event.cancelBubble = true;
- return false;
- }
- window.event.returnValue = false;
- return false;
- }
- </xsl:if>
- }
- </script>
- </dp:script>
- <utml:form name="pform" method="post" action="{$gateway}">
- <dp:header>
- <dp:title>
- <xsl:value-of select="$browser-title"/>
- </dp:title>
- <dp:description>
- <xsl:choose>
- <xsl:when test="$isPowerCube">
- <xts:string id="IDS_PROP_SIGNON_CREDENTIALS_POWERCUBE_INTRO"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_PROP_SIGNON_CREDENTIALS_INTRO"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:description>
- </dp:header>
- <utml:input type="hidden" name="m_signon_pwd_changed" utml:update="false" value="0"/>
- <utml:input type="hidden" name="m_signon_cube_pwd_changed" utml:update="false" value="0"/>
- <lyt:layout style="1" border="no">
- <lyt:section>
- <xsl:choose>
- <xsl:when test="$isPowerCube">
- <dp:input>
- <dp:section1>
- <label for="ctrl_m_cube_password"><xts:string id="IDS_PASSWORD"/></label>
- </dp:section1>
- <dp:section2>
- <utml:input type="password" size="53" name="m_cube_password" utml:update="false" onchange="document.pform.m_signon_cube_pwd_changed.value='1'" onfocus="this.select();setFocus('true')" onblur="setFocus('false')" onKeyDown="handleKeyDown()" id="ctrl_m_cube_password">
- <utml:value>
- <!-- There is no need to localize this, it's simply a dummy value used to
- make *** appear in the password field. -->
- <xsl:text>###PASSWORD###</xsl:text>
- </utml:value>
- </utml:input>
- <xsl:if test="$browser = 'moz' ">
- <script language="JavaScript">
- window.captureEvents(Event.KEYPRESS);
- function keyhandler(e)
- {
- var Key;
- Key = e.which;
- if (Key==13)
- {
- if (isFocusOnBox == 'true')
- return false;
- }
- }
- window.onkeypress = keyhandler;
- </script>
- </xsl:if>
- </dp:section2>
- </dp:input>
- <dp:input>
- <dp:section1>
- <label for="ctrl_m_cube_confirm_password"><xts:string id="IDS_CONFIRM_PASSWORD"/></label>
- </dp:section1>
- <dp:section2>
- <utml:input type="password" size="53" name="m_cube_confirm_password" utml:update="false" onfocus="this.select();" id="ctrl_m_cube_confirm_password">
- <utml:value>
- <!-- There is no need to localize this, it's simply a dummy value used to
- make *** appear in the password field. -->
- <xsl:text>###PASSWORD###</xsl:text>
- </utml:value>
- </utml:input>
- </dp:section2>
- </dp:input>
- </xsl:when>
- <xsl:otherwise>
- <dp:input>
- <dp:section1>
- <label for="ctrl_m_signon_userid"><xts:string id="IDS_USERID"/></label>
- </dp:section1>
- <dp:section2>
- <utml:input type="text" size="53" name="m_signon_userid" value="" utml:track="true" id="ctrl_m_signon_userid"/>
- </dp:section2>
- </dp:input>
- <dp:input>
- <dp:section1>
- <label for="ctrl_m_signon_password"><xts:string id="IDS_PASSWORD"/></label>
- </dp:section1>
- <dp:section2>
- <utml:input type="password" size="53" name="m_signon_password" utml:update="false" onchange="document.pform.m_signon_pwd_changed.value='1'" onfocus="this.select();setFocus('true')" onblur="setFocus('false')" onKeyDown="handleKeyDown()" id="ctrl_m_signon_password">
- <utml:value>
- <!-- There is no need to localize this, it's simply a dummy value used to
- make *** appear in the password field. -->
- <xsl:text>###PASSWORD###</xsl:text>
- </utml:value>
- </utml:input>
- <xsl:if test="$browser = 'moz' ">
- <script language="JavaScript">
- window.captureEvents(Event.KEYPRESS);
- function keyhandler(e)
- {
- var Key;
- Key = e.which;
- if (Key==13)
- {
- if (isFocusOnBox == 'true')
- return false;
- }
- }
- window.onkeypress = keyhandler;
- </script>
- </xsl:if>
- </dp:section2>
- </dp:input>
- <dp:input>
- <dp:section1>
- <label for="ctrl_m_signon_confirm_password"><xts:string id="IDS_CONFIRM_PASSWORD"/></label>
- </dp:section1>
- <dp:section2>
- <utml:input type="password" size="53" name="m_signon_confirm_password" utml:update="false" onfocus="this.select();" id="ctrl_m_signon_confirm_password">
- <utml:value>
- <!-- There is no need to localize this, it's simply a dummy value used to
- make *** appear in the password field. -->
- <xsl:text>###PASSWORD###</xsl:text>
- </utml:value>
- </utml:input>
- </dp:section2>
- </dp:input>
- </xsl:otherwise>
- </xsl:choose>
- </lyt:section>
- </lyt:layout>
- <dp:footer>
- <df:button df:id="IDS_OK" utml:validate="true" df:style="stack-down-save"/>
- <df:button df:id="IDS_CANCEL" df:style="stack-down"/>
- </dp:footer>
- </utml:form>
- </dp:page>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - display debug information
- ===============================================================================================
- -->
- <xts:block id="debug" dependency="render_page" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
- <!-- get the debug logic sheet -->
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|