presentation.xsl 71 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939
  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, 2019
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xsl:stylesheet version="1.0"
  9. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  10. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  11. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  12. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  13. xmlns:out="dummy-uri"
  14. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  15. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  16. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  17. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" exclude-result-prefixes="xsl dp dt cp xtsext xts utml cm">
  18. <xsl:output method="xml" encoding="UTF-8" indent="no"/>
  19. <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
  20. <!--
  21. dp:button
  22. dp:buttonGroup
  23. dp:buttonImage
  24. dp:choice
  25. dp:closeMarker
  26. dp:columnButton
  27. dp:columnButtonGroup
  28. dp:description
  29. dp:division
  30. dp:field
  31. dp:footer
  32. dp:group
  33. dp:groupItem
  34. dp:header
  35. dp:hint
  36. dp:inactiveText
  37. dp:input
  38. dp:label
  39. dp:list
  40. dp:message
  41. dp:page
  42. dp:script
  43. dp:section
  44. dp:section1
  45. dp:section2
  46. dp:section3
  47. dp:text
  48. dp:textarea
  49. -->
  50. <!--
  51. CODE WILL NOT PASS BETWEEN THE FOLLOWING TAGS
  52. <dp:input> and <dp:section*>
  53. <dp:section> and <dp:*> - in lists
  54. <dp:textarea> and <dp:section*>
  55. -->
  56. <xsl:variable name="dp-namespace-uri"
  57. select="'http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/'"/>
  58. <!--
  59. dp:box - provides side by side compartments with spacing between them.
  60. -->
  61. <xsl:template match="dp:box">
  62. <table border="0" cellspacing="0" cellpadding="1" role="presentation">
  63. <xsl:if test="@width">
  64. <xsl:attribute name="width">
  65. <xsl:value-of select="@width"/>
  66. </xsl:attribute>
  67. </xsl:if>
  68. <xsl:if test="@title">
  69. <tr>
  70. <td nowrap="nowrap" colspan="{2 * count(descendant::dp:section) - 1}" class="formLabel">
  71. <xts:string id="{@title}"/>
  72. </td>
  73. </tr>
  74. </xsl:if>
  75. <tr>
  76. <xsl:if test="@valign">
  77. <xsl:attribute name="valign"><xsl:value-of select="@valign"/></xsl:attribute>
  78. </xsl:if>
  79. <xsl:apply-templates/>
  80. </tr>
  81. <xsl:if test="not(@noSpace) or @noSpace = 'false'">
  82. <tr>
  83. <td nowrap="nowrap">
  84. </td>
  85. </tr>
  86. </xsl:if>
  87. </table>
  88. </xsl:template>
  89. <!--
  90. dp:boxSection - containers in a box.
  91. -->
  92. <xsl:template match="dp:boxSection">
  93. <td>
  94. <xsl:if test="not(@wrap)">
  95. <xsl:attribute name="nowrap">nowrap</xsl:attribute>
  96. </xsl:if>
  97. <xsl:if test="@width">
  98. <xsl:attribute name="width">
  99. <xsl:value-of select="@width"/>
  100. </xsl:attribute>
  101. </xsl:if>
  102. <xsl:if test="@height">
  103. <xsl:attribute name="height">
  104. <xsl:value-of select="@height"/>
  105. </xsl:attribute>
  106. </xsl:if>
  107. <xsl:if test="@align">
  108. <xsl:attribute name="align">
  109. <xsl:value-of select="@align"/>
  110. </xsl:attribute>
  111. </xsl:if>
  112. <xsl:if test="@valign">
  113. <xsl:attribute name="valign">
  114. <xsl:value-of select="@valign"/>
  115. </xsl:attribute>
  116. </xsl:if>
  117. <div>
  118. <xsl:attribute name="class">
  119. <xsl:choose>
  120. <xsl:when test="@type='label'">formLabel</xsl:when>
  121. <xsl:otherwise>formText</xsl:otherwise>
  122. </xsl:choose>
  123. </xsl:attribute>
  124. <xsl:apply-templates select="child::node()"/>
  125. </div>
  126. </td>
  127. <xsl:if test="@hgap">
  128. <td nowrap="nowrap">
  129. </td>
  130. </xsl:if>
  131. </xsl:template>
  132. <xsl:template match="dp:defaultKey">
  133. <xsl:if test=".='active'">
  134. <script type="text/javascript">
  135. var whatfocus='';
  136. function setfocus(type)
  137. {
  138. whatfocus=type;
  139. }
  140. <out:choose>
  141. <out:when test="$browser='ie' or $browser = 'safari'">
  142. document.onkeypress = keyhandler;
  143. function keyhandler() {
  144. var Key;
  145. Key = window.event.keyCode;
  146. if (Key==13)
  147. {
  148. if(whatfocus!='textarea')
  149. {
  150. <!-- the following condition check does NOT work if changed to == true -->
  151. <!-- must be some IE thing -->
  152. if (window.event.returnValue != false)
  153. {
  154. enterdfaultact();
  155. window.event.returnValue = false;
  156. return false;
  157. }
  158. <!-- The following IF condition is to stop IE from continuing to process the Enter event,
  159. even though we've trapped it and set everything (that needs to be set) to false! -->
  160. if (window.event.returnValue == false)
  161. {
  162. window.event.cancelBubble = true;
  163. return false;
  164. }
  165. window.event.returnValue = false;
  166. return false;
  167. }
  168. }
  169. }
  170. </out:when>
  171. <out:when test="$browser = 'moz'">
  172. <!--
  173. Order is essential to get this to work on NS versions 4.76/6.x/7.x
  174. 1. Enable event capturing for the window (Event.KEYPRESS).
  175. 2. Define the function that is to handle the event (keyhandler).
  176. 3. Register the function as the windows event handler (onkeypress).
  177. -->
  178. window.captureEvents(Event.KEYPRESS);
  179. function keyhandler(e) {
  180. var Key;
  181. Key = e.which;
  182. if (Key==13)
  183. {
  184. if (whatfocus!='textarea')
  185. return enterdfaultact();
  186. }
  187. }
  188. window.onkeypress = keyhandler;
  189. </out:when>
  190. </out:choose>
  191. </script>
  192. </xsl:if>
  193. </xsl:template>
  194. <xsl:template match="dp:defaultAct">
  195. <out:variable name="da">
  196. <xsl:copy-of select="."/>
  197. </out:variable>
  198. <script language="JavaScript">
  199. function enterdfaultact()
  200. {
  201. <out:value-of select="$da"/>
  202. return false;
  203. }
  204. </script>
  205. </xsl:template>
  206. <xsl:template match="dp:defaultBack">
  207. <out:variable name="hf">
  208. <xsl:copy-of select="."/>
  209. </out:variable>
  210. <script language="JavaScript">
  211. function enterdfaultact()
  212. {
  213. location.href='<out:value-of select="xtsext:javascriptencode(string($hf))"/>';
  214. return false;
  215. }
  216. </script>
  217. </xsl:template>
  218. <!-- ===== Creates a column of buttons (mostly for adding or deleting entries from a list) ===== -->
  219. <xsl:template match="dp:columnButtonGroup">
  220. <xsl:variable name="labelID">
  221. <xsl:value-of select="@label"/>
  222. <xsl:if test="@parentLabel">_<xsl:value-of select="@parentLabel"/><xsl:text> </xsl:text><xsl:value-of select="@parentLabel"/></xsl:if>
  223. </xsl:variable>
  224. <table border="0" cellpadding="1" cellspacing="5" role="toolbar" >
  225. <xsl:if test="not(@skipColumnButtons = 'true')">
  226. <xsl:attribute name="aria-controls"><xsl:text/><xsl:for-each select="dp:columnButton"><xsl:text>columnButton_</xsl:text><xsl:value-of select="generate-id()"/><xsl:if test="position() != last()"><xsl:text> </xsl:text></xsl:if></xsl:for-each><xsl:text/></xsl:attribute>
  227. </xsl:if>
  228. <xsl:attribute name="aria-labelledby"><xsl:value-of select="$labelID"/></xsl:attribute>
  229. <xsl:for-each select="dp:columnButton">
  230. <tr>
  231. <xsl:choose>
  232. <xsl:when test="../@skipColumnButtons = 'true'"><xsl:apply-templates select="./*/*"><xsl:with-param name="label"><xsl:value-of select="$labelID"/></xsl:with-param><xsl:with-param name="buttonId">columnButton_<xsl:value-of select="generate-id()"/></xsl:with-param></xsl:apply-templates></xsl:when>
  233. <xsl:otherwise><xsl:apply-templates select="."><xsl:with-param name="label"><xsl:value-of select="$labelID"/></xsl:with-param><xsl:with-param name="buttonId">columnButton_<xsl:value-of select="generate-id()"/></xsl:with-param></xsl:apply-templates></xsl:otherwise>
  234. </xsl:choose>
  235. </tr>
  236. </xsl:for-each>
  237. </table>
  238. </xsl:template>
  239. <xsl:template match="dp:columnButton">
  240. <xsl:param name="buttonId"/>
  241. <xsl:param name="label"/>
  242. <!--
  243. Creates a button in the column.
  244. Uses the toolbar images stuff.
  245. -->
  246. <xsl:choose>
  247. <xsl:when test="not(*[self::dp:button])">
  248. <td id="{$buttonId}" role="presentation">
  249. <xsl:choose>
  250. <xsl:when test="@style='commandButton'">
  251. <!-- need to give the table mouseover properties if the user did not supply dp:button -->
  252. <xsl:attribute name="class"><xsl:text>commandButton</xsl:text></xsl:attribute>
  253. <xsl:attribute name="onmouseover"><xsl:text>this.className = 'commandButtonOver'</xsl:text></xsl:attribute>
  254. <xsl:attribute name="onmousedown"><xsl:text>this.className = 'commandButtonDown'</xsl:text></xsl:attribute>
  255. <xsl:attribute name="onmouseout"><xsl:text>this.className = 'commandButton'</xsl:text></xsl:attribute>
  256. </xsl:when>
  257. <xsl:when test="not( dp:button )">
  258. <!-- need to give the table mouseover properties if the user did not supply dp:button -->
  259. <xsl:attribute name="class"><xsl:text>toolbarImageNormal</xsl:text></xsl:attribute>
  260. <xsl:attribute name="onmouseover"><xsl:text>this.className = 'toolbarImageOver'</xsl:text></xsl:attribute>
  261. <xsl:attribute name="onmouseout"><xsl:text>this.className = 'toolbarImageNormal'</xsl:text></xsl:attribute>
  262. </xsl:when>
  263. </xsl:choose>
  264. <xsl:apply-templates mode="colButton"><xsl:with-param name="id"><xsl:value-of select="$buttonId"/>_text</xsl:with-param></xsl:apply-templates>
  265. </td>
  266. </xsl:when>
  267. <xsl:otherwise>
  268. <xsl:apply-templates mode="colButton"><xsl:with-param name="id"><xsl:value-of select="$buttonId"/>_text</xsl:with-param></xsl:apply-templates>
  269. </xsl:otherwise>
  270. </xsl:choose>
  271. </xsl:template>
  272. <xsl:template match="*" mode="colButton">
  273. <xsl:param name="id"/>
  274. <xsl:apply-templates select="."/>
  275. </xsl:template>
  276. <xsl:template match="a" mode="colButton">
  277. <xsl:param name="id"/>
  278. <a id="{$id}" role="button" aria-labelledby="{$id}">
  279. <xsl:copy-of select="@*"/>
  280. <xsl:copy-of select="./*"/>
  281. </a>
  282. </xsl:template>
  283. <!--
  284. dp:button - buttons, usually in the dp:footer
  285. -->
  286. <xsl:template match="dp:button">
  287. <td>
  288. <xsl:if test="@id">
  289. <script language="JavaScript">
  290. var <xsl:value-of select="@id"/>_enabled = true;
  291. function <xsl:value-of select="@id"/>_enable()
  292. {
  293. <xsl:value-of select="@id"/>_enabled = true;
  294. document.getElementById('<xsl:value-of select="@id"/>').className = "commandButtonActive";
  295. }
  296. function <xsl:value-of select="@id"/>_disable()
  297. {
  298. <xsl:value-of select="@id"/>_enabled = false;
  299. document.getElementById('<xsl:value-of select="@id"/>').className = "commandButtonInactive";
  300. }
  301. function <xsl:value-of select="@id"/>_isEnabled()
  302. {
  303. return <xsl:value-of select="@id"/>_enabled;
  304. }
  305. function <xsl:value-of select="@id"/>_mouseaction(obj, action)
  306. {
  307. var isEnabled = <xsl:value-of select="@id"/>_enabled;
  308. if (isEnabled)
  309. {
  310. switch (action)
  311. {
  312. case "over": obj.className = 'commandButtonOver'; break;
  313. case "out": obj.className = 'commandButton'; break;
  314. case "down": obj.className = 'commandButtonDown'; break;
  315. default:
  316. }
  317. }
  318. }
  319. </script>
  320. </xsl:if>
  321. <script language="JavaScript">
  322. function dispatchClickToChildAnchor(topElement){
  323. var anchorObjs = topElement.getElementsByTagName("A");
  324. if (anchorObjs.length == 0){
  325. return true;
  326. }
  327. var anchorObj = anchorObjs[0];
  328. if( document.createEvent )
  329. {
  330. var evt = document.createEvent('MouseEvents');
  331. evt.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  332. return anchorObj.dispatchEvent(evt);
  333. }
  334. else if( document.createEventObject )
  335. {
  336. return anchorObj.fireEvent('onClick');
  337. }
  338. }
  339. function handleButtonClickOutsideAnchor(event){
  340. var targetEl = event.target
  341. if (!targetEl){
  342. targetEl = event.srcElement;
  343. }
  344. //if the click came from the anchor then we want to just return
  345. if ((targetEl == null) || (targetEl.nodeName.toLowerCase() == 'a')){
  346. return true;
  347. }
  348. //if the click came from anywhere else then we want to pass that down to the
  349. //anchor
  350. return dispatchClickToChildAnchor(targetEl);
  351. }
  352. </script>
  353. <table cellpadding="0" cellspacing="0" summary="" role="presentation" onclick="javascript:handleButtonClickOutsideAnchor(event)">
  354. <!-- Add event handlers for "active buttons" -->
  355. <xsl:choose>
  356. <xsl:when test="@id">
  357. <xsl:attribute name="id"><xsl:value-of select="@id"/>_button</xsl:attribute>
  358. <xsl:attribute name="onmouseover"><xsl:value-of select="@id"/>_mouseaction(this, 'over')</xsl:attribute>
  359. <xsl:attribute name="onmouseout"><xsl:value-of select="@id"/>_mouseaction(this, 'out')</xsl:attribute>
  360. <xsl:attribute name="onmousedown"><xsl:value-of select="@id"/>_mouseaction(this, 'down')</xsl:attribute>
  361. </xsl:when>
  362. <xsl:when test="not(@id) and not(@state='inactive')">
  363. <xsl:attribute name="onmouseover">this.className = 'commandButtonOver'</xsl:attribute>
  364. <xsl:attribute name="onmouseout">this.className = 'commandButton'</xsl:attribute>
  365. <xsl:attribute name="onmousedown">this.className = 'commandButtonDown'</xsl:attribute>
  366. </xsl:when>
  367. </xsl:choose>
  368. <!-- Style the button according to state -->
  369. <xsl:choose>
  370. <xsl:when test="@state = 'inactive'">
  371. <xsl:attribute name="class">commandButtonInactive</xsl:attribute>
  372. <out:attribute name="style">padding-right:10px; padding-left:10px; </out:attribute>
  373. </xsl:when>
  374. <xsl:otherwise>
  375. <xsl:attribute name="class">commandButton</xsl:attribute>
  376. <out:attribute name="style">padding-right:10px; padding-left:10px;</out:attribute>
  377. </xsl:otherwise>
  378. </xsl:choose>
  379. <tr>
  380. <td valign="middle" align="center" nowrap="nowrap">
  381. <!--
  382. The OK button is a bit unique on none ie browsers.
  383. We like to add extra padding on anchors that wrap 'OK' to beef up the hot spot area.
  384. -->
  385. <xsl:if test="not(@id)">
  386. <out:variable name="produceId"><xsl:value-of select="string(.//dp:df_no_id)"/></out:variable>
  387. <out:if test="$produceId != 'true'">
  388. <out:variable name="OKButton">
  389. <xsl:copy-of select=".//dp:buttonText/child::node()"/>
  390. </out:variable>
  391. <out:attribute name="id">
  392. <out:choose>
  393. <out:when test="$browser = 'ie'">btnAnchorIE</out:when>
  394. <out:when test="$OKButton = 'OK'">btnAnchorWide</out:when>
  395. <out:otherwise>btnAnchor</out:otherwise>
  396. </out:choose>
  397. </out:attribute>
  398. </out:if>
  399. </xsl:if>
  400. <!-- minimum button width as specified by STAN -->
  401. <out:choose>
  402. <out:when test="$browser = 'ie'">
  403. <xsl:choose>
  404. <xsl:when test="@state = 'inactive'"> <!-- The width fixing image size depends on whether or not the button is active, as the 10px padding applies to different elements in each case -->
  405. <img style="float:left;" height="1" border="0" width="50" src="{'{$webcontent}'}/images/space.gif" alt=""/>
  406. </xsl:when>
  407. <xsl:otherwise>
  408. <img style="float:left;" height="1" border="0" width="70" src="{'{$webcontent}'}/images/space.gif" alt=""/>
  409. </xsl:otherwise>
  410. </xsl:choose>
  411. </out:when>
  412. <out:otherwise>
  413. <img style="float:left;" height="1" width="55" src="{'{$webcontent}'}/images/space.gif" alt=""/>
  414. </out:otherwise>
  415. </out:choose>
  416. <!-- Insert the button content text/images -->
  417. <div>
  418. <out:choose>
  419. <out:when test="$browser = 'ie'">
  420. <out:attribute name="style">float: left; width: 100%; padding-bottom: 1px; padding-top: 4px;</out:attribute>
  421. </out:when>
  422. <out:otherwise>
  423. <out:attribute name="style">float: left; width: 100%; padding-bottom: 1px; padding-top: 3px;</out:attribute>
  424. </out:otherwise>
  425. </out:choose>
  426. <xsl:apply-templates select="./*[local-name()!='df_no_id']"/>
  427. </div>
  428. </td>
  429. </tr>
  430. </table>
  431. </td>
  432. <td>
  433. <img height="1" width="10" src="{'{$webcontent}'}/images/space.gif" alt=""/>
  434. </td>
  435. </xsl:template>
  436. <!--
  437. dp:buttonGroup - button groups that aren't in the footer
  438. -->
  439. <xsl:template match="dp:buttonGroup">
  440. <table border="0" cellpadding="0" cellspacing="0" role="presentation">
  441. <tr>
  442. <!-- show the buttons -->
  443. <xsl:apply-templates/>
  444. </tr>
  445. </table>
  446. </xsl:template>
  447. <!--
  448. dp:buttonText
  449. -->
  450. <xsl:template match="dp:buttonText">
  451. <xsl:apply-templates/>
  452. </xsl:template>
  453. <!--
  454. dp:buttonImage
  455. -->
  456. <xsl:template match="dp:buttonImage">
  457. <xsl:param name="state" select="'active'"/>
  458. <xsl:choose>
  459. <!-- if the image if to the left of the text, then put right padding -->
  460. <xsl:when test="@dp:imagePosition = 'left'">
  461. <img style="position:relative; top:1px; right:2px;" align="top" border="0" src="{.}">
  462. <xsl:if test="@name">
  463. <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
  464. </xsl:if>
  465. <xsl:if test="@role">
  466. <xsl:attribute name="role"><xsl:value-of select="@role"/></xsl:attribute>
  467. </xsl:if>
  468. <xsl:if test="@dp:tooltip and @dp:tooltip!=''">
  469. <out:attribute name="alt"><xts:string id="{@dp:tooltip}"/></out:attribute>
  470. </xsl:if>
  471. </img>
  472. </xsl:when>
  473. <xsl:otherwise>
  474. <img style="position:relative; top:1px; left:2px;" align="top" border="0" src="{.}">
  475. <xsl:if test="@name">
  476. <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
  477. </xsl:if>
  478. <xsl:if test="@dp:tooltip and @dp:tooltip!=''">
  479. <out:attribute name="alt"><xts:string id="{@dp:tooltip}"/></out:attribute>
  480. </xsl:if>
  481. </img>
  482. </xsl:otherwise>
  483. </xsl:choose>
  484. </xsl:template>
  485. <!--
  486. dp:choice -2 sections first for the radio button - second for the label
  487. -->
  488. <xsl:template match="dp:choice">
  489. <table border="0" cellspacing="0" cellpadding="1" role="presentation">
  490. <xsl:if test="@width">
  491. <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
  492. </xsl:if>
  493. <xsl:if test="@tabindex">
  494. <xsl:attribute name="tabindex"><xsl:value-of select="@tabindex"/></xsl:attribute>
  495. </xsl:if>
  496. <xsl:if test="@title">
  497. <tr>
  498. <td nowrap="nowrap" class="formLabel">
  499. <xsl:if test="@id">
  500. <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
  501. </xsl:if>
  502. <xsl:choose>
  503. <xsl:when test="@for != ''">
  504. <label for="{@for}"><xts:string id="{@title}"/></label>
  505. </xsl:when>
  506. <xsl:otherwise>
  507. <xts:string id="{@title}"/>
  508. </xsl:otherwise>
  509. </xsl:choose>
  510. </td>
  511. </tr>
  512. </xsl:if>
  513. <xsl:if test="@longTitle">
  514. <tr>
  515. <td nowrap="nowrap" class="formLabel">
  516. <xsl:if test="@id">
  517. <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
  518. </xsl:if>
  519. <out:value-of select="{@longTitle}"/>
  520. </td>
  521. </tr>
  522. </xsl:if>
  523. <tr>
  524. <td>
  525. <xsl:choose>
  526. <xsl:when test="@aria-labelledby">
  527. <xsl:call-template name="dp:choice-emit-div-radiogroup">
  528. <xsl:with-param name="aria-labelledby-value" select="@aria-labelledby"/>
  529. <xsl:with-param name="role" select="@role"/>
  530. </xsl:call-template>
  531. </xsl:when>
  532. <xsl:when test="@id">
  533. <xsl:call-template name="dp:choice-emit-div-radiogroup">
  534. <xsl:with-param name="aria-labelledby-value" select="@id"/>
  535. <xsl:with-param name="role" select="@role"/>
  536. </xsl:call-template>
  537. </xsl:when>
  538. <xsl:otherwise>
  539. <table border="0" cellspacing="0" cellpadding="1" role="presentation">
  540. <xsl:apply-templates select="*[not(local-name() = 'lastSection')]" mode="choice"/>
  541. </table>
  542. </xsl:otherwise>
  543. </xsl:choose>
  544. <!-- Did not include dp:lastSection as part of radiogroup, because a radio button should not be implemented in dp:lastSection if it belongs to the radiogroup-->
  545. </td>
  546. </tr>
  547. <xsl:if test="dp:lastSection">
  548. <tr>
  549. <td>
  550. <xsl:apply-templates select="*[local-name()='lastSection']/*"/>
  551. </td>
  552. </tr>
  553. </xsl:if>
  554. <xsl:if test="not(@noSpace) or @noSpace = 'false'">
  555. <tr>
  556. <td nowrap="nowrap">
  557. </td>
  558. </tr>
  559. </xsl:if>
  560. </table>
  561. </xsl:template>
  562. <xsl:template name="dp:choice-emit-div-radiogroup">
  563. <xsl:param name="aria-labelledby-value"/>
  564. <xsl:param name="role"/>
  565. <xsl:variable name="aria-role">
  566. <xsl:choose>
  567. <xsl:when test="$role != ''"><xsl:value-of select="$role"/></xsl:when>
  568. <xsl:otherwise>radiogroup</xsl:otherwise>
  569. </xsl:choose>
  570. </xsl:variable>
  571. <div role="{$aria-role}">
  572. <xsl:if test="$aria-labelledby-value != ''">
  573. <xsl:attribute name="aria-labelledby">
  574. <xsl:value-of select="$aria-labelledby-value"/>
  575. </xsl:attribute>
  576. </xsl:if>
  577. <table border="0" cellspacing="0" cellpadding="1" role="presentation">
  578. <xsl:apply-templates select="*[not(local-name() = 'lastSection')]" mode="choice"/>
  579. </table>
  580. </div>
  581. </xsl:template>
  582. <!--
  583. dp:closeMarker -this will add the x for the close image in the dialog header
  584. -->
  585. <xsl:template match="dp:closeMarker">
  586. <img id="IDS_CLOSE_ICON" height="16" width="16" vspace="2" border="0" class="dialogClose" onmouseover="this.className = 'dialogCloseOver'" onmouseout="this.className = 'dialogClose'" onmouseup="this.className = 'dialogClose'" role="button">
  587. <xsl:attribute name="src"><xsl:value-of select="'{$skin_images}'"/>close.gif</xsl:attribute>
  588. <out:attribute name="title"><xts:string id="IDS_CLOSE"/></out:attribute>
  589. <out:attribute name="alt"><xts:string id="IDS_CLOSE"/></out:attribute>
  590. </img>
  591. </xsl:template>
  592. <!--
  593. dp:description - body of the dialog page
  594. -->
  595. <xsl:template match="dp:description">
  596. <table border="0" cellpadding="0" cellspacing="0" summary="" role="presentation">
  597. <xsl:choose>
  598. <xsl:when test="@aria-labelledby">
  599. <xsl:attribute name="aria-labelledby"><xsl:value-of select="@aria-labelledby"/></xsl:attribute>
  600. </xsl:when>
  601. <xsl:when test="@aria-label">
  602. <xsl:attribute name="aria-label"><xsl:value-of select="@aria-label"/></xsl:attribute>
  603. </xsl:when>
  604. <xsl:otherwise>
  605. <!-- do nothing -->
  606. </xsl:otherwise>
  607. </xsl:choose>
  608. <tr>
  609. <td width="10" valign="bottom">
  610. <img width="10" alt="">
  611. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  612. </img>
  613. </td>
  614. <td valign="middle" class="dialogHeaderText">
  615. <xsl:copy-of select="child::node()"/>
  616. </td>
  617. </tr>
  618. </table>
  619. <xsl:if test="not(//a[@id='maincontent']) and @mainContentHandled != 'true'">
  620. <div id="maincontent" role="main" tabindex="-1" style="position:absolute; margin-left: -9999px; margin-top:-9999px" >
  621. <out:attribute name="aria-label"><xts:string id="IDS_SECTION508_CONTENT" encode="html" /></out:attribute>
  622. </div>
  623. </xsl:if>
  624. </xsl:template>
  625. <!--
  626. dp:division - adds a division anywhere in the page
  627. -->
  628. <xsl:template match="dp:division">
  629. <table width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation">
  630. <xsl:if test="(@style) and (@style = 'full')">
  631. <tr>
  632. <td height="10" width="100%" colspan="3">
  633. <img height="10" width="1" alt="">
  634. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  635. </img>
  636. </td>
  637. </tr>
  638. </xsl:if>
  639. <tr>
  640. <xsl:if test="(@style) and (@style = 'full')">
  641. <td height="1" width="8">
  642. <img height="1" width="8" alt="">
  643. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  644. </img>
  645. </td>
  646. </xsl:if>
  647. <td valign="middle" nowrap="nowrap" class="formLabel">
  648. <xsl:if test="@title">
  649. <span id="{@title}">
  650. <xts:string id="{@title}"/>
  651. </span>
  652. </xsl:if>&#160;
  653. </td>
  654. <td width="100%" valign="middle">
  655. <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" role="presentation">
  656. <tr>
  657. <td class="dialogDivider">
  658. </td>
  659. </tr>
  660. </table>
  661. </td>
  662. </tr>
  663. <xsl:if test="(@style) and (@style = 'full')">
  664. <tr>
  665. <td height="5" width="1">
  666. </td>
  667. </tr>
  668. </xsl:if>
  669. </table>
  670. </xsl:template>
  671. <!--
  672. dp:field
  673. -->
  674. <xsl:template match="dp:field">
  675. <xsl:copy-of select="child::node()"/>&#160;&#160;
  676. </xsl:template>
  677. <!--
  678. dp:emptyFooter
  679. -->
  680. <xsl:template match="dp:emptyFooter">
  681. <out:variable name="useDIVS_ef">
  682. <xsl:choose>
  683. <xsl:when test="dp:useDIVS">
  684. <xsl:copy-of select="dp:useDIVS/*"/>
  685. </xsl:when>
  686. <xsl:otherwise>
  687. <out:text>true</out:text>
  688. </xsl:otherwise>
  689. </xsl:choose>
  690. </out:variable>
  691. <out:variable name="divAttr_ef">
  692. <xsl:choose>
  693. <xsl:when test="string(@div)='div' ">
  694. <out:text>true</out:text>
  695. </xsl:when>
  696. <xsl:otherwise>
  697. <out:text>false</out:text>
  698. </xsl:otherwise>
  699. </xsl:choose>
  700. </out:variable>
  701. <out:if test="$divAttr_ef='true' and $useDIVS_ef='true' ">
  702. <out:choose>
  703. <out:when test="$browser='moz'">
  704. <out:text disable-output-escaping="yes">&lt;/div&gt;</out:text>
  705. </out:when>
  706. <out:otherwise>
  707. <out:text disable-output-escaping="yes">&lt;/div&gt;</out:text>
  708. <out:text disable-output-escaping="yes">&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</out:text>
  709. </out:otherwise>
  710. </out:choose>
  711. </out:if>
  712. </xsl:template>
  713. <xsl:template match="dp:simpleFooter">
  714. <table width="100%" border="0" cellpadding="0" cellspacing="0" class="" summary="" role="presentation">
  715. <out:attribute name="class">
  716. <xsl:choose>
  717. <xsl:when test="@class"><xsl:value-of select="@class"/></xsl:when>
  718. <xsl:otherwise>dialogButtonBar</xsl:otherwise>
  719. </xsl:choose>
  720. </out:attribute>
  721. <!-- show the buttons -->
  722. <tr>
  723. <out:choose>
  724. <out:when test="$browser='moz'">
  725. <td width="2" valign="middle">
  726. <img width="2" alt="">
  727. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  728. </img>
  729. </td>
  730. </out:when>
  731. <out:otherwise>
  732. <td width="5" valign="middle">
  733. <img width="5" alt="">
  734. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  735. </img>
  736. </td>
  737. </out:otherwise>
  738. </out:choose>
  739. <td valign="middle">
  740. <table border="0" cellpadding="1" cellspacing="0" summary="" role="presentation">
  741. <tr>
  742. <xsl:apply-templates/>
  743. </tr>
  744. </table>
  745. </td>
  746. <td width="100%">&#160;</td>
  747. </tr>
  748. </table>
  749. </xsl:template>
  750. <!--
  751. dp:footer
  752. -->
  753. <xsl:template match="dp:footer">
  754. <out:variable name="useDIVS_f">
  755. <xsl:choose>
  756. <xsl:when test="dp:useDIVS">
  757. <xsl:copy-of select="dp:useDIVS/*"/>
  758. </xsl:when>
  759. <xsl:otherwise>
  760. <out:text>true</out:text>
  761. </xsl:otherwise>
  762. </xsl:choose>
  763. </out:variable>
  764. <out:variable name="divAttr_f">
  765. <xsl:choose>
  766. <xsl:when test="string(@div)='div' ">
  767. <out:text>true</out:text>
  768. </xsl:when>
  769. <xsl:otherwise>
  770. <out:text>false</out:text>
  771. </xsl:otherwise>
  772. </xsl:choose>
  773. </out:variable>
  774. <out:choose>
  775. <out:when test="$divAttr_f='true' and $useDIVS_f='true' ">
  776. <out:choose>
  777. <out:when test="$browser='moz'">
  778. <out:text disable-output-escaping="yes">&lt;/div&gt;</out:text>
  779. <table width="100%" border="0" cellpadding="0" cellspacing="0" class="" summary="" role="presentation">
  780. <tr>
  781. <td width="1" valign="middle">
  782. </td>
  783. </tr>
  784. </table>
  785. </out:when>
  786. <out:otherwise>
  787. <out:text disable-output-escaping="yes">&lt;/div&gt;</out:text>
  788. <out:text disable-output-escaping="yes">&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</out:text>
  789. </out:otherwise>
  790. </out:choose>
  791. </out:when>
  792. <out:otherwise>
  793. <table width="100%" border="0" cellpadding="0" cellspacing="0" class="" summary="" role="presentation">
  794. <tr>
  795. <td width="1" valign="middle">
  796. </td>
  797. </tr>
  798. </table>
  799. </out:otherwise>
  800. </out:choose>
  801. <table border="0" cellpadding="1" cellspacing="0" class="dialogButtonBar" summary="" role="presentation">
  802. <!-- show the buttons -->
  803. <tr>
  804. <td width="3" valign="middle">
  805. <img width="3" alt="">
  806. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  807. </img>
  808. </td>
  809. <td valign="middle">
  810. <!-- command buttons -->
  811. <table border="0" cellpadding="0" cellspacing="0" summary="" role="presentation">
  812. <tr>
  813. <xsl:apply-templates select="*[not(self::dp:useDIVS)]"/>
  814. </tr>
  815. </table>
  816. </td>
  817. <td width="100%">&#160;</td>
  818. <xsl:if test="string(@copyright) = 'true'">
  819. <td valign="middle" align="right" class="copyright" nowrap="nowrap">
  820. <xts:string id="IDS_COPYRIGHT"/><br/>
  821. <xts:string id="IDS_TRADEMARK"/>
  822. </td>
  823. </xsl:if>
  824. </tr>
  825. </table>
  826. </xsl:template>
  827. <!--
  828. dp:group - simple one line layout, especially for images and text
  829. -->
  830. <xsl:template match="dp:group">
  831. <table border="0" cellpadding="0" cellspacing="0" summary="" role="presentation">
  832. <xsl:if test="@title">
  833. <tr>
  834. <td nowrap="nowrap" class="formLabel">
  835. <xts:string id="{@title}"/>
  836. </td>
  837. </tr>
  838. </xsl:if>
  839. <tr>
  840. <xsl:if test="@id">
  841. <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
  842. </xsl:if>
  843. <xsl:apply-templates/>
  844. </tr>
  845. </table>
  846. </xsl:template>
  847. <!--
  848. dp:groupItem - each item in the group
  849. -->
  850. <xsl:template match="dp:groupItem">
  851. <td>
  852. <xsl:copy-of select="@*"/>
  853. <xsl:if test="@valign">
  854. <xsl:attribute name="valign"><xsl:value-of select="@valign"/></xsl:attribute>
  855. </xsl:if>
  856. <xsl:attribute name="class">
  857. <xsl:choose>
  858. <xsl:when test="@tdClass"><xsl:value-of select="@tdClass"/></xsl:when>
  859. <xsl:when test="self::dp:label">formLabel</xsl:when>
  860. <xsl:when test="self::dp:link">formLink</xsl:when>
  861. <xsl:otherwise>formText</xsl:otherwise>
  862. </xsl:choose>
  863. </xsl:attribute>
  864. <xsl:apply-templates/>
  865. </td>
  866. </xsl:template>
  867. <!--
  868. dp:header - this is a header for the dialog pages
  869. -->
  870. <xsl:template match="dp:header">
  871. <xsl:variable name="useKBA11y" select="string(@dp:kbA11y)='true'"/>
  872. <!--These variables must be declared here since they are required by cookie_jar.js-->
  873. <script type="text/javascript">
  874. var sParamDelimiter = "<out:value-of select="xtsext:javascriptencode(string(key('system-param', 'delimiters')/@d1))"/>";
  875. var sNameValueDelimiter = "<out:value-of select="xtsext:javascriptencode(string(key('system-param', 'delimiters')/@d2))"/>";
  876. var sCookiePath = "<out:value-of select="xtsext:javascriptencode(string($cookie_path))"/>";
  877. var sCookieDomain = "<out:value-of select="xtsext:javascriptencode(string($cookie_domain))"/>";
  878. var sCookieSecure = "<out:value-of select="xtsext:javascriptencode(string($cookie_secure))"/>";
  879. </script>
  880. <script type="text/javascript">
  881. <out:attribute name="src">
  882. <out:value-of select="$webcontent"/>/<out:value-of select="$app"/>/js/cookie_jar.js<out:text/>
  883. </out:attribute>
  884. </script>
  885. <!-- bidi -->
  886. <script type="text/javascript">
  887. <out:attribute name="src">
  888. <out:value-of select="$webcontent"/>/../ccl/i18n/bidi/BidiUtils.js<out:text/>
  889. </out:attribute>
  890. </script>
  891. <script language="javascript">
  892. var isBidiEnabled = <out:value-of select="boolean($isBidiEnabled='true')"/>;
  893. if (isBidiEnabled){
  894. var bidi = BidiUtils.getInstance();
  895. bidi.setProperties('<out:value-of select="xtsext:javascriptencode($baseTextDirection)"/>',
  896. '<out:value-of select="xtsext:getBTD('', $baseTextDirection, $productLocale)"/>',
  897. '<out:value-of select="xtsext:javascriptencode($productLocale)"/>');
  898. }
  899. </script>
  900. <out:variable name="useDIVS_h">
  901. <xsl:choose>
  902. <xsl:when test="dp:useDIVS">
  903. <xsl:copy-of select="dp:useDIVS/*"/>
  904. </xsl:when>
  905. <xsl:otherwise>
  906. <out:text>true</out:text>
  907. </xsl:otherwise>
  908. </xsl:choose>
  909. </out:variable>
  910. <out:variable name="divAttr_h">
  911. <xsl:choose>
  912. <xsl:when test="string(@div)='div' ">
  913. <out:text>true</out:text>
  914. </xsl:when>
  915. <xsl:otherwise>
  916. <out:text>false</out:text>
  917. </xsl:otherwise>
  918. </xsl:choose>
  919. </out:variable>
  920. <xsl:variable name="headerDisplayOptions">
  921. <xsl:choose>
  922. <xsl:when test="@headerDisplayOptions"><xsl:value-of select="@headerDisplayOptions"/></xsl:when>
  923. <xsl:otherwise>key('env-param', 'md.displayOptions')</xsl:otherwise>
  924. </xsl:choose>
  925. </xsl:variable>
  926. <out:variable name="showHeader" select="not({$headerDisplayOptions} and {$headerDisplayOptions} = 'h1')"/>
  927. <out:if test="$showHeader">
  928. <script type="text/javascript">
  929. function debug(e)
  930. {
  931. e = (e) ? e : ((window.event) ? window.event :"");
  932. if (e.altKey)
  933. {
  934. if (getSessionValue("debug") != "1") {
  935. setStateValue("debug", "1");
  936. } else {
  937. setStateValue("debug", "0");
  938. }
  939. location.reload();
  940. }
  941. }
  942. </script>
  943. <table border="0" width="100%" cellspacing="0" cellpadding="0" class="dialogHeader" summary="" role="presentation">
  944. <tr>
  945. <xsl:if test="dp:image">
  946. <td height="20" valign="middle" class="dialogHeaderTitle">
  947. <img alt="" height="10" width="3" border="0">
  948. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  949. </img>
  950. <xsl:copy-of select="dp:image/child::node()"/>
  951. <img alt="" height="10" width="5" border="0">
  952. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  953. </img>
  954. </td>
  955. </xsl:if>
  956. <td valign="top" class="dialogHeaderTitle" width="100%" nowrap="nowrap">
  957. <span onclick="debug(event)" role="presentation" id="dialogHeaderTitle"><xsl:copy-of select="dp:title/child::node()"/></span>
  958. </td>
  959. <!--xsl:if test="dp:headerLinks">
  960. <xsl:apply-templates select="dp:headerLinks" mode="links"/>
  961. </xsl:if-->
  962. <xsl:choose>
  963. <xsl:when test="not(./@help) or ./@help = string(true()) or ./@helpId or $useKBA11y">
  964. <td valign="middle" nowrap="nowrap" class="dialogHeaderLink">
  965. <out:variable name="s" select="concat(' ', /root/system/param[@name='ui_hide']/CC_DIALOG_HEADER_help/@show, ' ')"/>
  966. <out:if test="not(/root/system/param[@name='ui_hide']/CC_DIALOG_HEADER_help) or
  967. (/root/system/param[@name='ui_hide']/CC_DIALOG_HEADER_help[
  968. (contains($s , 'Administrators') and $isAdminUser) or
  969. (contains($s , 'QSUsers') and $hasFullQSCapability) or
  970. (contains($s , 'RSUsers') and $hasFullRSCapability) or
  971. (contains($s , 'Consumers') and $is-named='1') or
  972. (contains($s , 'Anonymous') and $is-named='0') or
  973. (key('system-param', 'ui_groups')/group[contains($s, concat(' ', @id, ' ')) and contains( key('session-param', 'uig'), concat(' ', @id, ' '))])
  974. ])">
  975. <a href="#" class="dialogHeaderLinkColor" onclick="javascript:help();">
  976. <xsl:if test="string(./@helpId)!='' or $useKBA11y">
  977. <xsl:if test="./@helpId">
  978. <out:if test="${./@helpId} != ''">
  979. <out:attribute name="id"><out:value-of select="${./@helpId}"/></out:attribute>
  980. </out:if>
  981. </xsl:if>
  982. <out:attribute name="onkeypress">javascript:if (event.keyCode==13 || event.keyCode==32 || event.charCode==32) <xsl:text>{ this.onclick(); return false; }</xsl:text> return true;</out:attribute>
  983. </xsl:if>
  984. <!-- Define onkeydown to trap the tab and shift+tab key since it does not fire the onkeypress (IE) -->
  985. <out:variable name="nextFocus"><xsl:copy-of select="./dp:focusidOnShiftTab"/></out:variable>
  986. <out:if test="$nextFocus !=''">
  987. <out:attribute name="onkeydown">javascript:if (event.keyCode==9 &amp;&amp; event.shiftKey==true) <xsl:text>{</xsl:text> document.getElementById("<out:value-of select="$nextFocus"/>").focus(); return false; <xsl:text>}</xsl:text> return true;</out:attribute>
  988. </out:if>
  989. <xts:string id="IDS_HELP"/>
  990. </a>
  991. </out:if>
  992. </td>
  993. </xsl:when>
  994. <xsl:otherwise>
  995. <xsl:for-each select="./dp:newlink">
  996. <td valign="middle" class="dialogHeaderLink" nowrap="nowrap">
  997. <xsl:choose>
  998. <xsl:when test="@wrap"/>
  999. <xsl:otherwise><xsl:attribute name="nowrap">nowrap</xsl:attribute></xsl:otherwise>
  1000. </xsl:choose>
  1001. <xsl:text>&#160;</xsl:text><xsl:copy-of select="./child::node()"/>
  1002. </td>
  1003. </xsl:for-each>
  1004. <xsl:if test="dp:newLinks">
  1005. <xsl:apply-templates select="dp:newLinks/child::node()" mode="links"/>
  1006. </xsl:if>
  1007. </xsl:otherwise>
  1008. </xsl:choose>
  1009. <!-- Do not add and custom links to the log off dialog -->
  1010. <out:if test="not(contains(/root/env/param[@name = 'm'], 'logoff.xts'))">
  1011. <out:for-each select="key('system-param', 'ui_add')/CC_DIALOG_HEADER/item">
  1012. <out:variable name="s" select="concat(' ', @show, ' ')"/>
  1013. <out:if test="
  1014. not(@show) or
  1015. (contains($s , 'Administrators') and $isAdminUser) or
  1016. (contains($s , 'QSUsers') and $userCanUseFullQS) or
  1017. (contains($s , 'RSUsers') and $userCanUseFullRS) or
  1018. (contains($s , 'Consumers') and $is-named='1') or
  1019. (contains($s , 'Anonymous') and $is-named='0') or
  1020. (key('system-param', 'ui_groups')/group[contains($s, concat(' ', @id, ' ')) and contains( key('session-param', 'uig'), concat(' ', @id, ' '))])
  1021. ">
  1022. <td valign="middle" nowrap="nowrap" class="dialogHeaderLink">
  1023. <a class="dialogHeaderLinkColor" href="{'{url}'}">
  1024. <out:if test="onclick">
  1025. <out:attribute name="onclick"><out:value-of select="onclick"/></out:attribute>
  1026. </out:if>
  1027. <out:if test="target">
  1028. <out:attribute name="target"><out:value-of select="target"/></out:attribute>
  1029. </out:if>
  1030. <out:value-of select="label[lang($productLocale)]"/>
  1031. </a>
  1032. </td>
  1033. </out:if>
  1034. </out:for-each>
  1035. </out:if>
  1036. <td align="right" valign="middle" style="padding-right:3px;">
  1037. <xsl:if test="not(@close)">
  1038. <xsl:choose>
  1039. <xsl:when test="dp:close">
  1040. <xsl:apply-templates select="dp:close/child::node()"/>
  1041. </xsl:when>
  1042. <xsl:otherwise>
  1043. <!-- when a property dialog is read-only, we ALWAYS want to use the backURL -->
  1044. <out:variable name="useBackURL">
  1045. <xsl:choose>
  1046. <xsl:when test="@useBackURL and @useBackURL != ''"><out:value-of select="{@useBackURL}"/></xsl:when>
  1047. <xsl:otherwise><xsl:value-of select="false()"/></xsl:otherwise>
  1048. </xsl:choose>
  1049. </out:variable>
  1050. <out:choose>
  1051. <out:when test="$useBackURL='false' and (/root/env/param[@name = 'ps_nav_stack']) and not(/root/env/param[@name = 'ps_nav_stack'] = '') ">
  1052. <utml:a utml:op="stack-down" id="IDS_CLOSE" utml:kbA11y="{$useKBA11y}" role="button">
  1053. <img height="16" width="16" vspace="2" role="button" border="0" class="dialogClose" onmouseover="this.className = 'dialogCloseOver'" onmouseout="this.className = 'dialogClose'">
  1054. <xsl:attribute name="src"><xsl:value-of select="'{$skin_images}'"/>close.gif</xsl:attribute>
  1055. <out:attribute name="title"><xts:string id="IDS_CLOSE"/></out:attribute>
  1056. <out:attribute name="alt"><xts:string id="IDS_CLOSE"/></out:attribute>
  1057. </img>
  1058. </utml:a>
  1059. </out:when>
  1060. <out:otherwise>
  1061. <a id="headerIDS_CLOSE" role="button">
  1062. <xsl:choose>
  1063. <xsl:when test="$useKBA11y">
  1064. <xsl:variable name="chkSpaceEnterKeyEvent">if (event.keyCode==13 || event.keyCode==32 || event.charCode==32)</xsl:variable>
  1065. <out:attribute name="href">#</out:attribute>
  1066. <out:attribute name="onclick">javascript:<out:text/>
  1067. <out:choose>
  1068. <!-- Handle modal mode scenarios -->
  1069. <out:when test="/root/env/param[@name='md.callBack']">
  1070. <out:choose>
  1071. <out:when test="string(/root/env/param[@name='md.callBackMode']) = 'external'">
  1072. <out:text/>window.external.ccModalCallBack('close', null);
  1073. </out:when>
  1074. <out:otherwise>
  1075. <out:text/>window.opener &amp;&amp; window.opener.ccModalCallBack ? window.opener.ccModalCallBack('close', null) : parent.ccModalCallBack('close', null);
  1076. </out:otherwise>
  1077. </out:choose>
  1078. </out:when>
  1079. <out:otherwise><out:text/>location.href="<out:value-of select="xtsext:javascriptencode(/root/env/param[@name = 'backURL'])"/>";</out:otherwise>
  1080. </out:choose>
  1081. </out:attribute>
  1082. <out:attribute name="onkeypress">javascript:<xsl:value-of select="$chkSpaceEnterKeyEvent"/> <xsl:text>{</xsl:text> this.onclick(); return false;<xsl:text>}</xsl:text> return true;</out:attribute>
  1083. </xsl:when>
  1084. <xsl:otherwise>
  1085. <out:attribute name="href">
  1086. <out:choose>
  1087. <!-- Handle modal mode scenarios -->
  1088. <out:when test="/root/env/param[@name='md.callBack']">
  1089. <out:choose>
  1090. <out:when test="string(/root/env/param[@name='md.callBackMode']) = 'external'">
  1091. <out:text/>javascript:window.external.ccModalCallBack('close', null)
  1092. </out:when>
  1093. <out:otherwise>
  1094. <out:text/>javascript:window.opener &amp;&amp; window.opener.ccModalCallBack ? window.opener.ccModalCallBack('close', null) : parent.ccModalCallBack('close', null)
  1095. </out:otherwise>
  1096. </out:choose>
  1097. </out:when>
  1098. <out:otherwise><out:value-of select="xtsext:htmlencode(/root/env/param[@name = 'backURL'])"/></out:otherwise>
  1099. </out:choose>
  1100. </out:attribute>
  1101. </xsl:otherwise>
  1102. </xsl:choose>
  1103. <img height="16" width="16" vspace="2" border="0" class="dialogClose" onmouseover="this.className = 'dialogCloseOver'" onmouseout="this.className = 'dialogClose'" role="button">
  1104. <xsl:attribute name="src"><xsl:value-of select="'{$skin_images}'"/>close.gif</xsl:attribute>
  1105. <out:attribute name="title"><xts:string id="IDS_CLOSE"/></out:attribute>
  1106. <out:attribute name="alt"><xts:string id="IDS_CLOSE"/></out:attribute>
  1107. </img>
  1108. </a>
  1109. </out:otherwise>
  1110. </out:choose>
  1111. </xsl:otherwise>
  1112. </xsl:choose>
  1113. </xsl:if>
  1114. </td>
  1115. </tr>
  1116. </table>
  1117. </out:if>
  1118. <out:choose>
  1119. <out:when test="$divAttr_h='true' and $useDIVS_h='true' ">
  1120. <out:choose>
  1121. <out:when test="$browser='moz'">
  1122. <out:text disable-output-escaping="yes">&lt;div id="dw" class="dialogScrollPaneOther"&gt;</out:text>
  1123. </out:when>
  1124. <out:otherwise>
  1125. <out:text disable-output-escaping="yes">&lt;table width="100%" height="80%" cellspacing="0" cellpadding="0"&gt;</out:text>
  1126. <out:text disable-output-escaping="yes">&lt;tr&gt;&lt;td &gt;</out:text>
  1127. <out:choose>
  1128. <out:when test="$browser = 'safari' ">
  1129. <out:text disable-output-escaping="yes">&lt;div id="dw" class="dialogScrollPaneSafari"&gt;</out:text>
  1130. </out:when>
  1131. <out:otherwise>
  1132. <out:text disable-output-escaping="yes">&lt;div id="dw" class="dialogScrollPane"&gt;</out:text>
  1133. </out:otherwise>
  1134. </out:choose>
  1135. </out:otherwise>
  1136. </out:choose>
  1137. </out:when>
  1138. <out:otherwise>
  1139. </out:otherwise>
  1140. </out:choose>
  1141. <xsl:if test="dp:description or dp:headerLinks">
  1142. <table border="0" width="100%" cellspacing="0" cellpadding="0" style="padding-left:5px;" summary="" role="presentation">
  1143. <tr>
  1144. <xsl:if test="dp:description ">
  1145. <td class="dialogHeaderText">
  1146. <xsl:if test="dp:description/@aria-labelledby">
  1147. <xsl:attribute name="aria-labelledby"><xsl:value-of select="dp:description/@aria-labelledby"/></xsl:attribute>
  1148. </xsl:if>
  1149. <xsl:if test="dp:description/@nowrap"><xsl:attribute name="nowrap">nowrap</xsl:attribute></xsl:if>
  1150. <xsl:choose>
  1151. <xsl:when test="dp:description/dp:descriptionText">
  1152. <div style="width: 100%">
  1153. <div style="left: 10px; float: left; width: 50%;"><xsl:copy-of select="dp:description/dp:descriptionText/child::node()"/></div>
  1154. <div style="right: 0px;float: right; width: 40%;text-align: right;padding-right: 5px">
  1155. <xsl:copy-of select="dp:description/dp:descriptionLink/child::node()"/>
  1156. </div>
  1157. </div>
  1158. </xsl:when>
  1159. <xsl:otherwise><xsl:copy-of select="dp:description/child::node()"/></xsl:otherwise>
  1160. </xsl:choose>
  1161. </td>
  1162. </xsl:if>
  1163. <!-- ******** -->
  1164. <!-- IF THE DESIGN CHANGES TO MOVE THE LINKS from the SCROLLABLE SECTION of the dialog TO the FIXED header bar SECTION -->
  1165. <!-- REMOVE following section -->
  1166. <xsl:if test="dp:headerLinks">
  1167. <td width="10" valign="middle">
  1168. <img width="10" alt="">
  1169. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  1170. </img>
  1171. </td>
  1172. <td align="right" valign="top">
  1173. <table border="0" cellpadding="0" cellspacing="0" summary="" role="presentation">
  1174. <tr>
  1175. <xsl:apply-templates select="dp:headerLinks/child::node()" mode="links">
  1176. <xsl:with-param name="va" select="'top'"/>
  1177. </xsl:apply-templates>
  1178. </tr>
  1179. </table>
  1180. </td>
  1181. </xsl:if>
  1182. <!-- REMOVE previous section -->
  1183. <!-- IF THE DESIGN CHANGES TO MOVE THE LINKS from the SCROLLABLE SECTION of the dialog TO the FIXED header bar SECTION -->
  1184. <!-- ******** -->
  1185. </tr>
  1186. </table>
  1187. <xsl:if test="not(//a[@id='maincontent']) and @mainContentHandled != 'true'">
  1188. <div id="maincontent" role="main" tabindex="-1" style="position:absolute; margin-left: -9999px; margin-top:-9999px" >
  1189. <out:attribute name="aria-label"><xts:string id="IDS_SECTION508_CONTENT" encode="html" /></out:attribute>
  1190. </div>
  1191. </xsl:if>
  1192. </xsl:if>
  1193. </xsl:template>
  1194. <xsl:template match="dp:headerLinkInactive" mode="links" priority="2">
  1195. <xsl:param name="va" select="'middle'"/>
  1196. <td valign="{$va}" nowrap="nowrap" class="dialogHeaderLink" align="right">
  1197. <xsl:apply-templates select="./child::node()"/>
  1198. </td>
  1199. </xsl:template>
  1200. <xsl:template match="dp:headerLink" mode="links" priority="2">
  1201. <xsl:param name="va" select="'middle'"/>
  1202. <td valign="{$va}" nowrap="nowrap" class="dialogSubHeaderAnchorContainer" align="right">
  1203. <a>
  1204. <xsl:apply-templates select="dp:hl_attribute" mode="links"/>
  1205. </a>
  1206. </td>
  1207. </xsl:template>
  1208. <xsl:template match="dp:hl_attribute" mode="links" priority="2">
  1209. <xsl:variable name="att" select="@name"/>
  1210. <xsl:choose>
  1211. <xsl:when test="$att != 'label'">
  1212. <out:attribute name="{$att}"><xsl:copy-of select="."/></out:attribute>
  1213. </xsl:when>
  1214. <xsl:otherwise>
  1215. <xsl:copy-of select="child::node()"/>
  1216. </xsl:otherwise>
  1217. </xsl:choose>
  1218. </xsl:template>
  1219. <!--
  1220. dp:inactiveText - allows you to make any text inactive
  1221. -->
  1222. <xsl:template match="dp:inactiveText">
  1223. <span class="inactiveText"><xsl:copy-of select="child::node()"/></span>
  1224. </xsl:template>
  1225. <!--
  1226. dp:inactiveHRef - allows you to make any href text inactive
  1227. -->
  1228. <xsl:template match="dp:inactiveHRef">
  1229. <span class="inactiveHRef"><xsl:copy-of select="child::node()"/></span>
  1230. </xsl:template>
  1231. <!--
  1232. dp:input -2 sections first for the label - second for the input bax
  1233. -->
  1234. <xsl:template match="dp:input">
  1235. <table summary="" border="0" cellspacing="0" cellpadding="1" role="presentation">
  1236. <xsl:for-each select="*[self::dp:section1]">
  1237. <tr>
  1238. <xsl:if test="@aria-labelledby">
  1239. <xsl:attribute name="aria-labelledby"><xsl:value-of select="@aria-labelledby"/></xsl:attribute>
  1240. </xsl:if>
  1241. <td nowrap="nowrap">
  1242. <div class="formLabel">
  1243. <xsl:if test="@id">
  1244. <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
  1245. </xsl:if>
  1246. <xsl:choose>
  1247. <xsl:when test="@for">
  1248. <label>
  1249. <xsl:attribute name="for">
  1250. <xsl:value-of select="@for"/>
  1251. </xsl:attribute>
  1252. <xsl:apply-templates select="child::node()"/>
  1253. </label>
  1254. </xsl:when>
  1255. <xsl:otherwise>
  1256. <xsl:apply-templates select="child::node()"/>
  1257. </xsl:otherwise>
  1258. </xsl:choose>
  1259. </div>
  1260. </td>
  1261. </tr>
  1262. <tr>
  1263. <td>
  1264. <xsl:apply-templates select="following-sibling::*[1]/child::node()"/>
  1265. </td>
  1266. <xsl:if test="count(following-sibling::*)>1">
  1267. <xsl:apply-templates select="following-sibling::*[2]/child::node()"/>
  1268. </xsl:if>
  1269. </tr>
  1270. <tr>
  1271. <td nowrap="nowrap">
  1272. </td>
  1273. </tr>
  1274. </xsl:for-each>
  1275. </table>
  1276. </xsl:template>
  1277. <!--
  1278. dp:label
  1279. -->
  1280. <xsl:template match="dp:label">
  1281. <xsl:variable name="label">
  1282. <xsl:copy-of select="child::node()"/><xsl:if test="not(@nospace)">&#160;&#160;&#160;</xsl:if>
  1283. </xsl:variable>
  1284. <xsl:choose>
  1285. <xsl:when test="@for">
  1286. <label>
  1287. <xsl:attribute name="for">
  1288. <xsl:value-of select="@for"/>
  1289. </xsl:attribute>
  1290. <xsl:copy-of select="$label"/>
  1291. </label>
  1292. </xsl:when>
  1293. <xsl:when test="@id">
  1294. <span>
  1295. <xsl:attribute name="id">
  1296. <xsl:value-of select="@id"/>
  1297. </xsl:attribute>
  1298. <xsl:copy-of select="$label"/>
  1299. </span>
  1300. </xsl:when>
  1301. <xsl:otherwise>
  1302. <xsl:copy-of select="$label"/>
  1303. </xsl:otherwise>
  1304. </xsl:choose>
  1305. </xsl:template>
  1306. <!--
  1307. dp:tabs
  1308. -->
  1309. <xsl:template match="dp:tabs">
  1310. <xsl:copy-of select="child::node()"/>
  1311. </xsl:template>
  1312. <!--
  1313. dp:link
  1314. -->
  1315. <xsl:template match="dp:link">
  1316. <xsl:apply-templates/>
  1317. </xsl:template>
  1318. <!--
  1319. dp:list
  1320. -1 section usually had text then a link to change the value
  1321. -->
  1322. <xsl:template match="dp:list">
  1323. <table border="0" cellspacing="0">
  1324. <xsl:attribute name="cellpadding">
  1325. <xsl:choose>
  1326. <xsl:when test="@padding"><xsl:value-of select="@padding"/></xsl:when>
  1327. <xsl:otherwise>1</xsl:otherwise>
  1328. </xsl:choose>
  1329. </xsl:attribute>
  1330. <xsl:attribute name="role">
  1331. <xsl:choose>
  1332. <xsl:when test="@role"><xsl:value-of select="@role"/></xsl:when>
  1333. <xsl:when test="not(@role) and @title != ''">group</xsl:when>
  1334. <xsl:otherwise>presentation</xsl:otherwise>
  1335. </xsl:choose>
  1336. </xsl:attribute>
  1337. <xsl:if test="@width">
  1338. <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
  1339. </xsl:if>
  1340. <xsl:if test="@valign">
  1341. <xsl:attribute name="valign"><xsl:value-of select="@valign"/></xsl:attribute>
  1342. </xsl:if>
  1343. <xsl:if test="@align">
  1344. <xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute>
  1345. </xsl:if>
  1346. <xsl:if test="@tabindex">
  1347. <xsl:attribute name="tabindex"><xsl:value-of select="@tabindex"/></xsl:attribute>
  1348. </xsl:if>
  1349. <xsl:if test="@id">
  1350. <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
  1351. </xsl:if>
  1352. <xsl:if test="not(@role) and @title != ''">
  1353. <out:attribute name="aria-label"><xts:string id="{@title}" encode="html"/></out:attribute>
  1354. </xsl:if>
  1355. <xsl:if test="@title">
  1356. <tr>
  1357. <td nowrap="nowrap" colspan="2" class="formLabel">
  1358. <xsl:if test="@title-id">
  1359. <xsl:attribute name="id"><xsl:value-of select="@title-id"/></xsl:attribute>
  1360. </xsl:if>
  1361. <xsl:choose>
  1362. <xsl:when test="@for">
  1363. <label id="{@title}_{@parentTitle}">
  1364. <xsl:attribute name="for">
  1365. <xsl:value-of select="@for"/>
  1366. </xsl:attribute>
  1367. <xts:string id="{@title}"/>
  1368. </label>
  1369. </xsl:when>
  1370. <xsl:otherwise>
  1371. <xts:string id="{@title}"/>
  1372. </xsl:otherwise>
  1373. </xsl:choose>
  1374. </td>
  1375. </tr>
  1376. </xsl:if>
  1377. <xsl:apply-templates mode="list"/>
  1378. </table>
  1379. </xsl:template>
  1380. <!--
  1381. dp:message -2 sections first for the image - second for the message
  1382. -->
  1383. <xsl:template match="dp:message">
  1384. <table border="0" cellspacing="0" cellpadding="1">
  1385. <tr>
  1386. <td nowrap="nowrap" valign="top">
  1387. <xsl:copy-of select="dp:image/child::node()"/>
  1388. </td>
  1389. <td class="messageText">
  1390. <xsl:copy-of select="dp:messageText/child::node()"/>
  1391. </td>
  1392. </tr>
  1393. </table>
  1394. </xsl:template>
  1395. <!--
  1396. dp:page - hold entire page from open body tag to close
  1397. -->
  1398. <xsl:template match="dp:page">
  1399. <xsl:if test="@getRidOfDoctype = false()">
  1400. <out:text disable-output-escaping='yes'>&lt;!DOCTYPE html></out:text>
  1401. </xsl:if>
  1402. <html>
  1403. <out:attribute name="lang">
  1404. <out:choose>
  1405. <out:when test="/root/session">
  1406. <out:value-of select="/root/session/param[@name='productLocale']"/>
  1407. </out:when>
  1408. <out:when test="/root/http">
  1409. <out:value-of select="/root/http/param[@name='HTTP_ACCEPT_LANGUAGE']"/>
  1410. </out:when>
  1411. <out:otherwise>
  1412. <out:value-of select="''"/>
  1413. </out:otherwise>
  1414. </out:choose>
  1415. </out:attribute>
  1416. <out:if test="$is-ui-rtl">
  1417. <out:attribute name="class">rtl</out:attribute>
  1418. </out:if>
  1419. <head>
  1420. <xsl:if test="dp:meta">
  1421. <xsl:copy-of select="dp:meta/child::node()"/>
  1422. </xsl:if>
  1423. <!-- add caching prevention instructions as required -->
  1424. <xsl:if test="@cache = 'false'">
  1425. <meta http-equiv="expires" content="0"/>
  1426. </xsl:if>
  1427. <title>
  1428. <xsl:if test="@title">
  1429. <xts:string id="{@title}"/>
  1430. </xsl:if>
  1431. <xsl:if test="@longTitle">
  1432. <out:value-of select="{@longTitle}"/>
  1433. </xsl:if>
  1434. </title>
  1435. <link rel="stylesheet" type="text/css">
  1436. <out:attribute name="href">
  1437. <xsl:choose>
  1438. <!-- a morphlet can specify its own stylesheet. @stylesheet must contain a full path to the desired stylesheet. -->
  1439. <xsl:when test="@stylesheet">
  1440. <out:value-of select="@stylesheet"/>
  1441. </xsl:when>
  1442. <xsl:otherwise>
  1443. <out:value-of select="$skin_style"/>
  1444. </xsl:otherwise>
  1445. </xsl:choose>
  1446. </out:attribute>
  1447. </link>
  1448. <link rel="stylesheet" type="text/css" href="{'{$skin_fonts}'}"/>
  1449. <xsl:if test="dp:script">
  1450. <xsl:copy-of select="dp:script/child::node()"/>
  1451. </xsl:if>
  1452. </head>
  1453. <!-- temporary theme selector, this will go on all match thms to switch using a url parameter -->
  1454. <!-- define a function to call other that init() if required -->
  1455. <xsl:variable name="initFunction">
  1456. <xsl:choose>
  1457. <xsl:when test="@initFunction"><xsl:value-of select="@initFunction"/></xsl:when>
  1458. <xsl:otherwise><xsl:text>init</xsl:text></xsl:otherwise>
  1459. </xsl:choose>
  1460. </xsl:variable>
  1461. <out:variable name="headerTitle"><xsl:copy-of select=".//dp:header/dp:title/*"/></out:variable>
  1462. <body onload="if (window.{$initFunction}) {$initFunction}();" >
  1463. <xsl:attribute name="topmargin">3</xsl:attribute>
  1464. <xsl:attribute name="bottommargin">0</xsl:attribute>
  1465. <xsl:attribute name="marginheight">3</xsl:attribute>
  1466. <xsl:attribute name="rightmargin">3</xsl:attribute>
  1467. <xsl:attribute name="leftmargin">3</xsl:attribute>
  1468. <xsl:attribute name="marginwidth">3</xsl:attribute>
  1469. <!-- allows the template coder to explicitly specify the role -->
  1470. <xsl:choose>
  1471. <xsl:when test="@role">
  1472. <xsl:attribute name="role"><xsl:value-of select="@role"/></xsl:attribute>
  1473. </xsl:when>
  1474. <xsl:otherwise>
  1475. <xsl:attribute name="role">region</xsl:attribute>
  1476. <out:if test="true()">
  1477. <out:variable name="pageLabel"><xsl:copy-of select="dp:pageLabel/*"/></out:variable>
  1478. <out:if test="($headerTitle != '' or '{@longTitle}' != '') and $pageLabel =''">
  1479. <out:attribute name="aria-labelledby">dialogHeaderTitle</out:attribute>
  1480. </out:if>
  1481. </out:if>
  1482. </xsl:otherwise>
  1483. </xsl:choose>
  1484. <out:if test="true()">
  1485. <out:variable name="pageLabel"><xsl:copy-of select="dp:pageLabel/*"/></out:variable>
  1486. <out:if test="$pageLabel !='' ">
  1487. <out:attribute name="aria-labelledby">bodyRoleLabel</out:attribute>
  1488. </out:if>
  1489. </out:if>
  1490. <out:if test="$browser = 'ie'">
  1491. <out:attribute name="style">overflow:auto</out:attribute>
  1492. </out:if>
  1493. <out:attribute name="class">
  1494. <xsl:if test="@class"><xsl:value-of select="concat(@class,' ')"/></xsl:if>
  1495. <out:choose>
  1496. <out:when test="/root/env/param[@name='md.callBack']">body_dialog_modal</out:when>
  1497. <out:otherwise>dialogBody</out:otherwise>
  1498. </out:choose>
  1499. </out:attribute>
  1500. <out:if test="$is-ui-rtl">
  1501. <out:attribute name="dir">rtl</out:attribute>
  1502. </out:if>
  1503. <out:if test="true()">
  1504. <out:variable name="pageLabel"><xsl:copy-of select="dp:pageLabel/*"/></out:variable>
  1505. <out:if test="$pageLabel !=''">
  1506. <span id="bodyRoleLabel" style="position: absolute;margin-left: -9999px; margin-top: -9999px; "><out:value-of select="$pageLabel"/></span>
  1507. </out:if>
  1508. </out:if>
  1509. <!-- apply templates to whatever is in the page tag -->
  1510. <a href="#maincontent" tabindex="0" class="showOnFocus"><xts:string id="IDS_SECTION508_JUMPTOMAIN"/></a>
  1511. <xsl:if test=".//cp:tabset[@id='maintabs']">
  1512. <a href="#maintabs" tabindex="0" class="showOnFocus"><xts:string id="IDS_SECTION508_JUMPTOTABS"/></a>
  1513. </xsl:if>
  1514. <xsl:apply-templates select="*[not(self::dp:meta) and not(self::dp:script) and not(self::dp:pageLabel)]"/>
  1515. </body>
  1516. </html>
  1517. </xsl:template>
  1518. <!--
  1519. dp:section - list sections are rows
  1520. -->
  1521. <xsl:template match="dp:section" mode="list" priority="2">
  1522. <xsl:variable name="useKBA11y" select="string(@dp:kbA11y)='true'"/>
  1523. <tr>
  1524. <xsl:if test="@role">
  1525. <xsl:attribute name="role"><xsl:value-of select="@role"/></xsl:attribute>
  1526. </xsl:if>
  1527. <xsl:if test="@aria-labelledby">
  1528. <xsl:attribute name="aria-labelledby"><xsl:value-of select="@aria-labelledby"/></xsl:attribute>
  1529. </xsl:if>
  1530. <xsl:if test="@id">
  1531. <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
  1532. </xsl:if>
  1533. <xsl:for-each select="*">
  1534. <td>
  1535. <xsl:if test="@aria-labelledby">
  1536. <xsl:attribute name="aria-labelledby"><xsl:value-of select="@aria-labelledby"/></xsl:attribute>
  1537. </xsl:if>
  1538. <xsl:if test="@width">
  1539. <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
  1540. </xsl:if>
  1541. <xsl:if test="@height">
  1542. <xsl:attribute name="height"><xsl:value-of select="@height"/></xsl:attribute>
  1543. </xsl:if>
  1544. <xsl:if test="@align">
  1545. <xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute>
  1546. </xsl:if>
  1547. <xsl:if test="@valign">
  1548. <xsl:attribute name="valign"><xsl:value-of select="@valign"/></xsl:attribute>
  1549. </xsl:if>
  1550. <xsl:if test="@colspan">
  1551. <xsl:attribute name="colspan"><xsl:value-of select="@colspan"/></xsl:attribute>
  1552. </xsl:if>
  1553. <xsl:if test="@tabindex">
  1554. <xsl:attribute name="tabindex"><xsl:value-of select="@tabindex"/></xsl:attribute>
  1555. </xsl:if>
  1556. <xsl:choose>
  1557. <xsl:when test="@wrap"/>
  1558. <xsl:otherwise>
  1559. <xsl:attribute name="nowrap">nowrap</xsl:attribute>
  1560. </xsl:otherwise>
  1561. </xsl:choose>
  1562. <xsl:attribute name="class">
  1563. <xsl:choose>
  1564. <xsl:when test="@tdClass"><xsl:value-of select="@tdClass"/></xsl:when>
  1565. <xsl:when test="self::dp:label">formLabel</xsl:when>
  1566. <xsl:when test="self::dp:link">formLink</xsl:when>
  1567. <xsl:when test="self::dp:hint">dialogHintText</xsl:when>
  1568. <xsl:otherwise>formText</xsl:otherwise>
  1569. </xsl:choose>
  1570. </xsl:attribute>
  1571. <xsl:apply-templates select="self::*"/>
  1572. </td>
  1573. </xsl:for-each>
  1574. </tr>
  1575. </xsl:template>
  1576. <!--
  1577. dp:section1 - first and second part in a choice block
  1578. -->
  1579. <xsl:template match="dp:section1" mode="choice" priority="2">
  1580. <xsl:variable name="section2" select="following-sibling::*[1]"/>
  1581. <tr>
  1582. <xsl:if test="@tabindex">
  1583. <xsl:attribute name="tabindex"><xsl:value-of select="@tabindex"/></xsl:attribute>
  1584. </xsl:if>
  1585. <td style3="font-size: 100%;">
  1586. <xsl:choose>
  1587. <xsl:when test="@wrap"/>
  1588. <xsl:otherwise>
  1589. <xsl:attribute name="nowrap">nowrap</xsl:attribute>
  1590. </xsl:otherwise>
  1591. </xsl:choose>
  1592. <xsl:if test="@valign">
  1593. <xsl:attribute name="valign"><xsl:value-of select="@valign"/></xsl:attribute>
  1594. </xsl:if>
  1595. <xsl:attribute name="class">
  1596. <xsl:choose>
  1597. <xsl:when test="@tdClass"><xsl:value-of select="@tdClass"/></xsl:when>
  1598. <xsl:when test="@type='label'">formLabel</xsl:when>
  1599. <xsl:when test="@type='hint'">dialogHintText</xsl:when>
  1600. <xsl:otherwise>formText</xsl:otherwise>
  1601. </xsl:choose>
  1602. </xsl:attribute>
  1603. <xsl:choose>
  1604. <xsl:when test="@for">
  1605. <label>
  1606. <xsl:attribute name="for">
  1607. <xsl:value-of select="@for"/>
  1608. </xsl:attribute>
  1609. <xsl:apply-templates select="child::node()"/>
  1610. </label>
  1611. </xsl:when>
  1612. <xsl:otherwise>
  1613. <xsl:apply-templates select="child::node()"/>
  1614. </xsl:otherwise>
  1615. </xsl:choose>
  1616. </td>
  1617. <td>
  1618. <xsl:choose>
  1619. <xsl:when test="@wrap"/>
  1620. <xsl:otherwise>
  1621. <xsl:attribute name="nowrap">nowrap</xsl:attribute>
  1622. </xsl:otherwise>
  1623. </xsl:choose>
  1624. <xsl:if test="@valign">
  1625. <xsl:attribute name="valign"><xsl:value-of select="@valign"/></xsl:attribute>
  1626. </xsl:if>
  1627. <xsl:if test="$section2/@id">
  1628. <xsl:attribute name="id"><xsl:value-of select="$section2/@id"/></xsl:attribute>
  1629. </xsl:if>
  1630. <xsl:attribute name="class">
  1631. <xsl:choose>
  1632. <xsl:when test="$section2/@type='label'">formLabel</xsl:when>
  1633. <xsl:when test="$section2/@type='hint'">dialogHintText</xsl:when>
  1634. <xsl:otherwise>formText</xsl:otherwise>
  1635. </xsl:choose>
  1636. </xsl:attribute>
  1637. <xsl:choose>
  1638. <xsl:when test="$section2/@for">
  1639. <label>
  1640. <xsl:attribute name="for">
  1641. <xsl:value-of select="$section2/@for"/>
  1642. </xsl:attribute>
  1643. <xsl:apply-templates select="$section2/child::node()"/>
  1644. </label>
  1645. </xsl:when>
  1646. <xsl:otherwise>
  1647. <xsl:apply-templates select="$section2/child::node()"/>
  1648. </xsl:otherwise>
  1649. </xsl:choose>
  1650. </td>
  1651. </tr>
  1652. </xsl:template>
  1653. <!--
  1654. dp:section2 - take out the section2 of a choice
  1655. -->
  1656. <xsl:template match="dp:section2" mode="choice" priority="2"/>
  1657. <!--
  1658. dp:section3 - third section in a choice
  1659. -->
  1660. <xsl:template match="dp:section3" mode="choice" priority="2">
  1661. <tr>
  1662. <xsl:if test="not(@nospace)">
  1663. <td nowrap="nowrap">
  1664. <img height="1" width="5" alt="">
  1665. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  1666. </img>
  1667. </td>
  1668. </xsl:if>
  1669. <xsl:if test="(@nospace)"><td/></xsl:if>
  1670. <td>
  1671. <xsl:if test="@width">
  1672. <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
  1673. </xsl:if>
  1674. <xsl:attribute name="class">
  1675. <xsl:choose>
  1676. <xsl:when test="not(@tdClass)">formText</xsl:when>
  1677. <xsl:otherwise><xsl:value-of select="@tdClass"/></xsl:otherwise>
  1678. </xsl:choose>
  1679. </xsl:attribute>
  1680. <xsl:apply-templates select="child::*"/>
  1681. </td>
  1682. </tr>
  1683. </xsl:template>
  1684. <!--
  1685. dp:script - take out the script, it was just for the header
  1686. -->
  1687. <xsl:template match="dp:script"/>
  1688. <!--
  1689. dp:text
  1690. -->
  1691. <xsl:template match="dp:text">
  1692. <xsl:copy-of select="child::node()"/><xsl:if test="not(@nospace)">&#160;&#160;&#160;</xsl:if>
  1693. </xsl:template>
  1694. <!--
  1695. dp:hint
  1696. -->
  1697. <xsl:template match="dp:hint">
  1698. <xsl:copy-of select="child::node()"/>
  1699. </xsl:template>
  1700. <!--
  1701. dp:textarea
  1702. -3 sections first for the label - second for the textarea - this is the bottom link
  1703. -->
  1704. <xsl:template match="dp:textarea">
  1705. <xsl:variable name="section3_align">
  1706. <xsl:choose>
  1707. <xsl:when test="@section3_align">
  1708. <xsl:value-of select="@section3_align"/>
  1709. </xsl:when>
  1710. <xsl:otherwise>
  1711. <xsl:value-of select="'right'"/>
  1712. </xsl:otherwise>
  1713. </xsl:choose>
  1714. </xsl:variable>
  1715. <xsl:variable name="wrap">
  1716. <xsl:choose>
  1717. <xsl:when test="@wrap"><xsl:value-of select="'true'"/></xsl:when>
  1718. <xsl:otherwise><xsl:value-of select="'false'"/></xsl:otherwise>
  1719. </xsl:choose>
  1720. </xsl:variable>
  1721. <table border="0" cellspacing="0" cellpadding="1" role="presentation">
  1722. <!-- If a class attribute exists then use it otherwise check for a style-->
  1723. <xsl:choose>
  1724. <xsl:when test="@class">
  1725. <xsl:attribute name="class">
  1726. <xsl:value-of select="@class"/>
  1727. </xsl:attribute>
  1728. </xsl:when>
  1729. <xsl:when test="@style">
  1730. <xsl:attribute name="style">
  1731. <xsl:value-of select="@style"/>
  1732. </xsl:attribute>
  1733. </xsl:when>
  1734. </xsl:choose>
  1735. <xsl:for-each select="*[self::dp:section1]">
  1736. <tr>
  1737. <td nowrap="nowrap" class="formLabel">
  1738. <xsl:choose>
  1739. <xsl:when test="@for">
  1740. <label>
  1741. <xsl:attribute name="for">
  1742. <xsl:value-of select="@for"/>
  1743. </xsl:attribute>
  1744. <xsl:apply-templates select="child::node()"/>
  1745. </label>
  1746. </xsl:when>
  1747. <xsl:otherwise>
  1748. <xsl:apply-templates select="child::node()"/>
  1749. </xsl:otherwise>
  1750. </xsl:choose>
  1751. </td>
  1752. </tr>
  1753. <tr>
  1754. <td class="formText">
  1755. <xsl:if test="$wrap='false'">
  1756. <xsl:attribute name="nowrap">nowrap</xsl:attribute>
  1757. </xsl:if>
  1758. <div>
  1759. <xsl:apply-templates select="following-sibling::*[1]/child::node()"/>
  1760. </div>
  1761. </td>
  1762. </tr>
  1763. <tr>
  1764. <td class="formLink" nowrap="nowrap">
  1765. <xsl:attribute name="align">
  1766. <xsl:value-of select="$section3_align"/>
  1767. </xsl:attribute>
  1768. <xsl:apply-templates select="following-sibling::*[2]/child::node()"/>
  1769. </td>
  1770. </tr>
  1771. </xsl:for-each>
  1772. </table>
  1773. </xsl:template>
  1774. <!-- create a template for making the links at the bottom of the text area -->
  1775. <xsl:template match="dp:actions">
  1776. <xsl:choose>
  1777. <xsl:when test="count(dp:action) = 1">
  1778. <img height="1" width="1" alt="">
  1779. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  1780. </img>
  1781. <xsl:apply-templates select="dp:action/*"/>
  1782. <img height="1" width="1" alt="">
  1783. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  1784. </img>
  1785. </xsl:when>
  1786. <xsl:otherwise>
  1787. <img height="1" width="1" alt="">
  1788. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  1789. </img>
  1790. <xsl:for-each select="dp:action">
  1791. <xsl:if test="position()!=1">
  1792. <img height="1" width="10" alt="">
  1793. <out:attribute name="src"><out:value-of select="$webcontent"/>/images/space.gif</out:attribute>
  1794. </img>
  1795. </xsl:if>
  1796. <xsl:apply-templates/>
  1797. </xsl:for-each>
  1798. <img height="1" width="1" alt="">
  1799. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  1800. </img>
  1801. </xsl:otherwise>
  1802. </xsl:choose>
  1803. </xsl:template>
  1804. <!--
  1805. * - This next template is required to copy all other elements into the result.
  1806. -->
  1807. <xsl:template match="*" mode="links" priority="1">
  1808. <xsl:param name="va" select="'middle'"/>
  1809. <xsl:copy>
  1810. <xsl:copy-of select="@*"/>
  1811. <xsl:apply-templates mode="links">
  1812. <xsl:with-param name="va" select="$va"/>
  1813. </xsl:apply-templates>
  1814. </xsl:copy>
  1815. </xsl:template>
  1816. <!--
  1817. * - This next template is required to copy all other elements into the result.
  1818. -->
  1819. <xsl:template match="*" mode="choice" priority="1">
  1820. <xsl:copy>
  1821. <xsl:copy-of select="@*"/>
  1822. <xsl:apply-templates mode="choice"/>
  1823. </xsl:copy>
  1824. </xsl:template>
  1825. <!--
  1826. * - This next template is required to copy all other elements into the result.
  1827. -->
  1828. <xsl:template match="*" mode="list" priority="1">
  1829. <xsl:copy>
  1830. <xsl:copy-of select="@*"/>
  1831. <xsl:apply-templates mode="list"/>
  1832. </xsl:copy>
  1833. </xsl:template>
  1834. <!--
  1835. * - This next template is required to copy all other elements into the result.
  1836. -->
  1837. <xsl:template match="*">
  1838. <xsl:copy>
  1839. <xsl:copy-of select="@*"/>
  1840. <xsl:apply-templates/>
  1841. </xsl:copy>
  1842. </xsl:template>
  1843. </xsl:stylesheet>