123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2013
- 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">
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
-
- <!--
- ================================================================================
- get_content - need to the get connectionString to know if we're dealing with
- a powerCube
- ================================================================================
- -->
- <xts:block id="get_content" processor="XSLT" type="exec" mode="interpret" dependency="formlogic_init" condition=".[/root/env/param[@name='m_path']!='']" mandatory="false">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
-
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <connection>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search><xsl:value-of select="/root/env/param[@name='m_path']"/></cm:search>
- <cm:properties>
- <cm:property name="connectionString"/>
- </cm:properties>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </connection>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ================================================================================
- render_page
-
- Render the HTML page
- ===============================================================================================
- -->
- <xts:block id="render_page" dependency="get_content formlogic_init" mode="output" processor="XSLT" type="exec" mimeType="text/html">
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- Get the new theme framework. -->
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/connections.xslt"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/confirm.xslt"/>
- <!-- apply the form logic -->
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <!-- Prevent the href from appearing in the status bar. -->
- <xts:logicsheet path="logicsheets/validation.xslt"/>
- <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:dcx="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/connections/1/"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- 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:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:x="x"
- exclude-result-prefixes="xsl lyt dp dc pf df cp cf cm utml xtsext x">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'new_signon.xts'"/>
- <xsl:variable name="m_class" select="/root/env/param[@name = 'm_new_class']"/>
- <xsl:variable name="isPowerCube" select="contains(/root/connection/cm:queryResponse/cm:dataSourceConnection/cm:connectionString,';LOCAL;PC;')"/>
- <!-- add any theme variables -->
- <pf:variables/>
- <!-- start the output -->
- <xsl:template match="root">
- <xsl:variable name="wizardTitle">
- <xts:string id="IDS_NEW_DATA_SOURCE_SIGNON_TITLE"/>
- </xsl:variable>
- <xsl:variable name="browserTitle">
- <xts:string id="IDS_NEW_TITLE_SIGNON"><xts:param name="wizardTitle"><xsl:value-of select="$wizardTitle"/></xts:param></xts:string>
- </xsl:variable>
- <!-- Page and title -->
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
- <dp:meta>
- <!-- Standard meta tags -->
- <pf:meta/>
- </dp:meta>
- <dp:script>
- <!-- Help system -->
- <pf:help context="HID_DATA_SOURCES"/>
- <script language="JavaScript">
- <dcx:checkReservedChar/>
- var m1 = "<xts:string id="IDS_USERID" encode="javascript"/>";
- var m2 = "<xts:string id="IDS_ERR_0003_PASSWORD_VERIF_FAILED" encode="javascript"/>";
- 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(m2);
- 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, m1))
- {
- return false;
- }
-
- if (f.m_signon_password.value != f.m_signon_confirm_password.value)
- {
- alert(m2);
- 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 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;
- }
- function init()
- {
- if (document.pform.m_signon_userid)
- document.pform.m_signon_userid.focus();
- }
- </script>
- <script language="JavaScript" src="{$webcontent}/{$app}/js/utilities.js"/>
- </dp:script>
- <utml:form name="pform" action="{$gateway}" method="post">
- <!-- Dialog header -->
- <dp:header>
- <dp:title><xsl:value-of select="$browserTitle"/></dp:title>
- <dp:description>
- <xsl:choose>
- <xsl:when test="$isPowerCube">
- <xsl:text/><xts:string id="IDS_NEW_INTRO_SIGNON_POWERCUBE"/><xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text/><xts:string id="IDS_NEW_INTRO_SIGNON"/><xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:description>
- </dp:header>
- <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" name="m_cube_password" size="53" utml:update="false" value="" id="ctrl_m_cube_password"/>
- </dp:section2>
- </dp:input>
- <dp:input>
- <dp:section1>
- <label for="ctrl_m_cube_confirm_password"><xts:string id="IDS_SELECT_CONNECT_CONFIRMPASSWORD"/></label>
- </dp:section1>
- <dp:section2>
- <utml:input type="password" name="m_cube_confirm_password" size="53" utml:update="false" value="" id="ctrl_m_cube_confirm_password"/>
- </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" name="m_signon_userid" size="53" 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" name="m_signon_password" size="53" utml:update="false" value="" id="ctrl_m_signon_password"/>
- </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" name="m_signon_confirm_password" size="53" utml:update="false" value="" id="ctrl_m_signon_confirm_password"/>
- </dp:section2>
- </dp:input>
- </xsl:otherwise>
- </xsl:choose>
- </lyt:section>
- </lyt:layout>
- <dp:footer>
- <df:button df:id="IDS_CANCEL" df:style="back-url" onclick="{$dc-confirm-cancel}"/>
- <df:button df:id="IDS_BACK" df:style="maintain">
- <df:target><xsl:value-of select="concat($app,'/new_general.xts')"/></df:target>
- </df:button>
- <df:button df:id="IDS_NEXT" df:style="maintain" utml:validate="true">
- <df:target><xsl:value-of select="concat($app,'/new_signon2.xts')"/></df:target>
- </df:button>
- <df:button df:id="IDS_FINISH"/>
- </dp:footer>
- </utml:form>
- </dp:page>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- debug
-
- ================================================================================
- -->
- <xts:block id="debug" type="exec" mode="output" processor="XSLT" condition=".[/root/session/param[@name = 'debug'] = '1']" mandatory="false" mimeType="text/html" dependency="render_page">
- <!-- 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>
|