deployment_password.xts 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  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, 2013
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!-- Inputs: m_targetMorphlet -->
  9. <!--
  10. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  11. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  12. -->
  13. <!-- sensitiveData : Sensitive data is selected to be exported. The archive must be encrypted. Export only. -->
  14. <!-- m_archiveEncryptPword: The encryption password. -->
  15. <!-- encryptArchive: User has chosen to encrypt the archive by selecting the "Encrypt the content of the archive" checkbox in the "specify the a deployment archive page". Export only. -->
  16. <!-- m_button_pressed: Gets set to OK or Cancel when the user clicks on one of those buttons in the deployment password page. -->
  17. <!-- credential_clear: Delete the password if set to 'true' -->
  18. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml" requiredCapability="canUseAdministrationPortal">
  19. <!--
  20. ================================================================================
  21. formlogic_init
  22. Initializes the UTML navigation stuff.
  23. ================================================================================
  24. -->
  25. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  26. <!--
  27. ================================================================================
  28. encrypt_credentials
  29. Encrypts the credentials from the Specify the signon userid & password dialog.
  30. ================================================================================
  31. -->
  32. <xts:block id="encrypt_credentials" type="exec" mode="interpret" processor="XSLT" mandatory="false" condition=".[/root/env/param[@name='m_signon_password'] or /root/env/param[@name='credential_clear']='true']">
  33. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dpl="http://developer.cognos.com/schemas/xts/logicsheets/deployment/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  34. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  35. <xsl:variable name="query-values" select="/root/env/param"/>
  36. <pf:variables/>
  37. <dpl:variables/>
  38. <xsl:template match="/">
  39. <xts:sequence>
  40. <xsl:choose>
  41. <xsl:when test="$query-values[@name='credential_clear']='true'">
  42. <xts:delete select="/root/env/param[@name='m_archiveEncryptPword']"/>
  43. <xts:replace select="/root/env/param[@name='credential_clear']">
  44. <param name="credential_clear">false</param>
  45. </xts:replace>
  46. </xsl:when>
  47. <xsl:when test="$query-values[@name='m_signon_pwd_changed']='1'">
  48. <xts:delete select="/root/env/param[@name='m_archiveEncryptPword']"/>
  49. <xts:append select="/root/env">
  50. <param name="m_archiveEncryptPword">
  51. <xsl:value-of select="'&lt;credential&gt;&lt;encryptedValue&gt;'"/>
  52. <xsl:choose>
  53. <xsl:when test="/root/env/param[@name='m_signon_password' and @format='encrypted']">
  54. <xts:encrypt>
  55. <xts:param name="provider">cognos.cam</xts:param>
  56. <xts:param name="source">
  57. <credential>
  58. <password>
  59. <xts:decrypt>
  60. <xts:param name="encode">xml</xts:param>
  61. <xts:param name="provider">cognos.cam</xts:param>
  62. <xts:param name="source">
  63. <xsl:value-of select="/root/env/param[@name='m_signon_password']"/>
  64. </xts:param>
  65. </xts:decrypt>
  66. </password>
  67. </credential>
  68. </xts:param>
  69. </xts:encrypt>
  70. </xsl:when>
  71. <xsl:otherwise>
  72. <xts:encrypt>
  73. <xts:param name="provider">cognos.cam</xts:param>
  74. <xts:param name="source">
  75. <credential>
  76. <password>
  77. <xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='m_signon_password']))"/>
  78. </password>
  79. </credential>
  80. </xts:param>
  81. </xts:encrypt>
  82. </xsl:otherwise>
  83. </xsl:choose>
  84. <xsl:value-of select="'&lt;/encryptedValue&gt;&lt;/credential&gt;'"/>
  85. </param>
  86. </xts:append>
  87. </xsl:when>
  88. <xsl:when test="$query-values[@name='m_button_pressed']='cancel'">
  89. <xts:delete select="/root/env/param[@name='m_archiveEncryptPword']"/>
  90. </xsl:when>
  91. </xsl:choose>
  92. <xts:delete select="/root/env/param[@name='m_signon_password' or @name='m_signon_confirm_password']"/>
  93. </xts:sequence>
  94. </xsl:template>
  95. </xsl:stylesheet>
  96. </xts:block>
  97. <!--
  98. ===============================================================================================
  99. read_deployment_archive is executed in import wizard only
  100. ===============================================================================================
  101. -->
  102. <xts:block id="getArchiveOptions" processor="XSLT" type="exec" dependency="encrypt_credentials" mandatory="false" condition=".[/root/env/param[@name='m_class'] = 'importDeployment' and (not(/root/env/param[@name='m_button_pressed']) or /root/env/param[@name='m_button_pressed'] != 'cancel')]">
  103. <xts:logicsheet path="logicsheets/deploymentlogic.xsl"/>
  104. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  105. <xts:logicsheet path="logicsheets/portal.xsl"/>
  106. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:bus="http://developer.cognos.com/schemas/bibus/1/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:dpl="http://developer.cognos.com/schemas/xts/logicsheets/deployment/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  107. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  108. <dpl:getArchiveOptions handleFault="true"/>
  109. </xsl:stylesheet>
  110. </xts:block>
  111. <!--
  112. ===============================================================================================
  113. faultHandler
  114. ===============================================================================================
  115. -->
  116. <xts:block id="faultHandler" type="fault" processor="XSLT">
  117. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  118. <xsl:output method="xml"/>
  119. <xsl:template match="/root/fault">
  120. <xsl:choose>
  121. <xsl:when test="./*[local-name() = 'exception']/*[local-name() = 'exceptionDetail']/*[local-name() = 'exception']/errorCode = 'cmArchiveEncrypted' or ./*[local-name() = 'exception']/*[local-name() = 'exceptionDetail']/*[local-name() = 'exception']/errorCode = 'cmImportCryptoFailed'">
  122. <copyFault>
  123. <xsl:copy-of select="."/>
  124. </copyFault>
  125. </xsl:when>
  126. <xsl:otherwise>
  127. <xsl:copy-of select="."/>
  128. </xsl:otherwise>
  129. </xsl:choose>
  130. </xsl:template>
  131. <xsl:template match="text()"/>
  132. </xsl:stylesheet>
  133. </xts:block>
  134. <!--
  135. ===============================================================================================
  136. read_deployment_archive is executed in import wizard only
  137. ===============================================================================================
  138. -->
  139. <xts:block id="faultProcessor" type="exec" mode="interpret" processor="XSLT" dependency="getArchiveOptions" mandatory="false">
  140. <xts:logicsheet path="logicsheets/deploymentlogic.xsl"/>
  141. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  142. <xts:logicsheet path="logicsheets/portal.xsl"/>
  143. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dpl="http://developer.cognos.com/schemas/xts/logicsheets/deployment/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  144. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  145. <xsl:template match="/">
  146. <!-- Setting the pass_fault to true will cause the password page to be displayed -->
  147. <xsl:variable name="pass_fault">
  148. <xsl:choose>
  149. <xsl:when test="(/root/archiveOptions/copyFault/fault or /root/env/param[@name = 'editPword'] = 'true' or ((not(/root/env/param[@name = 'm_archiveEncryptPword']) or /root/env/param[@name = 'm_archiveEncryptPword'] = '') and (/root/env/param[@name = 'editPword'] != 'true') and (/root/env/param[@name = 'encryptArchive'] or /root/env/param[@name = 'sensitiveData']))) and ((not(/root/env/param[@name = 'm_button_pressed'])) or (/root/env/param[@name = 'm_button_pressed'] != 'cancel'))">
  150. <xsl:value-of select="'true'"/>
  151. </xsl:when>
  152. <xsl:otherwise>
  153. <xsl:value-of select="'false'"/>
  154. </xsl:otherwise>
  155. </xsl:choose>
  156. </xsl:variable>
  157. <xts:sequence>
  158. <!-- Reset editPword -->
  159. <xts:replace select="/root/env/param[@name = 'editPword']">
  160. <param name="editPword">
  161. <xsl:value-of select="'false'"/>
  162. </param>
  163. </xts:replace>
  164. <xsl:choose>
  165. <xsl:when test="not(/root/env/param[@name='displayPass'])">
  166. <xts:append select="/root/env">
  167. <param name="displayPass">
  168. <xsl:value-of select="$pass_fault"/>
  169. </param>
  170. </xts:append>
  171. </xsl:when>
  172. <xsl:otherwise>
  173. <xts:replace select="/root/env/param[@name='displayPass']">
  174. <param name="displayPass">
  175. <xsl:value-of select="$pass_fault"/>
  176. </param>
  177. </xts:replace>
  178. </xsl:otherwise>
  179. </xsl:choose>
  180. </xts:sequence>
  181. </xsl:template>
  182. </xsl:stylesheet>
  183. </xts:block>
  184. <!--
  185. ===============================================================================================
  186. processArchiveOptions
  187. ===============================================================================================
  188. -->
  189. <xts:block id="processArchiveOptions" processor="XSLT" type="exec" nodelist="archiveOptions" dependency="formlogic_init faultProcessor" mandatory="false" condition=".[/root/env/param[@name='m_class'] = 'importDeployment']">
  190. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  191. <xsl:template match="/">
  192. <xts:sequence>
  193. <xts:delete select="/root/archiveOptions/*[local-name()='getDeploymentOptionsResponse']/*[local-name()='deploymentOptions']/*[local-name()='deploymentOption'][@name='preserveStoreIDs']"/>
  194. </xts:sequence>
  195. </xsl:template>
  196. </xsl:stylesheet>
  197. </xts:block>
  198. <!--
  199. ===============================================================================================
  200. Get the list of archive packages from Content Manager or /root/env/param[@name = 'm_archiveOptions'] into /root/archiveOptions
  201. ===============================================================================================
  202. -->
  203. <xts:block id="encodeArchiveOptions" processor="XSLT" type="exec" dependency="processArchiveOptions" mandatory="false" condition=".[/root/env/param[@name='m_class'] = 'importDeployment' and /root/env/param[@name='displayPass'] = 'false']">
  204. <xts:logicsheet path="logicsheets/deploymentlogic.xsl"/>
  205. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  206. <xts:logicsheet path="logicsheets/portal.xsl"/>
  207. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:bus="http://developer.cognos.com/schemas/bibus/1/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:dpl="http://developer.cognos.com/schemas/xts/logicsheets/deployment/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  208. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  209. <pf:variables/>
  210. <pf:serialize-xml/>
  211. <xsl:template match="/">
  212. <xsl:if test="/root/archiveOptions">
  213. <xts:sequence>
  214. <xsl:variable name="serialized_options">
  215. <xsl:call-template name="serialize-xml">
  216. <xsl:with-param name="node-set" select="/root/archiveOptions"/>
  217. </xsl:call-template>
  218. </xsl:variable>
  219. <xts:delete select="/root/env/param[@name = 'm_archiveOptions']"/>
  220. <xts:append select="/root/env">
  221. <param name="m_archiveOptions">
  222. <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($serialized_options), true()))"/>
  223. </param>
  224. </xts:append>
  225. </xts:sequence>
  226. </xsl:if>
  227. </xsl:template>
  228. </xsl:stylesheet>
  229. </xts:block>
  230. <!--
  231. ===============================================================================================
  232. Process state parameters
  233. ===============================================================================================
  234. -->
  235. <xts:block id="processPassedVars" processor="XSLT" type="exec" dependency="formlogic_init encodeArchiveOptions" mandatory="false" condition=".[/root/env/param[@name='displayPass'] = 'false']">
  236. <xts:logicsheet path="logicsheets/deploymentlogic.xsl"/>
  237. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  238. <xts:logicsheet path="logicsheets/portal.xsl"/>
  239. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:bus="http://developer.cognos.com/schemas/bibus/1/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:dpl="http://developer.cognos.com/schemas/xts/logicsheets/deployment/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  240. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  241. <pf:variables/>
  242. <xsl:template match="/">
  243. <xsl:variable name="targetMorphlet" select="concat('/',key('env-param','m_targetMorphlet'))"/>
  244. <xsl:variable name="callerMorphlet" select="key('env-param','m_callerMorphlet')"/>
  245. <xts:sequence>
  246. <xsl:choose>
  247. <xsl:when test="/root/env/param[@name = 'm_button_pressed'] = 'cancel'">
  248. <xsl:for-each select="/root/env/param[starts-with(@name,'state_')]">
  249. <xsl:variable name="varName"><xsl:value-of select="substring-after((./@name),'state_')"/></xsl:variable>
  250. <xts:replace>
  251. <xsl:attribute name="select">
  252. <xsl:text>/root/env/param[@name='</xsl:text>
  253. <xsl:value-of select="$varName"/>
  254. <xsl:text>']</xsl:text>
  255. </xsl:attribute>
  256. <param name="{$varName}">
  257. <xsl:value-of select="."/>
  258. </param>
  259. </xts:replace>
  260. </xsl:for-each>
  261. <xts:replace select="/root/env/param[@name = 'm']">
  262. <param name="m">
  263. <xsl:value-of select="$callerMorphlet"/>
  264. </param>
  265. </xts:replace>
  266. </xsl:when>
  267. <xsl:otherwise>
  268. <xts:replace select="/root/env/param[@name = 'm']">
  269. <param name="m">
  270. <xsl:value-of select="concat($app,$targetMorphlet)"/>
  271. </param>
  272. </xts:replace>
  273. </xsl:otherwise>
  274. </xsl:choose>
  275. <!-- Remove state variables. -->
  276. <xts:delete select="/root/env/param[starts-with(@name,'state_')]"/>
  277. <!-- Remove the m_targetMorphlet -->
  278. <xts:delete select="/root/env/param[@name = 'm_targetMorphlet']"/>
  279. <!-- Remove the m_callerMorphlet -->
  280. <xts:delete select="/root/env/param[@name = 'm_callerMorphlet']"/>
  281. </xts:sequence>
  282. </xsl:template>
  283. </xsl:stylesheet>
  284. </xts:block>
  285. <!--
  286. ===============================================================================================
  287. main
  288. ===============================================================================================
  289. -->
  290. <xts:block id="main" type="exec" mode="output" mimeType="text/html" processor="XSLT" dependency="formlogic_init processPassedVars faultProcessor encodeArchiveOptions">
  291. <!-- portal specific information -->
  292. <xts:logicsheet path="logicsheets/portal.xsl"/>
  293. <!-- get the presentation theme -->
  294. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  295. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  296. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  297. <!-- apply the form logic -->
  298. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  299. <!-- Keeps the status line clean. -->
  300. <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  301. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 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">
  302. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  303. <!-- Get the portal common variables. -->
  304. <pf:variables/>
  305. <xsl:variable name="mname" select="'deployment_password.xts'"/>
  306. <xsl:variable name="back-url"/>
  307. <xsl:template match="/">
  308. <xsl:variable name="object-name" select="key('env-param','m_name')"/>
  309. <xsl:variable name="title" select="key('env-param','credential_title')"/>
  310. <xsl:variable name="browser-title">
  311. <xsl:choose>
  312. <xsl:when test="$title != ''">
  313. <xsl:value-of select="$title"/>
  314. </xsl:when>
  315. <xsl:when test="$object-name != ''">
  316. <xts:string id="IDS_PROP_SIGNON_CREDENTIALS_TITLE">
  317. <xts:param name="objectName">
  318. <xsl:value-of select="$object-name"/>
  319. </xts:param>
  320. </xts:string>
  321. </xsl:when>
  322. <xsl:otherwise>
  323. <xts:string id="IDS_PROP_SIGNON_CREDENTIALS_TITLE_NO_OBJECT"/>
  324. </xsl:otherwise>
  325. </xsl:choose>
  326. </xsl:variable>
  327. <!-- Start the HTML -->
  328. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browser-title">
  329. <dp:meta>
  330. <!-- Standard meta tags -->
  331. <pf:meta/>
  332. </dp:meta>
  333. <dp:script>
  334. <pf:help context="HID_DEPLOY"/>
  335. <xsl:choose>
  336. <xsl:when test="/root/env/param[@name = 'displayPass'] = 'false'">
  337. <script language="JavaScript">
  338. function init()
  339. {
  340. if (document.pform.revisiting.value == "false")
  341. {
  342. <!-- pop or maintain -->
  343. if (document.pform.m_button_pressed &amp;&amp; document.pform.m_button_pressed.value == 'cancel' &amp;&amp; document.pform.m_operation_cancel &amp;&amp; document.pform.m_operation_cancel.value != '')
  344. {
  345. document.pform.ps_nav_op.value = document.pform.m_operation_cancel.value;
  346. document.pform.m_operation_cancel.value = '';
  347. }
  348. else
  349. {
  350. <!-- drop or maintain -->
  351. if (document.pform.m_operation &amp;&amp; document.pform.m_operation.value != '')
  352. {
  353. document.pform.ps_nav_op.value = document.pform.m_operation.value;
  354. document.pform.m_operation.value = '';
  355. }
  356. }
  357. <!-- Reset the m_button_pressed -->
  358. if (document.pform.m_button_pressed &amp;&amp; document.pform.m_button_pressed.value != '')
  359. {
  360. document.pform.m_button_pressed.value='';
  361. }
  362. document.pform.revisiting.value = "true";
  363. <!-- Reset the displayPass -->
  364. document.pform.displayPass.value = '';
  365. document.pform.submit();
  366. }
  367. else
  368. {
  369. if (document.pform.direction.value == "forward")
  370. {
  371. document.pform.direction.value = "back";
  372. window.history.go(1);
  373. }
  374. else
  375. {
  376. document.pform.direction.value = "forward";
  377. window.history.go(-1);
  378. }
  379. }
  380. }
  381. </script>
  382. </xsl:when>
  383. <xsl:otherwise>
  384. <script language="JavaScript" src="{$webcontent}/{$app}/js/utilities.js"/>
  385. <script language="JavaScript">
  386. function clearPasswords()
  387. {
  388. var f = document.pform;
  389. f.m_signon_password.value = '';
  390. if (f.m_signon_confirm_password)
  391. {
  392. f.m_signon_confirm_password.value = '';
  393. }
  394. }
  395. var isFocusOnBox='false';
  396. function init()
  397. {
  398. <xsl:if test="/root/archiveOptions/copyFault/fault and /root/archiveOptions/copyFault/fault/*[local-name() = 'exception']/*[local-name() = 'exceptionDetail']/*[local-name() = 'exception']/errorCode != 'cmArchiveEncrypted'">
  399. alert('<xsl:for-each select="/root/archiveOptions/copyFault/fault/*[local-name() = 'exception']/*[local-name() = 'exceptionDetail']/*[local-name() = 'exception']/*[local-name() = 'message']"><xsl:value-of select="xtsext:javascriptencode(string(./messageString))"/><xsl:value-of select="' '"/></xsl:for-each>')
  400. </xsl:if>
  401. document.pform.m_signon_password.focus();
  402. setFocus('true');
  403. }
  404. function validate()
  405. {
  406. var f = document.pform;
  407. <xsl:if test="key('env-param','m_class') = 'exportDeployment'">
  408. if (document.pform.m_signon_password.value.length &lt; 8)
  409. {
  410. alert("<xts:string id="IDS_DEPLOYMENT_PASSWORD_SIZE_LIMIT_WARNING" encode="javascript"/>");
  411. document.pform.m_signon_password.focus();
  412. document.pform.m_signon_password.select();
  413. return false;
  414. }
  415. </xsl:if>
  416. <xsl:if test="key('env-param','m_class') = 'importDeployment'">
  417. if (document.pform.m_signon_password.value.length &lt; 8)
  418. {
  419. alert("<xts:string id="IDS_DEPLOYMENT_PASSWORD_WARNING" encode="javascript"/>");
  420. document.pform.m_signon_password.focus();
  421. document.pform.m_signon_password.select();
  422. return false;
  423. }
  424. </xsl:if>
  425. <xsl:if test="key('env-param','m_class') != 'importDeployment'">
  426. if (f.m_signon_password.value != f.m_signon_confirm_password.value)
  427. {
  428. alert("<xts:string id="IDS_ERR_0003_PASSWORD_VERIF_FAILED" encode="javascript"/>");
  429. document.pform.m_signon_password.focus();
  430. return false;
  431. }
  432. </xsl:if>
  433. return true;
  434. }
  435. function setFocus(bFocus)
  436. {
  437. isFocusOnBox=bFocus;
  438. }
  439. function handleKeyDown()
  440. {
  441. <xsl:if test="$browser='ie' ">
  442. keyPressed = event.keyCode;
  443. if (keyPressed == 13)
  444. {
  445. if (window.event.returnValue != false)
  446. {
  447. window.event.returnValue = false;
  448. return false;
  449. }
  450. if (window.event.returnValue == false)
  451. {
  452. window.event.cancelBubble = true;
  453. return false;
  454. }
  455. window.event.returnValue = false;
  456. return false;
  457. }
  458. </xsl:if>
  459. }
  460. </script>
  461. </xsl:otherwise>
  462. </xsl:choose>
  463. </dp:script>
  464. <xsl:choose>
  465. <xsl:when test="/root/env/param[@name = 'displayPass'] = 'false'">
  466. <utml:form name="pform" method="post" action="{$gateway}">
  467. <utml:input type="hidden" name="revisiting" utml:update="false">
  468. <utml:value>
  469. <xsl:value-of select="'false'"/>
  470. </utml:value>
  471. </utml:input>
  472. <utml:input type="hidden" name="direction" utml:update="false"/>
  473. <xsl:if test="/root/env/param[@name = 'm_button_pressed']">
  474. <utml:input type="hidden" name="m_button_pressed"/>
  475. </xsl:if>
  476. </utml:form>
  477. </xsl:when>
  478. <xsl:otherwise>
  479. <utml:form name="pform" method="post" action="{$gateway}">
  480. <dp:header>
  481. <dp:close>
  482. <utml:a utml:op="maintain" onClick="javascript:document.pform.m_signon_pwd_changed.value='0';document.pform.m_button_pressed.value='cancel'"><dp:closeMarker/></utml:a>
  483. </dp:close>
  484. <dp:title>
  485. <xsl:value-of select="$browser-title"/>
  486. </dp:title>
  487. </dp:header>
  488. <utml:input type="hidden" name="m_button_pressed"/>
  489. <utml:input type="hidden" name="m_signon_pwd_changed" utml:update="false" value="0"/>
  490. <lyt:layout style="1" border="no">
  491. <lyt:section>
  492. <dp:input>
  493. <dp:section1 id="lbl_signon_password">
  494. <xts:string id="IDS_PASSWORD"/>
  495. </dp:section1>
  496. <dp:section2>
  497. <utml:input type="password" size="53" name="m_signon_password" aria-labelledby="lbl_signon_password" utml:update="false" onchange="document.pform.m_signon_pwd_changed.value='1'" onfocus="this.select();setFocus('true')" onblur="setFocus('false')" onKeyDown="handleKeyDown()">
  498. <utml:value>
  499. <xsl:choose>
  500. <xsl:when test="key('env-param','m_class') = 'importDeployment' or key('env-param','m_class') = 'exportDeployment'">
  501. <xsl:if test="key('env-param','m_archiveEncryptPword')">
  502. <!-- There is no need to localize this, it's simply a dummy value used to
  503. make *** appear in the password field. -->
  504. <xsl:text>###PASSWORD###</xsl:text>
  505. </xsl:if>
  506. </xsl:when>
  507. <xsl:otherwise>
  508. <xsl:if test="not(key('env-param','m_signon_pwd_specified')='0')">
  509. <!-- There is no need to localize this, it's simply a dummy value used to
  510. make *** appear in the password field. -->
  511. <xsl:text>###PASSWORD###</xsl:text>
  512. </xsl:if>
  513. </xsl:otherwise>
  514. </xsl:choose>
  515. </utml:value>
  516. </utml:input>
  517. <xsl:if test="$browser = 'moz' ">
  518. <script language="JavaScript">
  519. window.captureEvents(Event.KEYPRESS);
  520. function keyhandler(e)
  521. {
  522. var Key;
  523. Key = e.which;
  524. if (Key==13)
  525. {
  526. if (isFocusOnBox == 'true')
  527. return false;
  528. }
  529. }
  530. window.onkeypress = keyhandler;
  531. </script>
  532. </xsl:if>
  533. </dp:section2>
  534. </dp:input>
  535. <xsl:if test="key('env-param','m_class') != 'importDeployment'">
  536. <dp:input>
  537. <dp:section1 id="lbl_signon_confirm_password">
  538. <xts:string id="IDS_CONFIRM_PASSWORD"/>
  539. </dp:section1>
  540. <dp:section2>
  541. <utml:input type="password" size="53" name="m_signon_confirm_password" aria-labelledby="lbl_signon_confirm_password" utml:update="false" onfocus="this.select();">
  542. <utml:value>
  543. <xsl:choose>
  544. <xsl:when test="key('env-param','m_class') = 'exportDeployment'">
  545. <xsl:if test="key('env-param','m_archiveEncryptPword')">
  546. <xsl:text>###PASSWORD###</xsl:text>
  547. </xsl:if>
  548. </xsl:when>
  549. <xsl:otherwise>
  550. <xsl:if test="not(key('env-param','m_signon_pwd_specified')='0')">
  551. <!-- There is no need to localize this, it's simply a dummy value used to make *** appear in the password field. -->
  552. <xsl:text>###PASSWORD###</xsl:text>
  553. </xsl:if>
  554. </xsl:otherwise>
  555. </xsl:choose>
  556. </utml:value>
  557. </utml:input>
  558. </dp:section2>
  559. </dp:input>
  560. </xsl:if>
  561. </lyt:section>
  562. </lyt:layout>
  563. <dp:footer>
  564. <df:button df:id="IDS_OK" utml:validate="true" df:style="maintain" onClick="javascript:document.pform.m_button_pressed.value='ok'">
  565. <df:target>
  566. <xsl:value-of select="concat($app, '/deployment_password.xts')"/>
  567. </df:target>
  568. </df:button>
  569. <df:button df:id="IDS_CANCEL" df:style="maintain" onClick="javascript:document.pform.m_signon_pwd_changed.value='0';document.pform.m_button_pressed.value='cancel'">
  570. <df:target>
  571. <xsl:value-of select="concat($app, '/deployment_password.xts')"/>
  572. </df:target>
  573. </df:button>
  574. </dp:footer>
  575. </utml:form>
  576. </xsl:otherwise>
  577. </xsl:choose>
  578. </dp:page>
  579. </xsl:template>
  580. </xsl:stylesheet>
  581. </xts:block>
  582. <!--
  583. ===============================================================================================
  584. debug - display debug information
  585. ===============================================================================================
  586. -->
  587. <xts:block id="debug" dependency="main" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  588. <!-- get the debug logic sheet -->
  589. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  590. <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">
  591. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  592. <xsl:template match="/">
  593. <dbg:dumpxml select="/root"/>
  594. </xsl:template>
  595. </xsl:stylesheet>
  596. </xts:block>
  597. </xts:morphlet>