new_connection.xts 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2011
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml" requiredCapability="canUseDataSourcesTool">
  13. <!--
  14. ===============================================================================================
  15. formlogic_init - standard form logic initialization
  16. ===============================================================================================
  17. -->
  18. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  19. <!--
  20. ================================================================================
  21. encrypt the password when we're called by transformer.
  22. ================================================================================
  23. -->
  24. <xts:block id="encrypt_password" path="/portal/encryptConnectionPasswords.xslt" dependency="formlogic_init" type="exec" mode="interpret" processor="XSLT" mandatory="false" condition=".[/root/env/param[@name='from_transf'] and /root/env/param[@name='from_transf']!='' and (/root/env/param[@name='m_cube_password' or @name='test_cube_password' or @name='m_connection_password' or @name='test_password'] != '')]"/>
  25. <!--
  26. ===============================================================================================
  27. renderPage - render the page
  28. ===============================================================================================
  29. -->
  30. <xts:block id="renderPage" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="formlogic_init encrypt_password">
  31. <!-- get the presentation theme -->
  32. <xts:logicsheet path="logicsheets/portal.xsl"/>
  33. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  34. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  35. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  36. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  37. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  38. <!-- apply the form logic -->
  39. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  40. <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  41. <xsl:stylesheet version="1.0"
  42. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  43. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  44. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  45. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  46. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  47. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  48. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  49. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  50. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  51. xmlns:ctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/controls/"
  52. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  53. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  54. exclude-result-prefixes="xsl cm cf cp pf df dp lyt ctrl cml utml xtsext">
  55. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  56. <!-- current file name -->
  57. <xsl:variable name="mname" select="'new_connection.xts'"/>
  58. <!-- add any theme variables -->
  59. <pf:variables/>
  60. <!-- start the output -->
  61. <xsl:template match="/root">
  62. <xsl:variable name="title">
  63. <xsl:choose>
  64. <xsl:when test="key('env-param','frmcmd') = 'success'">
  65. <xts:string id="IDS_WELCOME_DATASOURCE_TITLE_SUCCESS"/>
  66. </xsl:when>
  67. <xsl:otherwise>
  68. <xts:string id="IDS_WELCOME_DATASOURCE_TITLE"/>
  69. </xsl:otherwise>
  70. </xsl:choose>
  71. </xsl:variable>
  72. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$product_name">
  73. <dp:meta>
  74. <pf:meta/> <!-- Standard meta tags -->
  75. </dp:meta>
  76. <dp:script>
  77. <script language="javascript">
  78. function doCancel()
  79. {
  80. window.external.OnClose(1);
  81. }
  82. function doOK()
  83. {
  84. if( window.external.HasSetPassport )
  85. window.external.SetPassport("<xsl:value-of select="xtsext:javascriptencode(string(/root/cookies/cookie[@name='cam_passport']))"/>");
  86. window.external.OnClose(0);
  87. }
  88. </script>
  89. <!-- Help system -->
  90. <pf:help context="HID_DATA_SOURCES"/>
  91. </dp:script>
  92. <utml:form name="pform" method="post" action="{$gateway}">
  93. <!-- this is required to tell the pages after this that they should render themselves as "wizards" instead of stand-alone dialogs -->
  94. <utml:input type="hidden" name="is_wizard" value="" utml:update="false"/>
  95. <utml:input type="hidden" name="from_bmt" value="1" utml:update="false"/>
  96. <xsl:if test="key('env-param','from_transf') != ''">
  97. <utml:input type="hidden" name="from_transf" value="1" utml:update="false"/>
  98. <utml:input type="hidden" name="m_connection_type" value="powercube" utml:update="false"/>
  99. <utml:input type="hidden" name="m_connection_type_history" value="" utml:update="false"/>
  100. <!-- we don't need to add the other powercube parameters as they will be carried out -->
  101. </xsl:if>
  102. <!-- this is the handler of the form command, which happens to be this morphlet... -->
  103. <dp:header>
  104. <!-- header titles-->
  105. <dp:title><xsl:value-of select="$title"/></dp:title>
  106. <dp:close><a href="javascript:doCancel()"><dp:closeMarker/></a></dp:close>
  107. </dp:header>
  108. <xsl:choose>
  109. <xsl:when test="key('env-param','frmcmd') = 'success'">
  110. <!-- display success message -->
  111. <lyt:layout style="1">
  112. <lyt:section>
  113. <dp:list>
  114. <dp:section>
  115. <dp:text wrap="true">
  116. <xts:string id="IDS_FINISH_DATASOURCE_PARA1"><xts:param name="prodName"><xsl:value-of select="$product_name"/></xts:param></xts:string>
  117. </dp:text>
  118. </dp:section>
  119. </dp:list>
  120. <br/>
  121. </lyt:section>
  122. </lyt:layout>
  123. </xsl:when>
  124. <xsl:otherwise>
  125. <!-- display creation message -->
  126. <lyt:layout style="1">
  127. <lyt:section>
  128. <dp:list>
  129. <dp:section>
  130. <dp:text wrap="true">
  131. <xts:string id="IDS_WELCOME_DATASOURCE_PARA1"><xts:param name="prodName"><xsl:value-of select="$product_name"/></xts:param></xts:string>
  132. </dp:text>
  133. </dp:section>
  134. </dp:list>
  135. <br/>
  136. <dp:list>
  137. <dp:section>
  138. <dp:text wrap="true">
  139. <xts:string id="IDS_WELCOME_DATASOURCE_PARA2"/>
  140. </dp:text>
  141. </dp:section>
  142. </dp:list>
  143. <br/>
  144. <dp:list>
  145. <dp:section>
  146. <dp:text wrap="true">
  147. <xts:string id="IDS_WELCOME_DATASOURCE_PARA3"/>
  148. </dp:text>
  149. </dp:section>
  150. </dp:list>
  151. </lyt:section>
  152. </lyt:layout>
  153. <utml:input type="hidden" name="m_new_class" value="dataSource"/>
  154. <utml:input type="hidden" name="m_name" value=""/>
  155. <utml:input type="hidden" name="m_path" value="CAMID(':')"/>
  156. <utml:input type="hidden" name="m_return">
  157. <utml:value>
  158. <xsl:value-of select="concat($app,'/',$mname)"/>
  159. </utml:value>
  160. </utml:input>
  161. </xsl:otherwise>
  162. </xsl:choose>
  163. <dp:footer>
  164. <xsl:choose>
  165. <xsl:when test="key('env-param','frmcmd') = 'success'">
  166. <df:button df:id="IDS_CLOSE" df:style="href" df:href="javascript:doOK();"/>
  167. </xsl:when>
  168. <xsl:otherwise>
  169. <df:button df:id="IDS_CANCEL" df:style="href" df:href="javascript:doCancel();"/>
  170. <df:button df:id="IDS_BACK"/>
  171. <df:button df:id="IDS_NEXT" df:style="stack-up">
  172. <df:target>
  173. <xsl:value-of select="concat($app, '/new_general.xts')"/>
  174. </df:target>
  175. </df:button>
  176. <df:button df:id="IDS_FINISH"/>
  177. </xsl:otherwise>
  178. </xsl:choose>
  179. </dp:footer>
  180. </utml:form>
  181. </dp:page>
  182. </xsl:template>
  183. </xsl:stylesheet>
  184. </xts:block>
  185. <!--
  186. ===============================================================================================
  187. debug - display debug information
  188. ===============================================================================================
  189. -->
  190. <xts:block id="debug" dependency="renderPage" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  191. <!-- get the debug logic sheet -->
  192. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  193. <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">
  194. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  195. <xsl:template match="/">
  196. <dbg:dumpxml select="/root"/>
  197. </xsl:template>
  198. </xsl:stylesheet>
  199. </xts:block>
  200. </xts:morphlet>