new_connection3.xts 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134
  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, 2017
  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. <!--
  13. The following parameter field should keep their names unchanged.
  14. Transformer is using them to pass in their values.
  15. m_p_defaultName
  16. m_p_defaultDescription
  17. m_p_defaultScreenTip
  18. m_cube_password
  19. cube_password_checkbox
  20. m_connection_cache_size
  21. m_connection_windows_cube
  22. m_connection_unix_cube
  23. m_connection_type: type of the connection.
  24. m_authentication is used to get the authentication provided by Transformer. it can be none or namespace.
  25. m_transformer_namespace: provided by Transformer to set which namespace should be selected. It contains the namespace searchPath.
  26. -->
  27. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" messageBase="messages/portal.xml, messages/portalRL.xml" includeConfig="true" requiredCapability="canUseDataSourcesTool">
  28. <!--
  29. ===============================================================================================
  30. formlogic_init - standard form logic initialization
  31. ===============================================================================================
  32. -->
  33. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  34. <!--
  35. ================================================================================
  36. encrypt the password
  37. ================================================================================
  38. -->
  39. <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='m_cube_password' or @name='test_cube_password' or @name='m_connection_password' or @name='m_connection_proxy_password' or @name='proxyPasswordEncrypted' or @name='test_password'] != '']"/>
  40. <!--
  41. ===============================================================================================
  42. load_metadata
  43. ===============================================================================================
  44. -->
  45. <xts:block id="load_metadata" processor="XSLT" type="exec" mode="interpret" nodelist="" dependency="formlogic_init">
  46. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  47. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  48. <xsl:template match="/">
  49. <xts:sequence>
  50. <xts:append>
  51. <xts:transform src="transforms/portal/dataSource/extractDatasourceMetadata.xslt" processor="XSLT">
  52. <root>
  53. <xts:queryNode select="/root/env"/>
  54. <xts:transform src="/transforms/portal/dataSource/generateDatasourceMetadata.xslt" processor="XSLT">
  55. <xts:param name="messageBase">/messages/portal.xml</xts:param>
  56. <root/>
  57. </xts:transform>
  58. </root>
  59. </xts:transform>
  60. </xts:append>
  61. <xts:append>
  62. <xts:function name="getConfiguration">
  63. <xts:param name="aliasRoots"/>
  64. </xts:function>
  65. </xts:append>
  66. </xts:sequence>
  67. </xsl:template>
  68. </xsl:stylesheet>
  69. </xts:block>
  70. <!--
  71. ===============================================================================================
  72. get_content
  73. ===============================================================================================
  74. -->
  75. <xts:block id="get_content" processor="XSLT" type="exec" mode="interpret" condition="/root/datasources/datasource/authentication[type='namespace']" mandatory="false" dependency="load_metadata">
  76. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  77. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  78. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  79. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  80. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  81. <xsl:template match="/">
  82. <xts:sequence>
  83. <xts:append>
  84. <namespaces>
  85. <xts:transform src="transforms/portal/dataSource/stripnamespace.xslt" processor="XSLT">
  86. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  87. <send:request provider="cm">
  88. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  89. <query xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
  90. <search>/directory/namespace<xsl:value-of select="/root/system/param[@name='namespace_filter']"/></search>
  91. <properties>
  92. <cm:property name="defaultName"/>
  93. <cm:property name="searchPath"/>
  94. <cm:property name="active"/>
  95. </properties>
  96. </query>
  97. </xts:transform>
  98. </send:request>
  99. </xts:transform>
  100. </xts:transform>
  101. </namespaces>
  102. </xts:append>
  103. <!-- get a list of additional datasources -->
  104. <xts:append faultBlock="ignore">
  105. <xts:request protocol="FILEREAD" target="$CONFIG_ROOT$/datasources.xml" faultBlock="ignore" cache="false"/>
  106. </xts:append>
  107. </xts:sequence>
  108. </xsl:template>
  109. </xsl:stylesheet>
  110. </xts:block>
  111. <!--
  112. ================================================================================
  113. process_datasources
  114. ================================================================================
  115. -->
  116. <xts:block id="process_datasources" type="exec" mode="interpret" dependency="get_content" processor="XSLT" nodelist="env,credential,system,http,datasources,additionalDatasources">
  117. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  118. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  119. <xsl:template match="/">
  120. <xts:sequence>
  121. <xts:append select="root/datasources/datasource[value='jdbc-generic']/supportedDataSources">
  122. <xsl:for-each select="root/additionalDatasources/datasource[@type='jdbc-generic']">
  123. <!-- simple check for .xml extension -->
  124. <xsl:if test="substring(@filename, (string-length(@filename) - string-length('.xml')) + 1) = '.xml'">
  125. <xts:request protocol="FILEREAD" target="{concat('$CONFIG_ROOT$','/datasources/',@filename)}" faultBlock="ignore" cache='false' debug="false"/>
  126. </xsl:if>
  127. </xsl:for-each>
  128. </xts:append>
  129. </xts:sequence>
  130. </xsl:template>
  131. </xsl:stylesheet>
  132. </xts:block>
  133. <xts:block id="ignore" processor="XML" type="fault">
  134. <ignore/>
  135. </xts:block>
  136. <!--
  137. ===============================================================================================
  138. renderPage - render the page
  139. ===============================================================================================
  140. -->
  141. <xts:block id="render_page" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="encrypt_password get_content process_datasources">
  142. <!-- get the presentation theme -->
  143. <xts:logicsheet path="logicsheets/portal.xsl"/>
  144. <xts:logicsheet path="logicsheets/presentation/dialog/connections.xslt"/>
  145. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  146. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  147. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  148. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  149. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  150. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  151. <!-- apply the form logic -->
  152. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  153. <xts:logicsheet path="logicsheets/validation.xslt"/>
  154. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  155. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  156. xmlns:dcx="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/connections/1/"
  157. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  158. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  159. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  160. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  161. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  162. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  163. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  164. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  165. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  166. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  167. exclude-result-prefixes="xsl dcx cf cp cm pf df dp dt lyt utml">
  168. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  169. <!-- current file name -->
  170. <xsl:variable name="mname" select="'new_connection3.xts'"/>
  171. <!-- add any theme variables -->
  172. <pf:variables/>
  173. <xsl:variable name="fromCMM" select="key('env-param', 'fromCMM')"/>
  174. <xsl:variable name="fromTransformer" select="key('env-param', 'from_transf')"/>
  175. <!-- connection templates for the controls -->
  176. <dcx:connectionTemplates/>
  177. <xsl:variable name="connectionType" select="key('env-param','m_connection_type')"/>
  178. <xsl:variable name="exclusionList" select="' m_connection_password m_connection_confirm_password '"/>
  179. <!-- start the output -->
  180. <xsl:template match="/root">
  181. <xsl:variable name="backURL" select="key('env-param','backURL')"/>
  182. <!-- get passed in parameters -->
  183. <xsl:variable name="connection_typeName" select="/root/datasources/datasource/name"/>
  184. <xsl:variable name="wizardTitle">
  185. <xsl:choose>
  186. <xsl:when test="key('env-param','m_new_class')='dataSource'">
  187. <xts:string id="IDS_NEW_DATA_SOURCE_TITLE"/>
  188. </xsl:when>
  189. <xsl:otherwise>
  190. <xts:string id="IDS_NEW_CONNECTION_TITLE"/>
  191. </xsl:otherwise>
  192. </xsl:choose>
  193. </xsl:variable>
  194. <xsl:variable name="browserTitle">
  195. <xsl:choose>
  196. <xsl:when test="$connectionType='xml'">
  197. <xsl:text/><xts:string id="IDS_NEW_TITLE_CONNECT_STRING_ENTER">
  198. <xts:param name="connectType"><xsl:value-of select="$connection_typeName"/></xts:param>
  199. <xts:param name="wizardTitle"><xsl:value-of select="$wizardTitle"/></xts:param>
  200. </xts:string><xsl:text/>
  201. </xsl:when>
  202. <xsl:when test="$connectionType!='other'">
  203. <xsl:text/><xts:string id="IDS_NEW_TITLE_CONNECT_STRING">
  204. <xts:param name="connectType"><xsl:value-of select="$connection_typeName"/></xts:param>
  205. <xts:param name="wizardTitle"><xsl:value-of select="$wizardTitle"/></xts:param>
  206. </xts:string><xsl:text/>
  207. </xsl:when>
  208. <xsl:otherwise>
  209. <xsl:text/><xts:string id="IDS_NEW_TITLE_OTHER_CONNECT_STRING">
  210. <xts:param name="wizardTitle"><xsl:value-of select="$wizardTitle"/></xts:param>
  211. </xts:string><xsl:text/>
  212. </xsl:otherwise>
  213. </xsl:choose>
  214. </xsl:variable>
  215. <xsl:variable name="connTypeDescription" select="/root/datasources/datasource/editDescription"/>
  216. <xsl:variable name="pageDescription">
  217. <xsl:text/><xts:string id="IDS_NEW_INTRO_CONNECT"><xts:param name="connectionType"><xsl:value-of select="$connTypeDescription"/></xts:param></xts:string><xsl:text/>
  218. </xsl:variable>
  219. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  220. <dp:meta>
  221. <!-- Standard meta tags -->
  222. <pf:meta/>
  223. </dp:meta>
  224. <dp:script>
  225. <!-- Help system -->
  226. <pf:help context="HID_ADD_MODIFY_DATA_SOURCE"/>
  227. <pf:dojo/>
  228. <script language="javascript" src="{$webcontent}/{$app}/js/connections.js"/>
  229. <script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"/>
  230. <script language="javascript">
  231. <dt:checkMandatoryScript/>
  232. <dcx:checkReservedChar/>
  233. <xsl:if test="$fromCMM">
  234. function doCMMCancel()
  235. {
  236. document.cmmform.submit();
  237. }
  238. </xsl:if>
  239. function init()
  240. {
  241. var f = document.pform;
  242. f.m.value = '<xsl:value-of select="concat($app,'/new_connection3.xts')"/>';
  243. <xsl:if test="key('env-param', 'm_connection_proxy_enabled')='true'">
  244. f.m_connection_proxy_enabled.checked="true";
  245. </xsl:if>
  246. <xsl:variable name="connectionTypesWithAuthentication">
  247. <hasAuth connType="sql"/>
  248. <hasAuth connType="sql2005"/>
  249. <hasAuth connType="sql2008"/>
  250. <hasAuth connType="sql2012-2014"/>
  251. <hasAuth connType="sqlodbc"/>
  252. <hasAuth connType="jdbc-sql"/>
  253. <hasAuth connType="composite"/>
  254. <hasAuth connType="virtualviewmanager"/>
  255. <hasAuth connType="msanalysis2017"/>
  256. <hasAuth connType="msanalysis2016"/>
  257. <hasAuth connType="msanalysis2014"/>
  258. <hasAuth connType="msanalysis2012"/>
  259. <hasAuth connType="msanalysis2008"/>
  260. <hasAuth connType="msanalysis2005"/>
  261. <hasAuth connType="dbtwoolap"/>
  262. <hasAuth connType="tm1"/>
  263. <hasAuth connType="tm1R"/>
  264. <hasAuth connType="odata"/>
  265. <hasAuth connType="teradata"/>
  266. <hasAuth connType="jdbc-teradata"/>
  267. <hasAuth connType="sap"/>
  268. <hasAuth connType="powercube"/>
  269. <hasAuth connType="db2"/>
  270. <hasAuth connType="jdbc-db2"/>
  271. <hasAuth connType="odbc"/>
  272. <hasAuth connType="netezza"/>
  273. <hasAuth connType="jdbc-netezza"/>
  274. <hasAuth connType="sr3"/>
  275. <hasAuth connType="siebel"/>
  276. <hasAuth connType="sfdc"/>
  277. <hasAuth connType="jdbc-generic"/>
  278. <hasAuth connType="lob-jdbc"/>
  279. <hasAuth connType="oracle"/>
  280. <hasAuth connType="jdbc-oracle"/>
  281. </xsl:variable>
  282. <xsl:choose>
  283. <xsl:when test="count($connectionTypesWithAuthentication/hasAuth[@connType=$connectionType]) > 0">
  284. <xsl:if test="$connectionType='powercube'">
  285. toggleCubePassword();
  286. <xsl:if test="$fromTransformer and string(key('env-param', 'm_authentication'))='namespace' and string(key('env-param', 'changed_m_p_credentialNamespaces'))!='1' and count(/root/namespaces/cm:queryResponse/cm:namespace/*) > 0">
  287. <xsl:variable name="transf_namespace" select="string(key('env-param', 'm_transformer_namespace'))"/>
  288. if (f.authentication[1] &amp;&amp; f.m_p_credentialNamespaces)
  289. {
  290. f.authentication[1].checked=true;
  291. <xsl:if test="$transf_namespace!=''">
  292. var namespace = '<xsl:value-of select="xtsext:javascriptencode($transf_namespace)"/>';
  293. if (f.m_p_credentialNamespaces)
  294. {
  295. for (var i=0; i&lt;f.m_p_credentialNamespaces.length;i++) {
  296. if (namespace == f.m_p_credentialNamespaces.options[i].value)
  297. {
  298. f.m_p_credentialNamespaces.options[i].selected= true;
  299. }
  300. }
  301. }
  302. </xsl:if>
  303. }
  304. </xsl:if>
  305. </xsl:if>
  306. onChangeAuthentication();
  307. </xsl:when>
  308. <xsl:otherwise>
  309. if (f.m_connection_use_userid)
  310. {
  311. updateSignonSection(f.m_connection_use_userid.checked);
  312. }
  313. <!--
  314. 'Other' connection doesn't have m_connection_use_userid, but it does have m_connection_default_signon and
  315. the userid and password fields. Use m_connection_default_signon to enable/disable the userid and password fields
  316. -->
  317. else if (f.m_connection_default_signon)
  318. {
  319. disableUserIDField(!f.m_connection_default_signon.checked);
  320. disablePasswordFields(!f.m_connection_default_signon.checked);
  321. }
  322. </xsl:otherwise>
  323. </xsl:choose>
  324. <xsl:if test="not($connectionType='json')">
  325. if (f.m_connection_default_signon &amp;&amp; f.m_connection_userid)
  326. {
  327. if (f.m_connection_default_signon.checked == true &amp;&amp; f.m_connection_default_signon.disabled == false)
  328. {
  329. f.m_connection_userid.disabled = false;
  330. }
  331. else
  332. {
  333. f.m_connection_userid.disabled = true;
  334. }
  335. }
  336. </xsl:if>
  337. <xsl:if test="$connectionType='powercube' and key('env-param','cube_password_checkbox')">
  338. <!-- we should do this only if it is the first time...-->
  339. <xsl:if test="key('env-param','from_transf') and not(/root/env/param[@name='changed_m_connection_default_signon'])">
  340. <xsl:choose>
  341. <!-- If the cube_password_checkbox is true then we need to make it checked and enable the default_signon-->
  342. <xsl:when test="key('env-param','cube_password_checkbox')='true'">
  343. f.cube_password_checkbox.checked = true;
  344. f.m_connection_default_signon.disabled = false;
  345. f.m_connection_default_signon.checked = false;<!-- set this checkbox as un-checked -->
  346. <xsl:if test="key('env-param','m_connection_default_signon') and key('env-param','m_connection_default_signon')='true'">
  347. f.m_connection_default_signon.checked = true;<!-- set this checkbox as checked -->
  348. </xsl:if>
  349. f.changed_m_connection_default_signon.value = 1;
  350. </xsl:when>
  351. <xsl:otherwise>
  352. <!-- if cube_password_checkbox is not true then make
  353. the m_connection_default_signon_signon as disabled.
  354. -->
  355. f.cube_password_checkbox.checked = false;
  356. f.m_connection_default_signon.disabled = true;
  357. f.m_connection_default_signon.checked = false;
  358. f.changed_m_connection_default_signon.value = 1;
  359. </xsl:otherwise>
  360. </xsl:choose>
  361. </xsl:if>
  362. if (f.m_connection_default_signon &amp;&amp; f.m_connection_default_signon.checked)
  363. {
  364. f.m_cube_password.disabled = !f.m_connection_default_signon.checked;
  365. f.m_cube_confirm_password.disabled = !f.m_connection_default_signon.checked;
  366. }
  367. </xsl:if>
  368. <xsl:if test="$connectionType='contributorSeries7'">
  369. checkPADIDValue();
  370. </xsl:if>
  371. <xsl:if test="$connectionType='sfdc'">
  372. setProxyControls();
  373. </xsl:if>
  374. <xsl:if test="$connectionType = 'filenet'">
  375. initRepositoryConnectionPage();
  376. </xsl:if>
  377. <xsl:if test="$connectionType = 'db2'">
  378. updateTrustedContext();
  379. </xsl:if>
  380. updateJdbcOracle();
  381. updateJdbcSortOptions();
  382. }
  383. function validate()
  384. {
  385. var f = document.pform;
  386. <xsl:call-template name="get-validations">
  387. <xsl:with-param name="connection-type" select="$connectionType"/>
  388. <xsl:with-param name="connection-variant" select="'new'"/>
  389. </xsl:call-template>
  390. }
  391. function validateBeforeTest()
  392. {
  393. var f = document.pform;
  394. <xsl:call-template name="get-validations">
  395. <xsl:with-param name="connection-type" select="$connectionType"/>
  396. <xsl:with-param name="connection-variant" select="'new'"/>
  397. <xsl:with-param name="test" select="true()"/>
  398. </xsl:call-template>
  399. }
  400. <xsl:if test="key('env-param','from_bmt')!=''">
  401. <!-- Called only when canceling back to BMT environment.
  402. from_bmt is not exclusive to BMT. It is added to the environment by the new_connection.xts
  403. Therefore any external application that calls this morphlet will be defining this from_bmt
  404. (Transformer, BMT ...).
  405. -->
  406. function doCancel()
  407. {
  408. window.external.OnClose(1);
  409. }
  410. </xsl:if>
  411. function doTest()
  412. {
  413. if(!validateBeforeTest())
  414. {
  415. return;
  416. }
  417. else
  418. {
  419. f=document.pform;
  420. buildConnectString('<xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='m_connection_type']))"/>','<xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='m_connection_variant']))"/>');
  421. f.ps_nav_op.value = 'push';
  422. f.m.value = '<xsl:value-of select="concat($app,'/test_connection.xts')"/>';
  423. f.submit();
  424. }
  425. }
  426. </script>
  427. <script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"/>
  428. </dp:script>
  429. <utml:form name="pform" method="post" action="{$gateway}">
  430. <utml:exclusion-list><xsl:value-of select="$exclusionList"/></utml:exclusion-list>
  431. <dp:header>
  432. <!-- header titles-->
  433. <dp:title><xsl:value-of select="normalize-space($browserTitle)"/></dp:title>
  434. <dp:description>
  435. <xsl:choose>
  436. <xsl:when test="$connectionType = 'contributor'">
  437. <xsl:text><xts:string id="IDS_NEW_INTRO_CONNECT_NEWCONTRIBUTOR"/></xsl:text>
  438. </xsl:when>
  439. <xsl:when test="$connTypeDescription != ''">
  440. <xsl:value-of select="$pageDescription"/>
  441. </xsl:when>
  442. </xsl:choose>
  443. </dp:description>
  444. <dp:close>
  445. <xsl:choose>
  446. <xsl:when test="key('env-param','from_bmt')">
  447. <a href="javascript:doCancel()">
  448. <dp:closeMarker/>
  449. </a>
  450. </xsl:when>
  451. <xsl:when test="$fromCMM">
  452. <a href="javascript:doCMMCancel()">
  453. <dp:closeMarker/>
  454. </a>
  455. </xsl:when>
  456. <xsl:otherwise>
  457. <a href="{$backURL}">
  458. <dp:closeMarker/>
  459. </a>
  460. </xsl:otherwise>
  461. </xsl:choose>
  462. </dp:close>
  463. </dp:header>
  464. <xsl:choose>
  465. <xsl:when test="$connectionType = 'composite' or $connectionType = 'virtualviewmanager' or $connectionType = 'db2' or $connectionType = 'openEdge' or $connectionType = 'odbc' or $connectionType = 'redbrick' or $connectionType = 'teradata' or $connectionType = 'sqlodbc' or $connectionType = 'sybaseIQ' or $connectionType = 'netezza'">
  466. <!--
  467. =========================================================================
  468. D B 2 / O D B C
  469. =========================================================================
  470. -->
  471. <xsl:call-template name="dcx-db2-odbc-template">
  472. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  473. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  474. </xsl:call-template>
  475. </xsl:when>
  476. <xsl:when test="$connectionType = 'msas_xmla'">
  477. <!--
  478. =========================================================================
  479. Microsoft Analysis Services (via XMLA)
  480. =========================================================================
  481. -->
  482. <xsl:call-template name="dcx-msas_xmla-template">
  483. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  484. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  485. </xsl:call-template>
  486. </xsl:when>
  487. <xsl:when test="contains(' sql sql2005 sql2008 sql2012-2014 ', concat(' ',$connectionType,' '))">
  488. <!--
  489. =========================================================================
  490. M S S Q L S e r v e r (OLE DB and 2005 and 2008 and 2012 and 2014)
  491. =========================================================================
  492. -->
  493. <xsl:call-template name="dcx-sql-template">
  494. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  495. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  496. </xsl:call-template>
  497. </xsl:when>
  498. <xsl:when test="$connectionType = 'oracle'">
  499. <!--
  500. =========================================================================
  501. O R A C L E
  502. =========================================================================
  503. -->
  504. <xsl:call-template name="dcx-oracle-template">
  505. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  506. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  507. </xsl:call-template>
  508. </xsl:when>
  509. <xsl:when test="$connectionType = 'sybase' or $connectionType = 'sybase_ct15'">
  510. <!--
  511. =========================================================================
  512. S Y B A S E
  513. =========================================================================
  514. -->
  515. <xsl:call-template name="dcx-sybase-template">
  516. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  517. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  518. <xsl:with-param name="connection-type" select="$connectionType"/>
  519. </xsl:call-template>
  520. </xsl:when>
  521. <xsl:when test="$connectionType = 'informix'">
  522. <!--
  523. =========================================================================
  524. I N F O R M I X
  525. =========================================================================
  526. -->
  527. <xsl:call-template name="dcx-informix-template">
  528. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  529. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  530. </xsl:call-template>
  531. </xsl:when>
  532. <xsl:when test="$connectionType = 'sr3'">
  533. <!--
  534. =========================================================================
  535. S A P R 3
  536. =========================================================================
  537. -->
  538. <xsl:call-template name="dcx-sapr3-template">
  539. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  540. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  541. </xsl:call-template>
  542. </xsl:when>
  543. <xsl:when test="$connectionType = 'sfdc'">
  544. <!--
  545. =========================================================================
  546. S F D C
  547. =========================================================================
  548. -->
  549. <xsl:call-template name="dcx-sfdc-template">
  550. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  551. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  552. </xsl:call-template>
  553. </xsl:when>
  554. <xsl:when test="$connectionType = 'siebel'">
  555. <!--
  556. =========================================================================
  557. S I E B E L
  558. =========================================================================
  559. -->
  560. <xsl:call-template name="dcx-siebel-template">
  561. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  562. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  563. </xsl:call-template>
  564. </xsl:when>
  565. <xsl:when test="$connectionType = 'sap'">
  566. <!--
  567. =========================================================================
  568. S A P B W
  569. =========================================================================
  570. -->
  571. <xsl:call-template name="dcx-sap-template">
  572. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  573. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  574. </xsl:call-template>
  575. </xsl:when>
  576. <xsl:when test="$connectionType = 'sapR3' or $connectionType = 'sapECC'">
  577. <!--
  578. =========================================================================
  579. S A P R 3 or SAP BW ECC
  580. =========================================================================
  581. -->
  582. <xsl:call-template name="dcx-sapR3-template">
  583. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  584. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  585. </xsl:call-template>
  586. </xsl:when>
  587. <xsl:when test="$connectionType = 'consolidation'">
  588. <!--
  589. =========================================================================
  590. Cognos Consolidation
  591. =========================================================================
  592. -->
  593. <xsl:call-template name="dcx-consolidation-template">
  594. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  595. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  596. </xsl:call-template>
  597. </xsl:when>
  598. <!--
  599. The contributor type does not have parameters therefore we don't need to call its template.
  600. Only contributor Series 7 has parameters.
  601. -->
  602. <xsl:when test="$connectionType = 'contributorSeries7'">
  603. <!--
  604. =========================================================================
  605. Cognos Contributor Series 7
  606. =========================================================================
  607. -->
  608. <xsl:call-template name="dcx-contributorSeries7-template">
  609. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  610. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  611. </xsl:call-template>
  612. </xsl:when>
  613. <xsl:when test="$connectionType = 'powercube'">
  614. <!--
  615. =========================================================================
  616. Cognos PowerCube
  617. =========================================================================
  618. -->
  619. <xsl:call-template name="dcx-powercube-template">
  620. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  621. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  622. </xsl:call-template>
  623. </xsl:when>
  624. <xsl:when test="$connectionType = 'dbtwoolap'">
  625. <!--
  626. =========================================================================
  627. IBM DB2 OLAP Server
  628. =========================================================================
  629. -->
  630. <xsl:call-template name="dcx-db2olap-template">
  631. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  632. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  633. </xsl:call-template>
  634. </xsl:when>
  635. <xsl:when test="$connectionType = 'tm1'">
  636. <!--
  637. =========================================================================
  638. TM1
  639. =========================================================================
  640. -->
  641. <xsl:call-template name="dcx-tm1-template">
  642. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  643. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  644. </xsl:call-template>
  645. </xsl:when>
  646. <xsl:when test="$connectionType = 'tm1R'">
  647. <!--
  648. =========================================================================
  649. Planning Analytics
  650. =========================================================================
  651. -->
  652. <xsl:call-template name="dcx-tm1R-template">
  653. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  654. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  655. </xsl:call-template>
  656. </xsl:when>
  657. <xsl:when test="$connectionType = 'odata'">
  658. <!--
  659. =========================================================================
  660. Open Data Protocol (OData)
  661. =========================================================================
  662. -->
  663. <xsl:call-template name="dcx-odata-template">
  664. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  665. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  666. </xsl:call-template>
  667. </xsl:when>
  668. <xsl:when test="$connectionType = 'json'">
  669. <!--
  670. =========================================================================
  671. JavaScript Object Notation (JSON)
  672. =========================================================================
  673. -->
  674. <xsl:call-template name="dcx-json-template">
  675. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  676. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  677. </xsl:call-template>
  678. </xsl:when>
  679. <xsl:when test="$connectionType = 'cognosnow'">
  680. <!--
  681. =========================================================================
  682. COGNOS NOW! Cube
  683. =========================================================================
  684. -->
  685. <xsl:call-template name="dcx-cognosnow-template">
  686. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  687. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  688. </xsl:call-template>
  689. </xsl:when>
  690. <xsl:when test="contains(' msanalysis2005 msanalysis2008 msanalysis2012 msanalysis2014 msanalysis2016 msanalysis2017 ', concat(' ',$connectionType,' '))">
  691. <!--
  692. =========================================================================
  693. Microsoft Analysis Services 2005, 2008, 2012, 2014, 2016 and 2017
  694. =========================================================================
  695. -->
  696. <xsl:call-template name="dcx-msanalysis2005-template">
  697. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  698. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  699. </xsl:call-template>
  700. </xsl:when>
  701. <xsl:when test="$connectionType = 'xml'">
  702. <!--
  703. =========================================================================
  704. X M L
  705. =========================================================================
  706. -->
  707. <xsl:call-template name="dcx-xml-template">
  708. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  709. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  710. </xsl:call-template>
  711. </xsl:when>
  712. <xsl:when test="$connectionType = 'other'">
  713. <!--
  714. =========================================================================
  715. O t h e r
  716. =========================================================================
  717. -->
  718. <xsl:call-template name="dcx-other-template">
  719. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  720. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  721. </xsl:call-template>
  722. </xsl:when>
  723. <xsl:when test="$connectionType = 'jdbc-generic' or $connectionType = 'lob-jdbc'">
  724. <!--
  725. =========================================================================
  726. JDBC Generic
  727. =========================================================================
  728. -->
  729. <xsl:call-template name="dcx-jdbc-generic">
  730. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  731. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  732. </xsl:call-template>
  733. </xsl:when>
  734. <xsl:when test="$connectionType = 'filenet'">
  735. <!--
  736. =========================================================================
  737. FileNet
  738. =========================================================================
  739. -->
  740. <xsl:call-template name="dcx-filenet">
  741. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  742. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  743. </xsl:call-template>
  744. </xsl:when>
  745. <xsl:when test="$connectionType = 'jdbc-oracle'">
  746. <!--
  747. =========================================================================
  748. Oracle (JDBC)
  749. =========================================================================
  750. -->
  751. <xsl:call-template name="dcx-jdbc-oracle">
  752. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  753. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  754. </xsl:call-template>
  755. </xsl:when>
  756. <xsl:when test="$connectionType = 'jdbc-sql'">
  757. <!--
  758. =========================================================================
  759. SQL Server (JDBC)
  760. =========================================================================
  761. -->
  762. <xsl:call-template name="dcx-jdbc-sql">
  763. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  764. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  765. </xsl:call-template>
  766. </xsl:when>
  767. <xsl:when test="$connectionType = 'jdbc-db2'">
  768. <!--
  769. =========================================================================
  770. IBM DB2 (JDBC)
  771. =========================================================================
  772. -->
  773. <xsl:call-template name="dcx-jdbc-db2">
  774. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  775. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  776. </xsl:call-template>
  777. </xsl:when>
  778. <xsl:when test="$connectionType = 'jdbc-teradata'">
  779. <!--
  780. =========================================================================
  781. Teradata (JDBC)
  782. =========================================================================
  783. -->
  784. <xsl:call-template name="dcx-jdbc-teradata">
  785. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  786. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  787. </xsl:call-template>
  788. </xsl:when>
  789. <xsl:when test="$connectionType = 'jdbc-netezza'">
  790. <!--
  791. =========================================================================
  792. Netezza (JDBC)
  793. =========================================================================
  794. -->
  795. <xsl:call-template name="dcx-jdbc-netezza">
  796. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  797. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  798. </xsl:call-template>
  799. </xsl:when>
  800. </xsl:choose>
  801. <xsl:if test="$connectionType != 'xml' and $connectionType != 'contributor' and $connectionType != 'contributorSeries7' and $connectionType != 'cognosnow'">
  802. <xsl:variable name="divDisplayValue">
  803. <xsl:choose>
  804. <xsl:when test="/root/env/param[@name='m_connection_type_history'] = ''">
  805. <xsl:value-of select="'block'"/>
  806. </xsl:when>
  807. <xsl:otherwise>
  808. <xsl:value-of select="'none'"/>
  809. </xsl:otherwise>
  810. </xsl:choose>
  811. </xsl:variable>
  812. <div id="gen-signon-section" style="display: {$divDisplayValue}">
  813. <xsl:call-template name="gen-signon-section">
  814. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  815. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  816. <xsl:with-param name="uid-pwd-checkboxes">
  817. <xsl:choose>
  818. <xsl:when test="contains('composite virtualviewmanager tm1 odata dbtwoolap powercube msanalysis2005 msanalysis2008 msanalysis2012 msanalysis2014 msanalysis2016 msanalysis2017 redbrick teradata netezza jdbc-teradata sqlodbc db2 jdbc-db2 msas_xmla odbc openEdge sql sql2005 sql2008 sql2012-2014 jdbc-sql oracle jdbc-oracle jdbc-generic lob-jdbc filenet netezza jdbc-netezza sybase sybase_ct15 informix sybaseIQ', $connectionType)">
  819. <xsl:value-of select="'true'"/>
  820. </xsl:when>
  821. <xsl:otherwise>
  822. <xsl:value-of select="'false'"/>
  823. </xsl:otherwise>
  824. </xsl:choose>
  825. </xsl:with-param>
  826. <xsl:with-param name="connectionType">
  827. <xsl:value-of select="$connectionType"/>
  828. </xsl:with-param>
  829. <xsl:with-param name="wizard" select="'true'"/>
  830. </xsl:call-template>
  831. </div>
  832. </xsl:if>
  833. <!-- Special division for contributor -->
  834. <xsl:if test="$connectionType = 'contributor' or $connectionType = 'contributorSeries7'">
  835. <xsl:call-template name="gen-contributor-section">
  836. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  837. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  838. <xsl:with-param name="uid-pwd-checkboxes" select="'false'"/>
  839. <xsl:with-param name="connectionType" select="$connectionType"/>
  840. <xsl:with-param name="wizard" select="'true'"/>
  841. </xsl:call-template>
  842. </xsl:if>
  843. <utml:input type="hidden" name="m_p_connectionString"/>
  844. <xsl:if test="$connectionType = 'powercube'">
  845. <dcx:cubePassword/>
  846. </xsl:if>
  847. <!-- test the connection section -->
  848. <lyt:layout title="IDS_PROP_CONN_TESTING" style="1" border="yes">
  849. <lyt:section>
  850. <dp:choice>
  851. <dp:section1>
  852. <a href="javascript:doTest();">
  853. <xsl:text><xts:string id="IDS_PROP_CONN_TEST_CONNECTION"/></xsl:text>
  854. </a>
  855. </dp:section1>
  856. </dp:choice>
  857. </lyt:section>
  858. </lyt:layout>
  859. <!-- Drop the "Wait" dialog here so it gets rendered in the correct spot on the page -->
  860. <xsl:if test="key('env-param','from_bmt')">
  861. <cp:genericDialog id="wait" width="200" height="100">
  862. <cp:param name="title"></cp:param>
  863. <cp:param name="message">
  864. <img src="{$brand_images}progress.gif" align="absmiddle"/><xsl:value-of select="'&#160;&#160;&#160;&#160;&#160;&#160;'"/><xts:string id="IDS_WAIT"/>
  865. </cp:param>
  866. </cp:genericDialog>
  867. </xsl:if>
  868. <dp:footer>
  869. <!-- Cancel button -->
  870. <xsl:choose>
  871. <xsl:when test="key('env-param','from_bmt')!=''">
  872. <df:button df:id="IDS_CANCEL" df:style="href" df:href="javascript:doCancel()"/>
  873. </xsl:when>
  874. <xsl:when test="$fromCMM">
  875. <df:button df:id="IDS_CANCEL" df:style="href" df:href="javascript:doCMMCancel()"/>
  876. </xsl:when>
  877. <xsl:otherwise>
  878. <df:button df:id="IDS_CANCEL" df:style="back-url"/>
  879. </xsl:otherwise>
  880. </xsl:choose>
  881. <!-- Back button -->
  882. <xsl:choose>
  883. <xsl:when test="key('env-param','from_transf')!=''">
  884. <df:button df:id="IDS_BACK" df:style="maintain" df:label="IDS_BACK_LABEL" >
  885. <df:target>
  886. <xsl:value-of select="concat($app, '/new_general.xts')"/>
  887. </df:target>
  888. </df:button>
  889. </xsl:when>
  890. <xsl:otherwise>
  891. <df:button df:id="IDS_BACK" df:style="href" df:label="IDS_BACK_LABEL" df:href="javascript:back()"/>
  892. </xsl:otherwise>
  893. </xsl:choose>
  894. <utml:input type="hidden" name="m_return" value=""/>
  895. <!-- Next button -->
  896. <xsl:choose>
  897. <xsl:when test="/root/datasources/datasource/supportsCommandBlocks = 'true'">
  898. <xsl:variable name="queryServiceEquivalent">
  899. <xsl:if test="count(/root/env/param[@name='m_create_jdbc'])!=0">
  900. <xsl:value-of select="concat('&amp;quot;',/root/datasources/datasource/queryServiceEquivalent,'&amp;quot;')"/>
  901. </xsl:if>
  902. </xsl:variable>
  903. <df:button df:id="IDS_NEXT" df:style="href" df:label="IDS_NEXT_LABEL" df:href="javascript:next({$queryServiceEquivalent})"/>
  904. </xsl:when>
  905. <xsl:otherwise>
  906. <df:button df:id="IDS_NEXT"/>
  907. </xsl:otherwise>
  908. </xsl:choose>
  909. <!-- Finish button -->
  910. <xsl:choose>
  911. <xsl:when test="count(/root/env/param[@name='m_create_jdbc'])!=0 and /root/env/param[@name='m_connection_type_history']=''">
  912. <df:button df:id="IDS_FINISH"/>
  913. </xsl:when>
  914. <xsl:otherwise>
  915. <df:button df:id="IDS_FINISH" df:style="href" df:href="javascript:finish()"/>
  916. </xsl:otherwise>
  917. </xsl:choose>
  918. </dp:footer>
  919. <script language="javascript">
  920. var bCommandSent = false;
  921. function getEncodedConnectionTypes() {
  922. var types = document.pform.m_connection_type_history.value;
  923. if (types != '') {
  924. types+=',';
  925. }
  926. types+=document.pform.m_connection_type.value;
  927. return types;
  928. }
  929. function finish() {
  930. if (validate()) {
  931. if(getEncodedConnectionTypes() == 'json'){
  932. var f = document.pform;
  933. var authString = 'http://<xsl:value-of select="/root/http/param[contains(@name,'SERVER_NAME')]"/>' + '<xsl:value-of select="/root/http/param[contains(@name,'SCRIPT_NAME')]"/>';
  934. if (f.m_connection_authentication_type.value == 'OAuth1.0') {
  935. authString += '/oauth1?';
  936. authString += '&amp;temporary_token_endpoint=' + f.m_connection_temporary_token_endpoint.value;
  937. authString += '&amp;authorization_endpoint=' + f.m_connection_authorization_endpoint.value;
  938. authString += '&amp;token_endpoint=' + f.m_connection_token_endpoint.value;
  939. authString += '&amp;reponse_type=code';
  940. authString += '&amp;state=' + f.m_p_defaultName.value;
  941. window.open(authString);
  942. }
  943. if (f.m_connection_authentication_type.value == 'OAuth2.0') {
  944. authString += '/oauth2?';
  945. authString += '&amp;authorization_endpoint=' + f.m_connection_authorization_endpoint.value;
  946. authString += '&amp;token_endpoint=' + f.m_connection_token_endpoint.value;
  947. if (f.m_connection_scope.value)
  948. {
  949. authString += '&amp;scope=' + f.m_connection_scope.value;
  950. }
  951. authString += '&amp;state=' + f.m_p_defaultName.value;
  952. window.open(authString);
  953. }
  954. }
  955. document.pform.ps_nav_op.value = "maintain";
  956. buildConnectString(getEncodedConnectionTypes(),'new');
  957. <xsl:if test="key('env-param', 'm_new_class')='dataSource' and (key('env-param', 'from_transf')!='' or (not($fromCMM) and not(key('env-param', 'from_bmt')!='')))">
  958. <!-- we don't have to set the m_return when the wizard is called by CMM, FM and PW1.
  959. This is already taken care by new_connection.xts.
  960. The new_connection_finish.xts will present the option to create a package
  961. when permitted.
  962. Exception is for the Transformer which provides from_bmt and from_transf (BUG# 539911)
  963. -->
  964. document.pform.m_return.value = '<xsl:value-of select="$app"/>/new_connection_finish.xts';
  965. </xsl:if>
  966. document.pform.m.value = "<xsl:value-of select="$app"/>/submit.xts";
  967. <xsl:choose>
  968. <xsl:when test="key('env-param','from_bmt')">
  969. if (!bCommandSent) {
  970. document.pform.submit();
  971. bCommandSent = true;
  972. <xsl:if test="$browser='ie'">
  973. wait.show();
  974. document.body.style.cursor = "wait";
  975. </xsl:if>
  976. } else {
  977. bCommandSent = false;
  978. <xsl:if test="$browser='ie'">
  979. document.body.style.cursor = "default";
  980. wait.hide();
  981. </xsl:if>
  982. }
  983. </xsl:when>
  984. <xsl:otherwise>
  985. document.pform.submit();
  986. </xsl:otherwise>
  987. </xsl:choose>
  988. }
  989. }
  990. function back() {
  991. document.pform.ps_nav_op.value = "maintain";
  992. var connectionTypeHistory = document.pform.m_connection_type_history.value.split(',');
  993. if (connectionTypeHistory.length > 0 &amp;&amp; (connectionTypeHistory[0] != '')) {
  994. document.pform.m_connection_type.value = connectionTypeHistory.pop();
  995. document.pform.m_connection_type_history.value = connectionTypeHistory;
  996. document.pform.m.value = "<xsl:value-of select="$app"/>/new_connection3.xts";
  997. } else {
  998. document.pform.m.value = "<xsl:value-of select="$app"/>/new_connection2.xts";
  999. }
  1000. document.pform.submit();
  1001. }
  1002. function next(nextConnectionType) {
  1003. if (validate()) {
  1004. document.pform.ps_nav_op.value = "maintain";
  1005. var encodedConnectionTypes = getEncodedConnectionTypes();
  1006. buildConnectString(encodedConnectionTypes,'new');
  1007. if (nextConnectionType) {
  1008. document.pform.m_connection_type_history.value = encodedConnectionTypes;
  1009. document.pform.m_connection_type.value = nextConnectionType;
  1010. document.pform.m.value = "<xsl:value-of select="$app"/>/new_connection3.xts";
  1011. } else {
  1012. document.pform.m.value = "<xsl:value-of select="$app"/>/new_connection4.xts";
  1013. }
  1014. document.pform.submit();
  1015. }
  1016. }
  1017. </script>
  1018. <!-- if we're building a Cognos Finance or Planning connection and there aren't any namesapces defined, then show
  1019. a warning dialog -->
  1020. <xsl:if test="$connectionType = 'consolidation' and not(/root/namespaces/cm:queryResponse/cm:namespace)">
  1021. <script language="javascript">
  1022. alert('<xts:string id="IDS_PROP_CONN_FINANCE_NO_NAMESPACE_WARNING" encode="javascript"/>');
  1023. </script>
  1024. </xsl:if>
  1025. </utml:form>
  1026. <xsl:if test="$fromCMM">
  1027. <dt:cmmPostBackForm/>
  1028. </xsl:if>
  1029. <script>
  1030. //overcome issues with UTML causing previous connection3.xts hidden form attrs to be missing
  1031. var formParams = {
  1032. <xsl:for-each select="/root/env/param[not(contains(@name,$exclusionList))]">
  1033. '<xsl:value-of select="xtsext:javascriptencode(@name)"/>':'<xsl:value-of select="xtsext:javascriptencode(text())"/>'<xsl:if test="position()!=last()">,</xsl:if>
  1034. </xsl:for-each>
  1035. }
  1036. for (var name in formParams) {
  1037. var value = formParams[name];
  1038. if (!document.pform[name]) {
  1039. var f = document.createElement('input');
  1040. f.setAttribute('name', name);
  1041. f.setAttribute('id', name);
  1042. f.setAttribute('value',value);
  1043. f.setAttribute('type', 'hidden');
  1044. document.pform.appendChild(f);
  1045. }
  1046. }
  1047. </script>
  1048. </dp:page>
  1049. </xsl:template>
  1050. <xsl:template match="*[local-name()='messageString']">
  1051. <xsl:value-of select="xtsext:javascriptencode(string(.))"/><xsl:if test="string-length(normalize-space(.)) > 0">\n</xsl:if>
  1052. </xsl:template>
  1053. </xsl:stylesheet>
  1054. </xts:block>
  1055. <!--
  1056. ===============================================================================================
  1057. debug - display debug information
  1058. ===============================================================================================
  1059. -->
  1060. <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">
  1061. <!-- get the debug logic sheet -->
  1062. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  1063. <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">
  1064. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  1065. <xsl:template match="/">
  1066. <dbg:dumpxml select="/root"/>
  1067. </xsl:template>
  1068. </xsl:stylesheet>
  1069. </xts:block>
  1070. </xts:morphlet>