p_include_main.xsl 174 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. +===================================================================+
  4. | Licensed Materials - Property of IBM
  5. | BI and PM: prmt
  6. | (C) Copyright IBM Corp. 2002, 2022
  7. |
  8. | US Government Users Restricted Rights - Use, duplication or
  9. | disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  10. |
  11. +===================================================================+
  12. ////////////////////////////////////////////////////////////////////////
  13. // p_include_main.xsl
  14. ///////////////////////////////////////////////////////////////////////
  15. This XSL file defines a common interface for using prompting controls. Prompt controls are used to create forms for user input
  16. with rich, browser specific user interfaces.
  17. This file serves two purposes:
  18. 1) to be used in combination with an XML input document, appropriate XSL style sheets and XSLt transformer to produce the
  19. desired browser output.
  20. 2) to be used as an example for calling prompt control templates from other products (e.g. via: XSL, XTS, C++, Java, ...). This file
  21. encapsulates the prompting control functionality so that developers can include prompting controls with a few tags.
  22. -->
  23. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xsl">
  24. <xsl:param name="webcontentRootURI"><xsl:value-of select="$webRoot"/></xsl:param>
  25. <xsl:param name="skin_folder"><xsl:value-of select="$webcontentRootURI"/>/skins/<xsl:value-of select="$skin"/></xsl:param>
  26. <xsl:param name="CognosViewerID" select="''"/>
  27. <xsl:param name="CVObject">
  28. <xsl:text/>oCV<xsl:value-of select="$CognosViewerID"/>.<xsl:text/>
  29. </xsl:param>
  30. <xsl:param name="UseFullPrmtCompiled" select="'true'"/>
  31. <xsl:param name="PRMT_isLocaleValidated" select="'false'"/>
  32. <xsl:param name="HTML5PromptControls" select="'false'"/>
  33. <!-- prompt submit type determines how to submit the data -->
  34. <xsl:variable name="promptSubmitType">XML</xsl:variable>
  35. <xsl:variable name="promptLocaleLanguage" select="substring($promptLocale, 1, 2)"/>
  36. <xsl:variable name="validConfigLocale">
  37. <xsl:choose>
  38. <xsl:when test="$PRMT_isLocaleValidated='true' or document(concat($cogLocalePath,'/coglocale.xml'))/localeConfiguration/supportedProductLocales/locale[@id=$promptLocaleLanguage]">
  39. <xsl:value-of select="$promptLocale"/>
  40. </xsl:when>
  41. <xsl:otherwise></xsl:otherwise>
  42. </xsl:choose>
  43. </xsl:variable>
  44. <xsl:variable name="validLocale">
  45. <xsl:choose>
  46. <xsl:when test="$PRMT_isLocaleValidated='true'">
  47. <xsl:text/><xsl:value-of select="$promptLocale"/><xsl:text/>
  48. </xsl:when>
  49. <xsl:when test="$validConfigLocale!=''">
  50. <xsl:text/><xsl:value-of select="$validConfigLocale"/><xsl:text/>
  51. </xsl:when>
  52. <xsl:otherwise>
  53. <xsl:choose>
  54. <xsl:when test="contains('ar en ca cs da de es el fi fr hr hu id in it ja kk ko ms nl no nb pl pt ro ru sl sv th tr zh ', concat(' ', substring($promptLocale, 1, 2), ' '))">
  55. <xsl:text/><xsl:value-of select="$promptLocale"/><xsl:text/>
  56. </xsl:when>
  57. <xsl:otherwise><xsl:text/>en<xsl:text/></xsl:otherwise>
  58. </xsl:choose>
  59. </xsl:otherwise>
  60. </xsl:choose>
  61. </xsl:variable>
  62. <xsl:variable name="ClientPromptingLocale">
  63. <xsl:choose>
  64. <xsl:when test="starts-with($validLocale,'zh')">
  65. <xsl:choose>
  66. <xsl:when test="$validLocale='zh'">zh-cn</xsl:when>
  67. <xsl:otherwise><xsl:value-of select="$validLocale"/></xsl:otherwise>
  68. </xsl:choose>
  69. </xsl:when>
  70. <xsl:when test="$promptLocale!=''"><xsl:value-of select="substring($validLocale, 0,3)"/></xsl:when>
  71. <xsl:otherwise>en</xsl:otherwise>
  72. </xsl:choose>
  73. </xsl:variable>
  74. <xsl:variable name="ClientPromptingValidLocale">
  75. <xsl:choose>
  76. <xsl:when test="$ClientPromptingLocale!='en' and document(concat('./promptingStrings_',$ClientPromptingLocale,'.xml'))" >
  77. <xsl:value-of select="$ClientPromptingLocale"/>
  78. </xsl:when>
  79. <xsl:otherwise>en</xsl:otherwise>
  80. </xsl:choose>
  81. </xsl:variable>
  82. <xsl:variable name="ClientPromptingStrings" select="document(concat('./promptingStrings_',$ClientPromptingValidLocale,'.xml'))"/>
  83. <!--
  84. create a key map for any selected user choices
  85. there are typically going to be fewer selected choices than options to choose from
  86. -->
  87. <xsl:key name="select-options-by-useValue" match="/Document/DATA//selectChoices/selectOption" use="concat(../../@name, @useValue)"/>
  88. <xsl:key name="select-options-by-displayValue" match="/Document/DATA//selectChoices/selectOption" use="concat(../../@name, @displayValue)"/>
  89. <!--
  90. /////////////////////////////////////////////////////////
  91. // Prompt Controls Interface
  92. /////////////////////////////////////////////////////////
  93. -->
  94. <xsl:template match="selectValue | textBox | selectInterval | selectDate | selectDateTime | selectTime | selectWithTree | selectWithSearch | selectFile" priority="1">
  95. <xsl:variable name="sPromptId">
  96. <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
  97. <xsl:value-of select="$CognosViewerID"/>
  98. </xsl:variable>
  99. <div id="PRMT_{$sPromptId}" class="clsPromptComponent"></div>
  100. <xsl:if test="local-name() = 'selectValue'">
  101. <xsl:apply-templates mode="render" select="."/>
  102. </xsl:if>
  103. <script language="javascript" type="text/javascript">
  104. <xsl:text>
  105. </xsl:text>
  106. <xsl:choose>
  107. <xsl:when test="not($CognosViewerID)">
  108. <xsl:text/>G_PM_THIS_<xsl:value-of select="$CognosViewerID"/>.F_Add(<xsl:text/>
  109. </xsl:when>
  110. <xsl:otherwise>
  111. <xsl:text/>G_PM<xsl:value-of select="$CognosViewerID"/>.F_Add(<xsl:text/>
  112. </xsl:otherwise>
  113. </xsl:choose>
  114. <xsl:apply-templates mode="json" select="."/>
  115. <xsl:text>,{_id_:'</xsl:text>
  116. <xsl:value-of select="$sPromptId"/>
  117. <xsl:text>',CVId:'</xsl:text>
  118. <xsl:value-of select="$CognosViewerID"/>
  119. <xsl:text>'});
  120. </xsl:text>
  121. </script>
  122. </xsl:template>
  123. <xsl:template match="selectValue" mode="render">
  124. <xsl:variable name="sPromptId">
  125. <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
  126. <xsl:value-of select="$CognosViewerID"/>
  127. </xsl:variable>
  128. <xsl:variable name="selectValueUI">
  129. <xsl:choose>
  130. <!-- if it's a range, we force it as a dropdown -->
  131. <xsl:when test="@range='true'">dropdown</xsl:when>
  132. <xsl:otherwise><xsl:value-of select="@selectValueUI"/></xsl:otherwise>
  133. </xsl:choose>
  134. </xsl:variable>
  135. <xsl:choose>
  136. <xsl:when test="$selectValueUI = 'radioGroup' or $selectValueUI = 'checkboxGroup'">
  137. <xsl:variable name="inputType">
  138. <xsl:choose>
  139. <xsl:when test="@multiSelect = 'true'">checkbox</xsl:when>
  140. <xsl:otherwise>radio</xsl:otherwise>
  141. </xsl:choose>
  142. </xsl:variable>
  143. <xsl:variable name="disabled" select="@disabled"/>
  144. <div id="PRMT_SV_{$sPromptId}" class="clsCheckBoxList pv">
  145. <xsl:if test="$disabled">
  146. <xsl:attribute name="disabled">disabled</xsl:attribute>
  147. </xsl:if>
  148. <xsl:choose>
  149. <xsl:when test="$inputType = 'radio'">
  150. <xsl:attribute name="role">radiogroup</xsl:attribute>
  151. </xsl:when>
  152. <xsl:otherwise>
  153. <xsl:attribute name="role">group</xsl:attribute>
  154. <xsl:attribute name="aria-label"><xsl:value-of select="substring-before($ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='UIM']/string[@id='VALU_CHECKBOX_MULTISELECT_INSTRUCTIONS'],'^1')"/><xsl:value-of select="@parameter"/><xsl:value-of select="substring-after($ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='UIM']/string[@id='VALU_CHECKBOX_MULTISELECT_INSTRUCTIONS'],'^1')"/></xsl:attribute>
  155. </xsl:otherwise>
  156. </xsl:choose>
  157. <xsl:for-each select="./selectOptions/selectOption">
  158. <xsl:variable name="sOptionId">
  159. <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
  160. <xsl:value-of select="$CognosViewerID"/>
  161. </xsl:variable>
  162. <div class="clsCheckBoxRow">
  163. <div class="clsCheckBox">
  164. <input name="pOpt_{$sPromptId}" id="{$sOptionId}" type="{$inputType}" role="{$inputType}" value="{@useValue}" dv="{@displayValue}" class="dijitCheckBoxInput">
  165. <xsl:if test="@selected">
  166. <xsl:attribute name="checked"/>
  167. </xsl:if>
  168. <xsl:if test="@nullUse">
  169. <xsl:attribute name="nullUse">
  170. <xsl:value-of select="@nullUse"/>
  171. </xsl:attribute>
  172. </xsl:if>
  173. <xsl:if test="@nullDisplay">
  174. <xsl:attribute name="nullDisplay">
  175. <xsl:value-of select="@nullDisplay"/>
  176. </xsl:attribute>
  177. </xsl:if>
  178. <xsl:choose>
  179. <xsl:when test="$disabled">
  180. <xsl:attribute name="disabled">disabled</xsl:attribute>
  181. </xsl:when>
  182. <xsl:otherwise>
  183. <xsl:attribute name="onclick">return PRMTUtils.F_OnChange(event, this);</xsl:attribute>
  184. <xsl:attribute name="onkeypress">return PRMTUtils.F_OnChange(event, this);</xsl:attribute>
  185. <xsl:attribute name="onfocus">return PRMTUtils.f_CheckboxOnFocus(this);</xsl:attribute>
  186. <xsl:attribute name="onblur">return PRMTUtils.f_CheckboxOnBlur(this);</xsl:attribute>
  187. </xsl:otherwise>
  188. </xsl:choose>
  189. </input>
  190. </div>
  191. <xsl:variable name="sDisplayValue">
  192. <xsl:choose>
  193. <xsl:when test="@displayValue and @displayValue!=''">
  194. <xsl:value-of select="@displayValue"/>
  195. </xsl:when>
  196. <xsl:otherwise>
  197. <xsl:value-of select="@useValue"/>
  198. </xsl:otherwise>
  199. </xsl:choose>
  200. </xsl:variable>
  201. <label for="{$sOptionId}">
  202. <xsl:value-of select="translate($sDisplayValue, ' ', '&#160;')"/>
  203. </label>
  204. </div>
  205. </xsl:for-each>
  206. </div>
  207. </xsl:when>
  208. <xsl:otherwise>
  209. <select id="PRMT_SV_{$sPromptId}" class="clsSelectControl pv">
  210. <xsl:attribute name="role">listbox</xsl:attribute>
  211. <xsl:if test="@multiSelect='true' and @selectValueUI!='dropdown'">
  212. <xsl:attribute name="multiple">multiple</xsl:attribute>
  213. </xsl:if>
  214. <xsl:if test="@columnName and ($selectValueUI='dropdown' or not(@required='true' or @multiSelect='true'))">
  215. <xsl:attribute name="hasLabel">true</xsl:attribute>
  216. <option><xsl:value-of select="@columnName"/></option>
  217. <option>--------------------------------------------</option>
  218. </xsl:if>
  219. <xsl:for-each select="./selectOptions/selectOption">
  220. <option value="{@useValue}" dv="{@displayValue}">
  221. <xsl:attribute name="role">option</xsl:attribute>
  222. <xsl:attribute name="aria-selected">false</xsl:attribute>
  223. <xsl:if test="@selected">
  224. <xsl:attribute name="selected"/>
  225. </xsl:if>
  226. <xsl:if test="@nullUse">
  227. <xsl:attribute name="nullUse">
  228. <xsl:value-of select="@nullUse"/>
  229. </xsl:attribute>
  230. </xsl:if>
  231. <xsl:if test="@nullDisplay">
  232. <xsl:attribute name="nullDisplay">
  233. <xsl:value-of select="@nullDisplay"/>
  234. </xsl:attribute>
  235. </xsl:if>
  236. <xsl:variable name="sDisplayValue">
  237. <xsl:choose>
  238. <xsl:when test="@displayValue and @displayValue!=''">
  239. <xsl:value-of select="@displayValue"/>
  240. </xsl:when>
  241. <xsl:otherwise>
  242. <xsl:value-of select="@useValue"/>
  243. </xsl:otherwise>
  244. </xsl:choose>
  245. </xsl:variable>
  246. <xsl:value-of select="translate($sDisplayValue, ' ', '&#160;')"/>
  247. </option>
  248. </xsl:for-each>
  249. </select>
  250. </xsl:otherwise>
  251. </xsl:choose>
  252. </xsl:template>
  253. <xsl:template match="@*" mode="json">
  254. <xsl:text>"@</xsl:text>
  255. <xsl:value-of select="name()"/>
  256. <xsl:text>":</xsl:text>
  257. <xsl:choose>
  258. <xsl:when test=" . = 'true' ">true</xsl:when>
  259. <xsl:when test=" . = 'false' ">false</xsl:when>
  260. <xsl:otherwise>"<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="."/></xsl:call-template>"</xsl:otherwise>
  261. </xsl:choose>
  262. </xsl:template>
  263. <xsl:template match="*" mode="json">
  264. <xsl:text>{n:'</xsl:text>
  265. <xsl:value-of select="local-name()"/>
  266. <xsl:text>'</xsl:text>
  267. <xsl:for-each select="@*">
  268. <xsl:text>,</xsl:text>
  269. <xsl:apply-templates mode="json" select="."/>
  270. </xsl:for-each>
  271. <xsl:if test="*">
  272. <xsl:text>,c:[</xsl:text>
  273. <xsl:for-each select="*">
  274. <xsl:if test="position()&gt;1">,</xsl:if>
  275. <xsl:apply-templates mode="json" select="."/>
  276. </xsl:for-each>
  277. <xsl:text>]</xsl:text>
  278. </xsl:if>
  279. <xsl:text>}</xsl:text>
  280. </xsl:template>
  281. <!-- ****************** prompt button templates ****************** -->
  282. <xsl:template match="promptButton" priority="1">
  283. <xsl:call-template name="getPromptButton">
  284. <xsl:with-param name="promptLocale" select="$promptLocale" />
  285. <xsl:with-param name="promptDisplayValue" select="OTI" />
  286. <xsl:with-param name="promptStyle">
  287. <xsl:call-template name="getPromptButtonStyle">
  288. <xsl:with-param name="promptButton" select="."/>
  289. </xsl:call-template>
  290. </xsl:with-param>
  291. <xsl:with-param name="promptType" select="@type" />
  292. <xsl:with-param name="promptBackURL" select="@backURL"/>
  293. <xsl:with-param name="promptClass" select="@class"/>
  294. <xsl:with-param name="promptButtonName" select="@name"/>
  295. </xsl:call-template>
  296. </xsl:template>
  297. <xsl:template name="getPromptButtonStyle">
  298. <xsl:param name="promptButton"/>
  299. <xsl:choose>
  300. <xsl:when test="$promptButton/@style">
  301. <xsl:value-of select="@style"/>
  302. </xsl:when>
  303. <xsl:when test="$promptButton/@styleId">
  304. <xsl:variable name="styleId" select="$promptButton/@styleId"/>
  305. <xsl:value-of select="/Document/styleOptions/cssOptStyle[@styleId=$styleId]/@value"/>
  306. </xsl:when>
  307. </xsl:choose>
  308. </xsl:template>
  309. <!-- ****************** default prompt page templates ****************** -->
  310. <xsl:template match="OTD[@layoutClass='pageHeader' and @defaultPromptHeader = 'true']" priority="1">
  311. <td>
  312. <xsl:call-template name="getDefaultPromptHeader">
  313. <xsl:with-param name="promptLocale" select="$promptLocale" />
  314. <xsl:with-param name="promptPageTitle" select="@reportTitle"/>
  315. <xsl:with-param name="promptBackURL" select="@backURL"/>
  316. </xsl:call-template>
  317. </td>
  318. </xsl:template>
  319. <xsl:template match="FORM[@layoutClass='block' and @defaultPromptControl='true']" priority="1">
  320. <xsl:call-template name="getDefaultPromptControl" >
  321. <xsl:with-param name="promptLocale" select="$promptLocale" />
  322. <xsl:with-param name="promptType" select="@type"/>
  323. <xsl:with-param name="promptCalculationName" select="@calculationName"/>
  324. <xsl:with-param name="promptExpression" select="@expression"/>
  325. <xsl:with-param name="promptOperator" select="@operator"/>
  326. <xsl:with-param name="promptDataType" select="@dataType"/>
  327. <xsl:with-param name="promptColumnName" select="@columnName"/>
  328. </xsl:call-template>
  329. </xsl:template>
  330. <xsl:template match="defaultCascadingPrompt" priority="1">
  331. <xsl:call-template name="getDefaultCascadingPrompt" >
  332. <xsl:with-param name="promptLocale" select="$promptLocale" />
  333. <xsl:with-param name="promptColumnName" select="@columnName"/>
  334. </xsl:call-template>
  335. </xsl:template>
  336. <xsl:template match="defaultCascadingPromptControl" priority="1">
  337. <xsl:call-template name="getDefaultCascadingPromptControl" >
  338. <xsl:with-param name="promptLocale" select="$promptLocale" />
  339. <xsl:with-param name="promptColumnName" select="@columnName"/>
  340. <xsl:with-param name="promptOperator" select="@operator"/>
  341. </xsl:call-template>
  342. </xsl:template>
  343. <xsl:template match="OTD[@layoutClass='pageFooter' and @defaultPromptFooter = 'true']" priority="1">
  344. <td>
  345. <xsl:choose>
  346. <xsl:when test="contains(//Document/styleOptions/namedCssStyleText, '.bp{')">
  347. <xsl:call-template name="getDefaultPromptFooter" >
  348. <xsl:with-param name="promptLocale" select="$promptLocale" />
  349. <xsl:with-param name="promptBackURL" select="@backURL"/>
  350. <xsl:with-param name="promptClass" select="'bp'"/>
  351. </xsl:call-template>
  352. </xsl:when>
  353. <xsl:otherwise>
  354. <xsl:call-template name="getDefaultPromptFooter" >
  355. <xsl:with-param name="promptLocale" select="$promptLocale" />
  356. <xsl:with-param name="promptBackURL" select="@backURL"/>
  357. <xsl:with-param name="promptClass" select="''"/>
  358. </xsl:call-template>
  359. </xsl:otherwise>
  360. </xsl:choose>
  361. </td>
  362. </xsl:template>
  363. <!--
  364. ////////////////////////////////////////////////////////////////////////
  365. // Data Source Signon Interface
  366. ///////////////////////////////////////////////////////////////////////
  367. -->
  368. <xsl:template match="selectDataSourceSignon" priority="1">
  369. <xsl:call-template name="getSelectDataSourceSignon" >
  370. <xsl:with-param name="promptLocale" select="$promptLocale" />
  371. <xsl:with-param name="promptParameter" select="@parameter" />
  372. <xsl:with-param name="promptConnectionName" select="@connectionName" />
  373. <xsl:with-param name="promptSearchPath" select="@searchPath" />
  374. <xsl:with-param name="promptFaultCode" select="//PAGE/@faultcode" />
  375. </xsl:call-template>
  376. </xsl:template>
  377. <!--
  378. ////////////////////////////////////////////////////////////////////////
  379. // Utility functions
  380. ///////////////////////////////////////////////////////////////////////
  381. -->
  382. <xsl:template name="convertQuotes">
  383. <xsl:param name="str"/>
  384. <xsl:choose>
  385. <xsl:when test="contains($str, '&quot;')">
  386. <xsl:call-template name="convertQuotes">
  387. <xsl:with-param name="str" select="substring-before($str, '&quot;')"/>
  388. </xsl:call-template>\&quot;<xsl:call-template name="convertQuotes">
  389. <xsl:with-param name="str" select="substring-after($str, '&quot;')"/>
  390. </xsl:call-template>
  391. </xsl:when>
  392. <xsl:when test="contains($str, '\')">
  393. <xsl:call-template name="convertQuotes">
  394. <xsl:with-param name="str" select="substring-before($str, '\')"/>
  395. </xsl:call-template>\\<xsl:call-template name="convertQuotes">
  396. <xsl:with-param name="str" select="substring-after($str, '\')"/>
  397. </xsl:call-template>
  398. </xsl:when>
  399. <xsl:when test="contains($str, '&#10;')">
  400. <xsl:call-template name="convertQuotes">
  401. <xsl:with-param name="str" select="substring-before($str, '&#10;')"/>
  402. </xsl:call-template>\n<xsl:call-template name="convertQuotes">
  403. <xsl:with-param name="str" select="substring-after($str, '&#10;')"/>
  404. </xsl:call-template>
  405. </xsl:when>
  406. <xsl:when test="contains($str, '&#13;')">
  407. <xsl:call-template name="convertQuotes">
  408. <xsl:with-param name="str" select="substring-before($str, '&#13;')"/>
  409. </xsl:call-template>\r<xsl:call-template name="convertQuotes">
  410. <xsl:with-param name="str" select="substring-after($str, '&#13;')"/>
  411. </xsl:call-template>
  412. </xsl:when>
  413. <xsl:otherwise>
  414. <xsl:call-template name="convertLTGT">
  415. <xsl:with-param name="str" select="$str"/>
  416. </xsl:call-template>
  417. </xsl:otherwise>
  418. </xsl:choose>
  419. </xsl:template>
  420. <xsl:template name="convertLTGT">
  421. <xsl:param name="str"/>
  422. <xsl:param name="encodeApos"/>
  423. <xsl:variable name="theApos">'</xsl:variable>
  424. <xsl:choose>
  425. <xsl:when test="contains($str, '&lt;')">
  426. <xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="$encodeApos"/>
  427. <xsl:with-param name="str" select="substring-before($str, '&lt;')"/>
  428. </xsl:call-template>\\U003C<xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="$encodeApos"/>
  429. <xsl:with-param name="str" select="substring-after($str, '&lt;')"/>
  430. </xsl:call-template>
  431. </xsl:when>
  432. <xsl:when test="contains($str, '&gt;')">
  433. <xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="$encodeApos"/>
  434. <xsl:with-param name="str" select="substring-before($str, '&gt;')"/>
  435. </xsl:call-template>\\U003E<xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="$encodeApos"/>
  436. <xsl:with-param name="str" select="substring-after($str, '&gt;')"/>
  437. </xsl:call-template>
  438. </xsl:when>
  439. <xsl:when test="$encodeApos=true() and contains($str, $theApos)">
  440. <xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="$encodeApos"/>
  441. <xsl:with-param name="str" select="substring-before($str, $theApos)"/>
  442. </xsl:call-template>\&apos;<xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="$encodeApos"/>
  443. <xsl:with-param name="str" select="substring-after($str, $theApos)"/>
  444. </xsl:call-template>
  445. </xsl:when>
  446. <xsl:otherwise>
  447. <xsl:value-of select="$str"/>
  448. </xsl:otherwise>
  449. </xsl:choose>
  450. </xsl:template>
  451. <xsl:template name="getButtonType">
  452. <xsl:variable name="faultcode" select="//PAGE/@faultcode"/>
  453. <xsl:choose>
  454. <xsl:when test="$faultcode='CQE-804' or $faultcode ='CQE-805' or $faultcode ='CQE-806'">CLOSE</xsl:when>
  455. <xsl:when test="//selectDataSourceSignon[@faultcode='CQE-803' and not(@faultSubcode='1' or @faultSubcode='6')]">CLOSE</xsl:when>
  456. <xsl:when test="//PAGE[@defaultOnly='false']">WIZARD</xsl:when>
  457. <xsl:otherwise>OKCANCEL</xsl:otherwise>
  458. </xsl:choose>
  459. </xsl:template>
  460. <xsl:template name="getOKButtonPromptType">
  461. <xsl:choose>
  462. <xsl:when test="//OTD[@layoutClass='pageFooter' and @defaultPromptFooter='true' and @promptRunOption='true']">next</xsl:when>
  463. <xsl:otherwise>finish</xsl:otherwise>
  464. </xsl:choose>
  465. </xsl:template>
  466. <!-- If buttontype is OKCANCEL and its onclick is next then return true anything else returns false -->
  467. <xsl:template name="isOKButtonPromptTypeNext">
  468. <xsl:variable name="buttonType"><xsl:call-template name="getButtonType"/></xsl:variable>
  469. <xsl:variable name="okButtonPromptType"><xsl:call-template name="getOKButtonPromptType"/></xsl:variable>
  470. <xsl:choose>
  471. <xsl:when test="$buttonType = 'OKCANCEL' and $okButtonPromptType = 'next'">true</xsl:when>
  472. <xsl:otherwise>false</xsl:otherwise>
  473. </xsl:choose>
  474. </xsl:template>
  475. <!--
  476. /////////////////////////////////////////////////////////
  477. // Prompt Control Include Templates
  478. /////////////////////////////////////////////////////////
  479. Includes provide required javascript and CSS styles for the HTML output.
  480. There are two ways to use these includes:
  481. 1) use 'getPromptHeadIncludes' - this will inspect the input document and supply the
  482. correct includes. This is a convenient function, but costly because it uses '//' to find elements
  483. 2) call the includes directly - use this method if you are crafting your own user interface in
  484. XML, XSL or XTS and know exactly what controls to include, and have control over the output.
  485. Prompt Control Includes (No Hints)
  486. Test for the presence of controls in the input document.
  487. Ensure that the right files get included in the head of the output.
  488. -->
  489. <xsl:template name="getPromptHeadIncludes">
  490. <xsl:param name="promptLocale"/>
  491. <xsl:param name="promptContentLocale"/>
  492. <!-- check to see if prompts are needed -->
  493. <xsl:if test="/Document/DATA//promptButton or /Document/DATA//defaultPromptFooter or /Document/DATA//selectValue or /Document/DATA//textBox or /Document/DATA//selectDate or /Document/DATA//selectWithSearch or /Document/DATA//selectWithTree or /Document/DATA//selectTime or /Document/DATA//selectInterval or /Document/DATA//selectDateTime or /Document/DATA//selectDataSourceSignon or /Document/DATA//selectFile">
  494. <!-- stylesheet the common includes for prompting controls -->
  495. <xsl:call-template name="getPromptCommonIncludes"/>
  496. <xsl:variable name="promptContentLocaleSubstring" select="substring($promptContentLocale, 0,6)"/>
  497. <script language="javascript" src="{$webcontentRootURI}/prompting/res/promptLocale_{$promptContentLocaleSubstring}.js" type="text/javascript">/**/</script>
  498. </xsl:if>
  499. </xsl:template>
  500. <xsl:template name="PromptJavascriptFiles">
  501. <!-- -->
  502. <xsl:choose>
  503. <xsl:when test="$UseFullPrmtCompiled = 'true'">
  504. <script language="javascript" src="{$webcontentRootURI}/prompting/PRMTcompiled.js" type="text/javascript">/**/</script>
  505. </xsl:when>
  506. <xsl:otherwise>
  507. <script language="javascript" src="{$webcontentRootURI}/prompting/prmt_core.js" type="text/javascript">/**/</script>
  508. </xsl:otherwise>
  509. </xsl:choose>
  510. <!-- -->
  511. <!--
  512. <script language="javascript" src="{$webcontentRootURI}/prompting/constants.js" type="text/javascript">/**/</script>
  513. <script language="javascript" src="{$webcontentRootURI}/prompting/extensions.js" type="text/javascript">/**/</script>
  514. <script language="javascript" src="{$webcontentRootURI}/prompting/BidiUtils.js" type="text/javascript">/**/</script>
  515. <script language="javascript" src="{$webcontentRootURI}/prompting/C_PromptElement.js" type="text/javascript">/**/</script>
  516. <script language="javascript" src="{$webcontentRootURI}/prompting/cognos.js" type="text/javascript">/**/</script>
  517. <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/prompt.js" type="text/javascript">/**/</script>
  518. <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control.js" type="text/javascript">/**/</script>
  519. <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/parameter.js" type="text/javascript">/**/</script>
  520. <script language="javascript" src="{$webcontentRootURI}/prompting/value/value.js" type="text/javascript">/**/</script>
  521. <script language="javascript" src="{$webcontentRootURI}/prompting/report/report.js" type="text/javascript">/**/</script>
  522. <script language="javascript" src="{$webcontentRootURI}/prompting/report/action.js" type="text/javascript">/**/</script>
  523. <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/Range.js" type="text/javascript">/**/</script>
  524. <script language="javascript" src="{$webcontentRootURI}/prompting/C_Choices.js" type="text/javascript">/**/</script>
  525. <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/SelectValue.js" type="text/javascript">/**/</script>
  526. <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/Text.js" type="text/javascript">/**/</script>
  527. <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/Interval.js" type="text/javascript">/**/</script>
  528. <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/Date.js" type="text/javascript">/**/</script>
  529. <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/Time.js" type="text/javascript">/**/</script>
  530. <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/DateTime.js" type="text/javascript">/**/</script>
  531. <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/Tree.js" type="text/javascript">/**/</script>
  532. <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/PickTree.js" type="text/javascript">/**/</script>
  533. <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/Search.js" type="text/javascript">/**/</script>
  534. <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/SelectFile.js" type="text/javascript">/**/</script>
  535. <script language="javascript" src="{$webcontentRootURI}/prompting/DateHelper.js" type="text/javascript">/**/</script>
  536. <script language="javascript" src="{$webcontentRootURI}/prompting/TimeHelper.js" type="text/javascript">/**/</script>
  537. <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/SelectHTML5Date.js" type="text/javascript">/**/</script>
  538. <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/SelectHTML5Time.js" type="text/javascript">/**/</script>
  539. <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/SelectHTML5DateTime.js" type="text/javascript">/**/</script>
  540. <script language="javascript" src="{$webcontentRootURI}/prompting/prompting.js" type="text/javascript">/**/</script>
  541. <script language="javascript" src="{$webcontentRootURI}/prompting/CDispatcher.js" type="text/javascript">/**/</script>
  542. <script language="javascript" src="{$webcontentRootURI}/prompting/CRange.js" type="text/javascript">/**/</script>
  543. <script language="javascript" src="{$webcontentRootURI}/prompting/CMultipleRange.js" type="text/javascript">/**/</script>
  544. <script language="javascript" src="{$webcontentRootURI}/prompting/CText.js" type="text/javascript">/**/</script>
  545. <script language="javascript" src="{$webcontentRootURI}/prompting/CMultipleTextPicker.js" type="text/javascript">/**/</script>
  546. <script language="javascript" src="{$webcontentRootURI}/prompting/CSelectValueSelectList.js" type="text/javascript">/**/</script>
  547. <script language="javascript" src="{$webcontentRootURI}/prompting/CSelectValueInputList.js" type="text/javascript">/**/</script>
  548. <script language="javascript" src="{$webcontentRootURI}/prompting/CDatePickerIE5.js" type="text/javascript">/**/</script>
  549. <script language="javascript" src="{$webcontentRootURI}/prompting/CDatePickerCommon.js" type="text/javascript">/**/</script>
  550. <script language="javascript" src="{$webcontentRootURI}/prompting/CDatePickerDialogIE5.js" type="text/javascript">/**/</script>
  551. <script language="javascript" src="{$webcontentRootURI}/prompting/CMultipleDatePicker.js" type="text/javascript">/**/</script>
  552. <script language="javascript" src="{$webcontentRootURI}/prompting/CTimePickerIE5.js" type="text/javascript">/**/</script>
  553. <script language="javascript" src="{$webcontentRootURI}/prompting/CClockIE5.js" type="text/javascript">/**/</script>
  554. <script language="javascript" src="{$webcontentRootURI}/prompting/CMultipleTimePicker.js" type="text/javascript">/**/</script>
  555. <script language="javascript" src="{$webcontentRootURI}/prompting/CDateTime.js" type="text/javascript">/**/</script>
  556. <script language="javascript" src="{$webcontentRootURI}/prompting/CSearch.js" type="text/javascript">/**/</script>
  557. <script language="javascript" src="{$webcontentRootURI}/prompting/CTreeIE5NS6.js" type="text/javascript">/**/</script>
  558. <script language="javascript" src="{$webcontentRootURI}/prompting/CInnerTree.js" type="text/javascript">/**/</script>
  559. <script language="javascript" src="{$webcontentRootURI}/prompting/CInnerTreeIOS.js" type="text/javascript">/**/</script>
  560. <script language="javascript" src="{$webcontentRootURI}/prompting/CIntervalPicker.js" type="text/javascript">/**/</script>
  561. <script language="javascript" src="{$webcontentRootURI}/prompting/CMultipleIntervalPicker.js" type="text/javascript">/**/</script>
  562. <script language="javascript" src="{$webcontentRootURI}/prompting/CMultipleDateTimePicker.js" type="text/javascript">/**/</script>
  563. <script language="javascript" src="{$webcontentRootURI}/prompting/CPromptButton.js" type="text/javascript">/**/</script>
  564. <script language="javascript" src="{$webcontentRootURI}/prompting/CSelectDataSourceSignon.js" type="text/javascript">/**/</script>
  565. <script language="javascript" src="{$webcontentRootURI}/prompting/prmtGenTextBoxHTML.js" type="text/javascript">/**/</script>
  566. <script language="javascript" src="{$webcontentRootURI}/prompting/prmtGenSelectValueHTML.js" type="text/javascript">/**/</script>
  567. <script language="javascript" src="{$webcontentRootURI}/prompting/prmtGenIntervalHTML.js" type="text/javascript">/**/</script>
  568. <script language="javascript" src="{$webcontentRootURI}/prompting/prmtGenDateTimeHTML.js" type="text/javascript">/**/</script>
  569. -->
  570. </xsl:template>
  571. <!-- common includes required by all prompt controls -->
  572. <xsl:template name="getPromptCommonIncludes">
  573. <xsl:call-template name="getPromptIncludes">
  574. <xsl:with-param name="skinFolder" select="$skin_folder"/>
  575. <xsl:with-param name="webRootURI" select="$webcontentRootURI"/>
  576. </xsl:call-template>
  577. </xsl:template>
  578. <!-- common includes required by all prompt controls -->
  579. <xsl:template name="getPromptIncludes">
  580. <xsl:param name="skinFolder"/>
  581. <xsl:param name="webRootURI"/>
  582. <script type="text/javascript">
  583. <!-- Set oCV to window if no CCognosViewer instance is available ( like in QS ) -->
  584. try{if (typeof oCV<xsl:value-of select="$CognosViewerID"/>=="undefined"){oCV<xsl:value-of select="$CognosViewerID"/>=window;}}
  585. catch(e){oCV<xsl:value-of select="$CognosViewerID"/>=window;}
  586. </script>
  587. <link href="{$skinFolder}/prompting/promptCommon.css" type="text/css" rel="stylesheet"/>
  588. <script language="javascript" src="{$webRootURI}/prompting/properties.js" type="text/javascript">/**/</script>
  589. <xsl:call-template name="PromptJavascriptFiles"/>
  590. <xsl:if test="$validLocale!='en'">
  591. <script language="javascript" type="text/javascript" src="{$webRootURI}/prompting/res/promptingStrings_en.js">
  592. <xsl:text>/**/</xsl:text>
  593. </script>
  594. <script language="javascript" type="text/javascript" src="{$webRootURI}/prompting/res/promptLocale_en.js">
  595. <xsl:text>/**/</xsl:text>
  596. </script>
  597. </xsl:if>
  598. <script language="javascript" type="text/javascript">
  599. <xsl:variable name="promptingStringsLocale">
  600. <xsl:choose>
  601. <xsl:when test="$validLocale='zh'">zh-cn</xsl:when>
  602. <xsl:when test="string-length($validLocale)&gt;2 and not(starts-with($validLocale,'zh'))"><xsl:value-of select="substring($validLocale, 0, 3)"/></xsl:when>
  603. <xsl:otherwise><xsl:value-of select="$validLocale"/></xsl:otherwise>
  604. </xsl:choose>
  605. </xsl:variable>
  606. <xsl:attribute name="src"><xsl:value-of select="$webRootURI"/>/prompting/res/<xsl:value-of select="concat('promptingStrings_',$promptingStringsLocale,'.js')"/></xsl:attribute>
  607. <xsl:text>/**/</xsl:text>
  608. </script>
  609. <xsl:variable name="PL">
  610. <xsl:choose>
  611. <xsl:when test="$validLocale='zh'">zh-cn</xsl:when>
  612. <xsl:when test="string-length($validLocale)&gt;5 and not(starts-with($validLocale,'zh'))">
  613. <xsl:value-of select="substring($validLocale, 0, 6)"/>
  614. </xsl:when>
  615. <xsl:otherwise>
  616. <xsl:value-of select="$validLocale"/>
  617. </xsl:otherwise>
  618. </xsl:choose>
  619. </xsl:variable>
  620. <script language="javascript" type="text/javascript" src="{$webRootURI}/prompting/res/promptLocale_{$PL}.js">
  621. <xsl:text>/**/</xsl:text>
  622. </script>
  623. <script language="javascript" type="text/javascript">
  624. <xsl:text>
  625. </xsl:text>
  626. var G_IsBidiEnabled = <xsl:value-of select="$PRMT_isBidiEnabled"/>;
  627. var G_PRMT_HTML5PromptControls = <xsl:value-of select="$HTML5PromptControls"/>;
  628. <xsl:choose>
  629. <xsl:when test="not($CognosViewerID)">
  630. <xsl:text/>var G_PM_THIS_<xsl:value-of select="$CognosViewerID"/> = new C_PromptManager();<xsl:text/>
  631. </xsl:when>
  632. <xsl:otherwise>
  633. <xsl:text/>var G_PM<xsl:value-of select="$CognosViewerID"/> = new C_PromptManager(); <xsl:text/>
  634. </xsl:otherwise>
  635. </xsl:choose>
  636. <xsl:value-of select="$CVObject"/>preProcessControlArray=[];<xsl:text/>
  637. <xsl:text/>p_sSkinFolder="<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$skinFolder"/></xsl:call-template>";<xsl:text/>
  638. <xsl:text/>p_sWebContentURI="<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$webRootURI"/></xsl:call-template>";<xsl:text/>
  639. <xsl:value-of select="$CVObject"/>gbPromptRequestSubmitted=false;<xsl:text/>
  640. <!-- prompt button navigation variables -->
  641. <xsl:variable name="bCanFinish">
  642. <xsl:choose>
  643. <xsl:when test="//PAGE[@canFinish = 'false']">false</xsl:when>
  644. <xsl:otherwise>true</xsl:otherwise>
  645. </xsl:choose>
  646. </xsl:variable>
  647. <xsl:value-of select="$CVObject"/>bCanFinish=<xsl:value-of select="$bCanFinish"/>;<xsl:text/>
  648. <xsl:variable name="bCanNext">
  649. <xsl:choose>
  650. <xsl:when test="//PAGE[@canNext = 'false']">false</xsl:when>
  651. <xsl:otherwise>true</xsl:otherwise>
  652. </xsl:choose>
  653. </xsl:variable>
  654. <xsl:value-of select="$CVObject"/>bNextPage=<xsl:value-of select="$bCanNext"/>;<xsl:text/>
  655. <!-- page navigation control observers -->
  656. <xsl:value-of select="$CVObject"/>pageNavigationObserverArray=[];<xsl:text/>
  657. <xsl:value-of select="$CVObject"/>rangeObserverArray=[];<xsl:text/>
  658. <xsl:value-of select="$CVObject"/>multipleObserverArray=[];<xsl:text/>
  659. <xsl:value-of select="$CVObject"/>datePickerObserverArray=[];<xsl:text/>
  660. <xsl:value-of select="$CVObject"/>repromptObserverArray=[];<xsl:text/>
  661. <xsl:value-of select="$CVObject"/>hasPromptKeyDown=false;<xsl:text/>
  662. <xsl:text>
  663. </xsl:text>
  664. </script>
  665. </xsl:template>
  666. <!--
  667. We are leaving these empty templates here because they are still called by other applications, like Query Studio
  668. -->
  669. <xsl:template name="gettextBoxIncludes"/>
  670. <xsl:template name="getselectValueIncludes"/>
  671. <xsl:template name="getselectDateIncludes"/>
  672. <xsl:template name="getselectWithSearchIncludes"/>
  673. <xsl:template name="getselectWithTreeIncludes"/>
  674. <xsl:template name="getselectTimeIncludes"/>
  675. <xsl:template name="getintervalFieldIncludes"/>
  676. <xsl:template name="getselectDateTimeIncludes"/>
  677. <xsl:template name="getPromptButtonIncludes"/>
  678. <xsl:template name="getselectDataSourceSignonIncludes"/>
  679. <!--
  680. ////////////////////////////////////////////////////////////////////////
  681. // Prompt Control Templates
  682. ////////////////////////////////////////////////////////////////////////
  683. -->
  684. <!--
  685. ****** text field input box control, implemented as single, multiple line edit box or password field ******
  686. -->
  687. <xsl:template name="getTextBox">
  688. <xsl:param name="promptLocale"/>
  689. <xsl:param name="promptFormName"/>
  690. <xsl:param name="promptRequired"/>
  691. <xsl:param name="promptHideText"/>
  692. <xsl:param name="promptDefaultValue"/>
  693. <xsl:param name="promptDataType"/>
  694. <xsl:param name="promptMultiLine"/>
  695. <xsl:param name="promptParameter"/>
  696. <xsl:param name="promptStyle"/>
  697. <xsl:param name="promptId"/>
  698. <xsl:param name="promptMultiSelect"/>
  699. <xsl:param name="promptNumbersOnly"/>
  700. <xsl:param name="promptSubmitType"/>
  701. <xsl:param name="promptHideAdornments"/>
  702. <xsl:param name="promptRange"/>
  703. <xsl:param name="promptAllowComplexRange"/>
  704. <xsl:param name="promptSuppressExtraPromptNames"/>
  705. <xsl:param name="promptMaxLength"/>
  706. <xsl:param name="promptShowThousandSeparator"/>
  707. <xsl:param name="promptAllowZero"/>
  708. <xsl:param name="promptReadOnly"/>
  709. <xsl:param name="promptShowCondition"/>
  710. <xsl:param name="promptForceOuterDivWidth"/>
  711. <div class="clsPromptComponent">
  712. <xsl:if test="$promptForceOuterDivWidth='true'"><xsl:attribute name = "style" >width:100%;</xsl:attribute></xsl:if>
  713. <!-- unique identifier for the control, generate one if not -->
  714. <xsl:variable name="sPromptId">
  715. <xsl:choose>
  716. <xsl:when test="$promptId!=''">
  717. <xsl:call-template name="convertQuotes">
  718. <xsl:with-param name="str" select="$promptId"/>
  719. </xsl:call-template>
  720. </xsl:when>
  721. <xsl:otherwise>
  722. <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
  723. </xsl:otherwise>
  724. </xsl:choose>
  725. <xsl:value-of select="$CognosViewerID"/>
  726. </xsl:variable>
  727. <xsl:variable name="promptUseValue">
  728. <xsl:call-template name="convertQuotes">
  729. <xsl:with-param name="str" select="./selectChoices/selectOption/@useValue"/>
  730. </xsl:call-template>
  731. </xsl:variable>
  732. <xsl:variable name="promptDisplayValue">
  733. <xsl:call-template name="convertQuotes">
  734. <xsl:with-param name="str" select="./selectChoices/selectOption/@displayValue"/>
  735. </xsl:call-template>
  736. </xsl:variable>
  737. <div id="textBox{$sPromptId}" class="clsPromptComponent"></div>
  738. <script language="javascript" type="text/javascript">
  739. <xsl:text>genTextBoxHTML({</xsl:text>
  740. <xsl:call-template name="stringProp"><xsl:with-param name="name">formName</xsl:with-param><xsl:with-param name="value" select="concat($promptFormName, $CognosViewerID)"/></xsl:call-template>
  741. <xsl:call-template name="stringProp"><xsl:with-param name="name">parameterName</xsl:with-param><xsl:with-param name="value" select="translate($promptParameter,'&quot;','&#34;')"/></xsl:call-template>
  742. <xsl:call-template name="stringProp"><xsl:with-param name="name">dataType</xsl:with-param>
  743. <xsl:with-param name="value">
  744. <xsl:choose>
  745. <xsl:when test="$promptDataType!=''"><xsl:value-of select="$promptDataType"/></xsl:when>
  746. <xsl:when test="$promptNumbersOnly='true'">number</xsl:when>
  747. <xsl:otherwise><xsl:text/></xsl:otherwise>
  748. </xsl:choose>
  749. </xsl:with-param>
  750. </xsl:call-template>
  751. <xsl:call-template name="stringProp"><xsl:with-param name="name">submitType</xsl:with-param><xsl:with-param name="value" select="$promptSubmitType"/></xsl:call-template>
  752. <xsl:call-template name="stringProp"><xsl:with-param name="name">defaultValue</xsl:with-param>
  753. <xsl:with-param name="value">
  754. <xsl:choose>
  755. <xsl:when test="$promptRange='true'"><xsl:call-template name='getStartRangeOption'><xsl:with-param name='selectOptions' select='./selectChoices'/></xsl:call-template></xsl:when>
  756. <xsl:when test="$promptUseValue!=''"><xsl:value-of select="$promptUseValue"/></xsl:when>
  757. <xsl:when test="$promptDisplayValue!=''"><xsl:value-of select="$promptDisplayValue"/></xsl:when>
  758. <xsl:otherwise><xsl:value-of select="$promptDefaultValue"/></xsl:otherwise>
  759. </xsl:choose>
  760. </xsl:with-param>
  761. </xsl:call-template>
  762. <xsl:text/>initialState:<xsl:call-template name="getRangeType"><xsl:with-param name="selectOptions" select="./selectChoices"/></xsl:call-template>,<xsl:text/>
  763. <xsl:call-template name="boolProp"><xsl:with-param name="name">required</xsl:with-param><xsl:with-param name="value" select="$promptRequired"/></xsl:call-template>
  764. <xsl:call-template name="boolProp"><xsl:with-param name="name">showThousandSeparator</xsl:with-param><xsl:with-param name="value" select="$promptShowThousandSeparator"/><xsl:with-param name="default">true</xsl:with-param></xsl:call-template>
  765. <xsl:call-template name="boolProp"><xsl:with-param name="name">multiLine</xsl:with-param><xsl:with-param name="value" select="$promptMultiLine"/></xsl:call-template>
  766. <xsl:call-template name="boolProp"><xsl:with-param name="name">allowZero</xsl:with-param><xsl:with-param name="value" select="$promptAllowZero"/><xsl:with-param name="default">true</xsl:with-param></xsl:call-template>
  767. <xsl:call-template name="boolProp"><xsl:with-param name="name">hideAdornments</xsl:with-param><xsl:with-param name="value" select="$promptHideAdornments"/></xsl:call-template>
  768. <xsl:call-template name="boolProp"><xsl:with-param name="name">hideText</xsl:with-param><xsl:with-param name="value" select="$promptHideText"/></xsl:call-template>
  769. <xsl:call-template name="boolProp"><xsl:with-param name="name">suppressExtraPromptNames</xsl:with-param><xsl:with-param name="value" select="$promptSuppressExtraPromptNames"/></xsl:call-template>
  770. <xsl:call-template name="boolProp"><xsl:with-param name="name">multi</xsl:with-param><xsl:with-param name="value" select="$promptMultiSelect"/></xsl:call-template>
  771. <xsl:call-template name="boolProp"><xsl:with-param name="name">range</xsl:with-param><xsl:with-param name="value" select="$promptRange"/></xsl:call-template>
  772. <xsl:call-template name="boolProp"><xsl:with-param name="name">readOnly</xsl:with-param><xsl:with-param name="value" select="$promptReadOnly"/></xsl:call-template>
  773. <xsl:call-template name="boolProp"><xsl:with-param name="name">showCondition</xsl:with-param><xsl:with-param name="value" select="$promptShowCondition"/></xsl:call-template>
  774. <xsl:call-template name="stringProp"><xsl:with-param name="name">style</xsl:with-param><xsl:with-param name="value" select="$promptStyle"/></xsl:call-template>
  775. <xsl:call-template name="stringProp"><xsl:with-param name="name">maxLength</xsl:with-param><xsl:with-param name="value" select="number($promptMaxLength)"/></xsl:call-template>
  776. <!-- if range, include default end value -->
  777. <xsl:if test="$promptRange='true'">
  778. <xsl:variable name="sEndValue"><xsl:call-template name='getEndRangeOption'><xsl:with-param name='selectOptions' select='./selectChoices'/></xsl:call-template></xsl:variable>
  779. <xsl:call-template name="stringProp"><xsl:with-param name="name">endValue</xsl:with-param><xsl:with-param name="value" select="$sEndValue"/></xsl:call-template>
  780. </xsl:if>
  781. <xsl:call-template name="stringProp"><xsl:with-param name="name">CVId</xsl:with-param><xsl:with-param name="value" select="$CognosViewerID"/></xsl:call-template>
  782. <xsl:text/>id:"<xsl:value-of select="$sPromptId"/>"<xsl:text/>
  783. <xsl:text>});</xsl:text>
  784. <xsl:choose>
  785. <xsl:when test="$promptMultiSelect='true' and ($promptRange!='true' or not($promptRange))">
  786. <xsl:call-template name="getListOptionsJS">
  787. <xsl:with-param name="objectId" select="concat('multipleText', $sPromptId)"/>
  788. <xsl:with-param name="selectOptions" select="./selectChoices"/>
  789. </xsl:call-template>
  790. </xsl:when>
  791. <xsl:when test="$promptMultiSelect='true' and $promptRange='true'">
  792. <xsl:call-template name="getMultipleRangeSavedValues">
  793. <xsl:with-param name="selectChoices" select="./selectChoices"/>
  794. <xsl:with-param name="multipleRangeControl">multipleRange<xsl:value-of select="$sPromptId"/></xsl:with-param>
  795. </xsl:call-template>
  796. </xsl:when>
  797. </xsl:choose>
  798. </script>
  799. </div>
  800. </xsl:template>
  801. <!--
  802. ********** select value prompt control **********
  803. -->
  804. <xsl:template name="getSelectValue">
  805. <xsl:param name="promptLocale"/>
  806. <xsl:param name="promptFormName"/>
  807. <xsl:param name="promptRequired"/>
  808. <xsl:param name="promptMultiSelect"/>
  809. <xsl:param name="promptSelectUI"/>
  810. <xsl:param name="promptStyle"/>
  811. <xsl:param name="promptAutoSubmit"/>
  812. <xsl:param name="promptParameter"/>
  813. <xsl:param name="promptId"/>
  814. <xsl:param name="promptSubmitType"/>
  815. <xsl:param name="promptHideAdornments"/>
  816. <xsl:param name="promptAutoCascade"/>
  817. <xsl:param name="promptColumnName"/>
  818. <xsl:param name="promptSuppressExtraPromptNames"/>
  819. <xsl:param name="promptDisabled"/>
  820. <xsl:param name="promptRange"/>
  821. <xsl:param name="promptAllowComplexRange"/>
  822. <xsl:param name="promptShowParentDetails"/>
  823. <xsl:param name="promptAlwaysShowGroupingBox"/>
  824. <div class="clsPromptComponent">
  825. <!-- unique identifier for the control, generate one if not -->
  826. <xsl:variable name="sPromptId">
  827. <xsl:choose>
  828. <xsl:when test="$promptId!=''">
  829. <xsl:call-template name="convertQuotes">
  830. <xsl:with-param name="str" select="$promptId"/>
  831. </xsl:call-template>
  832. </xsl:when>
  833. <xsl:otherwise>
  834. <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
  835. </xsl:otherwise>
  836. </xsl:choose>
  837. <xsl:value-of select="$CognosViewerID"/>
  838. </xsl:variable>
  839. <div id="selectValue{$sPromptId}" class="clsPromptComponent"></div>
  840. <script language="javascript" type="text/javascript">
  841. <xsl:text>genSelectValueHTML({</xsl:text>
  842. <xsl:call-template name="stringProp"><xsl:with-param name="name">formName</xsl:with-param><xsl:with-param name="value" select="concat($promptFormName, $CognosViewerID)"/></xsl:call-template>
  843. <xsl:call-template name="stringProp"><xsl:with-param name="name">parameterName</xsl:with-param><xsl:with-param name="value" select="translate($promptParameter,'&quot;','&#34;')"/></xsl:call-template>
  844. <xsl:call-template name="stringProp"><xsl:with-param name="name">submitType</xsl:with-param><xsl:with-param name="value" select="$promptSubmitType"/></xsl:call-template>
  845. <xsl:text/>autoSubmitType:'<xsl:choose>
  846. <xsl:when test="$promptAutoCascade='true'">reprompt</xsl:when>
  847. <xsl:otherwise>prompt</xsl:otherwise>
  848. </xsl:choose>', <xsl:text/>
  849. <xsl:call-template name="stringProp"><xsl:with-param name="name">selectUI</xsl:with-param><xsl:with-param name="value" select="$promptSelectUI"/></xsl:call-template>
  850. <xsl:call-template name="stringProp"><xsl:with-param name="name">columnName</xsl:with-param><xsl:with-param name="value" select="$promptColumnName"/></xsl:call-template>
  851. <xsl:text>initialState:</xsl:text><xsl:call-template name="getRangeType"><xsl:with-param name="selectOptions" select="./selectChoices"/></xsl:call-template>,<xsl:text/>
  852. <xsl:call-template name="boolProp"><xsl:with-param name="name">disabled</xsl:with-param><xsl:with-param name="value" select="$promptDisabled"/></xsl:call-template>
  853. <xsl:call-template name="boolProp"><xsl:with-param name="name">required</xsl:with-param><xsl:with-param name="value" select="$promptRequired"/></xsl:call-template>
  854. <xsl:call-template name="boolProp"><xsl:with-param name="name">autoSubmit</xsl:with-param><xsl:with-param name="value" select="$promptAutoSubmit"/></xsl:call-template>
  855. <xsl:call-template name="boolProp"><xsl:with-param name="name">hideAdornments</xsl:with-param><xsl:with-param name="value" select="$promptHideAdornments"/></xsl:call-template>
  856. <xsl:call-template name="boolProp"><xsl:with-param name="name">suppressExtraPromptNames</xsl:with-param><xsl:with-param name="value" select="$promptSuppressExtraPromptNames"/></xsl:call-template>
  857. <xsl:call-template name="boolProp"><xsl:with-param name="name">multi</xsl:with-param><xsl:with-param name="value" select="$promptMultiSelect"/></xsl:call-template>
  858. <xsl:call-template name="boolProp"><xsl:with-param name="name">range</xsl:with-param><xsl:with-param name="value" select="$promptRange"/></xsl:call-template>
  859. <xsl:call-template name="stringProp"><xsl:with-param name="name">style</xsl:with-param><xsl:with-param name="value" select="$promptStyle"/></xsl:call-template>
  860. <xsl:call-template name="boolProp"><xsl:with-param name="name">showParentDetails</xsl:with-param><xsl:with-param name="value" select="$promptShowParentDetails"/></xsl:call-template>
  861. <xsl:text/>numSelectOptions:<xsl:value-of select="count(./selectOptions/*)"/>,<xsl:text/>
  862. <xsl:call-template name="boolProp"><xsl:with-param name="name">alwaysShowGroupingBox</xsl:with-param><xsl:with-param name="value" select="$promptAlwaysShowGroupingBox"/></xsl:call-template>
  863. <xsl:call-template name="stringProp"><xsl:with-param name="name">CVId</xsl:with-param><xsl:with-param name="value" select="$CognosViewerID"/></xsl:call-template>
  864. <xsl:text/>id:"<xsl:value-of select="$sPromptId"/>"<xsl:text/>
  865. <xsl:text>});</xsl:text>
  866. <xsl:choose>
  867. <xsl:when test="$promptRange='true'">
  868. <xsl:if test="$promptMultiSelect='true'">
  869. <xsl:call-template name="getMultipleRangeSavedValues">
  870. <xsl:with-param name="selectChoices" select="./selectChoices"/>
  871. <xsl:with-param name="multipleRangeControl">multipleRange<xsl:value-of select="$sPromptId"/></xsl:with-param>
  872. </xsl:call-template>
  873. </xsl:if>
  874. <xsl:variable name="rangeSuffix"><xsl:if test="$promptMultiSelect='true'">r_</xsl:if></xsl:variable>
  875. <xsl:call-template name="getListOptionsJS">
  876. <xsl:with-param name="objectId" select="concat('listBoxrange_from', $rangeSuffix, $sPromptId)"/>
  877. <xsl:with-param name="selectOptions" select="./selectOptions"/>
  878. </xsl:call-template>
  879. <xsl:call-template name="getListOptionsJS">
  880. <xsl:with-param name="objectId" select="concat('listBoxrange_to', $rangeSuffix, $sPromptId)"/>
  881. <xsl:with-param name="selectOptions" select="./selectOptions"/>
  882. </xsl:call-template>
  883. </xsl:when>
  884. <xsl:otherwise>
  885. <xsl:choose>
  886. <xsl:when test="$promptSelectUI='dropdown' or $promptSelectUI='listBox'">
  887. <xsl:call-template name="getListOptionsJS">
  888. <xsl:with-param name="objectId" select="concat('listBox', $sPromptId)"/>
  889. <xsl:with-param name="selectOptions" select="./selectOptions"/>
  890. </xsl:call-template>
  891. </xsl:when>
  892. <xsl:when test="$promptSelectUI='radioGroup' or $promptSelectUI='checkboxGroup'">
  893. <xsl:choose>
  894. <xsl:when test="$promptMultiSelect='true'">
  895. <xsl:call-template name="getGroupOptionsJS">
  896. <xsl:with-param name="objectId" select="concat('checkBoxList', $sPromptId)"/>
  897. <xsl:with-param name="selectOptions" select="./selectOptions"/>
  898. </xsl:call-template>
  899. </xsl:when>
  900. <xsl:otherwise>
  901. <xsl:call-template name="getGroupOptionsJS">
  902. <xsl:with-param name="objectId" select="concat('radioList', $sPromptId)"/>
  903. <xsl:with-param name="selectOptions" select="./selectOptions"/>
  904. </xsl:call-template>
  905. </xsl:otherwise>
  906. </xsl:choose>
  907. </xsl:when>
  908. </xsl:choose>
  909. </xsl:otherwise>
  910. </xsl:choose>
  911. <xsl:if test="$promptRange='true' and ./selectChoices">
  912. <xsl:variable name="sRangeName">
  913. <xsl:choose>
  914. <xsl:when test="$promptMultiSelect='true'">ranger_</xsl:when>
  915. <xsl:otherwise>range</xsl:otherwise>
  916. </xsl:choose>
  917. </xsl:variable>
  918. <xsl:choose>
  919. <xsl:when test="./selectChoices/selectBoundRange">
  920. <xsl:value-of select="$sRangeName"/><xsl:value-of select="$sPromptId"/>.m_oFrom.selectByUseValue("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="./selectChoices/selectBoundRange/start/@useValue"/></xsl:call-template>");
  921. <xsl:value-of select="$sRangeName"/><xsl:value-of select="$sPromptId"/>.m_oTo.selectByUseValue("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="./selectChoices/selectBoundRange/end/@useValue[last()]"/></xsl:call-template>");
  922. </xsl:when>
  923. <xsl:when test="./selectChoices/selectUnboundedEndRange">
  924. <xsl:value-of select="$sRangeName"/><xsl:value-of select="$sPromptId"/>.m_oFrom.selectByUseValue("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="./selectChoices/selectUnboundedEndRange/start/@useValue"/></xsl:call-template>");
  925. </xsl:when>
  926. <xsl:when test="./selectChoices/selectUnboundedStartRange">
  927. <xsl:value-of select="$sRangeName"/><xsl:value-of select="$sPromptId"/>.m_oTo.selectByUseValue("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="./selectChoices/selectUnboundedStartRange/end/@useValue[last()]"/></xsl:call-template>");
  928. </xsl:when>
  929. <xsl:when test="./selectChoices/selectOption">
  930. <xsl:value-of select="$sRangeName"/><xsl:value-of select="$sPromptId"/>.m_oFrom.selectByUseValue("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="./selectChoices/selectOption/@useValue"/></xsl:call-template>");
  931. <xsl:value-of select="$sRangeName"/><xsl:value-of select="$sPromptId"/>.m_oTo.selectByUseValue("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="./selectChoices/selectOption/@useValue"/></xsl:call-template>");
  932. </xsl:when>
  933. </xsl:choose>
  934. </xsl:if>
  935. </script>
  936. </div>
  937. </xsl:template>
  938. <!--
  939. ********** select prompt control contents implemented as checkboxes or radio buttons **********
  940. -->
  941. <xsl:template name="getGroupOptionsJS">
  942. <xsl:param name="objectId"/>
  943. <xsl:param name="selectOptions"/>
  944. <xsl:if test="count($selectOptions/selectOption)>0">
  945. <xsl:text/><xsl:value-of select="$objectId"/>.addOptions([<xsl:text/>
  946. <xsl:for-each select="$selectOptions/selectOption">
  947. <xsl:variable name="attr_displayValue">
  948. <xsl:choose>
  949. <xsl:when test="@displayValue[last()]!=''"><xsl:value-of select="@displayValue[last()]"/></xsl:when>
  950. <xsl:otherwise><xsl:value-of select="@useValue[last()]"/></xsl:otherwise>
  951. </xsl:choose>
  952. </xsl:variable>
  953. <xsl:variable name="attr_useValue" select="@useValue[last()]"/>
  954. <xsl:variable name="scUseValue" select="key('select-options-by-useValue', concat(../../@name, @useValue[last()]))"/>
  955. <xsl:variable name="scDisplayValue" select="key('select-options-by-displayValue', concat(../../@name, @displayValue[last()]))"/>
  956. <xsl:variable name="attr_selected">
  957. <xsl:choose>
  958. <!--
  959. select the option if there is a suitable user choice
  960. - match by use value first, because that is what will be used for the parameter value.
  961. - if no use value is supplied, then match by display value
  962. -->
  963. <xsl:when test="count($scUseValue) &gt; 0">true</xsl:when>
  964. <xsl:when test="count($scDisplayValue) &gt; 0">true</xsl:when>
  965. <xsl:otherwise>false</xsl:otherwise>
  966. </xsl:choose>
  967. </xsl:variable>
  968. <xsl:variable name="displayValue">
  969. <xsl:choose>
  970. <xsl:when test="not($attr_displayValue)">
  971. <xsl:call-template name="convertQuotes">
  972. <xsl:with-param name="str" select="$attr_useValue"/>
  973. </xsl:call-template>
  974. </xsl:when>
  975. <xsl:otherwise>
  976. <xsl:call-template name="convertQuotes">
  977. <xsl:with-param name="str" select="$attr_displayValue"/>
  978. </xsl:call-template>
  979. </xsl:otherwise>
  980. </xsl:choose>
  981. </xsl:variable>
  982. <xsl:variable name="useValue">
  983. <xsl:call-template name="convertQuotes">
  984. <xsl:with-param name="str" select="$attr_useValue"/>
  985. </xsl:call-template>
  986. </xsl:variable>
  987. <xsl:text/>["<xsl:value-of select="$displayValue"/>","<xsl:value-of select="$useValue"/>",<xsl:text/>
  988. <xsl:choose>
  989. <xsl:when test="$attr_selected='true'"><xsl:text/>true<xsl:text/></xsl:when>
  990. <xsl:otherwise><xsl:text/>false<xsl:text/></xsl:otherwise>
  991. </xsl:choose>
  992. <xsl:text>],</xsl:text>
  993. </xsl:for-each>
  994. <xsl:text>null]);</xsl:text>
  995. </xsl:if>
  996. </xsl:template>
  997. <!--
  998. ********** select prompt control contents implemented as dropdowns or list boxes **********
  999. -->
  1000. <xsl:template name="getListOptionsJS">
  1001. <xsl:param name="objectId"/>
  1002. <xsl:param name="selectOptions"/>
  1003. <xsl:if test="count($selectOptions/selectOption)>0">
  1004. <xsl:text/><xsl:value-of select="$objectId"/>.addOptions([<xsl:text/>
  1005. <xsl:for-each select="$selectOptions/selectOption">
  1006. <xsl:variable name="attr_displayValue">
  1007. <xsl:choose>
  1008. <xsl:when test="@displayValue[last()]!=''"><xsl:value-of select="@displayValue[last()]"/></xsl:when>
  1009. <xsl:otherwise><xsl:value-of select="@useValue[last()]"/></xsl:otherwise>
  1010. </xsl:choose>
  1011. </xsl:variable>
  1012. <xsl:variable name="attr_useValue" select="@useValue[last()]"/>
  1013. <xsl:variable name="useValue">
  1014. <xsl:call-template name="convertQuotes">
  1015. <xsl:with-param name="str" select="$attr_useValue"/>
  1016. </xsl:call-template>
  1017. </xsl:variable>
  1018. <xsl:variable name="scUseValue" select="key('select-options-by-useValue', concat(../../@name, @useValue[last()]))"/>
  1019. <xsl:variable name="scDisplayValue" select="key('select-options-by-displayValue', concat(../../@name, @displayValue[last()]))"/>
  1020. <xsl:variable name="attr_selected">
  1021. <xsl:choose>
  1022. <!--
  1023. select the option if there is a suitable user choice
  1024. - match by use value first, because that is what will be used for the parameter value.
  1025. - if no use value is supplied, then match by display value
  1026. -->
  1027. <xsl:when test="count($scUseValue) &gt; 0">true</xsl:when>
  1028. <xsl:when test="count($scDisplayValue) &gt; 0">true</xsl:when>
  1029. <xsl:otherwise>false</xsl:otherwise>
  1030. </xsl:choose>
  1031. </xsl:variable>
  1032. <xsl:variable name="displayValue">
  1033. <xsl:choose>
  1034. <xsl:when test="not($attr_displayValue)">
  1035. <xsl:text/><xsl:value-of select="$useValue"/><xsl:text/>
  1036. </xsl:when>
  1037. <xsl:otherwise>
  1038. <xsl:call-template name="convertQuotes">
  1039. <xsl:with-param name="str" select="$attr_displayValue"/>
  1040. </xsl:call-template>
  1041. </xsl:otherwise>
  1042. </xsl:choose>
  1043. </xsl:variable>
  1044. <xsl:text/>["<xsl:value-of select="$displayValue"/>","<xsl:value-of select="$useValue"/>"<xsl:text/>
  1045. <xsl:if test="$attr_selected='true'">, true</xsl:if>
  1046. <xsl:text>],</xsl:text>
  1047. </xsl:for-each>
  1048. <xsl:text>null]);</xsl:text>
  1049. </xsl:if>
  1050. </xsl:template>
  1051. <!--
  1052. ********** select with search prompt controls **********
  1053. -->
  1054. <xsl:template name="getSelectWithSearch">
  1055. <xsl:param name="promptFormName"/>
  1056. <xsl:param name="promptRequired"/>
  1057. <xsl:param name="promptParameter"/>
  1058. <xsl:param name="promptSearchValue"/>
  1059. <xsl:param name="promptMatchAnywhere"/>
  1060. <xsl:param name="promptMatchAll"/>
  1061. <xsl:param name="promptShowOptions"/>
  1062. <xsl:param name="promptNoResultsFound"/>
  1063. <xsl:param name="promptId"/>
  1064. <xsl:param name="promptMultiSelect"/>
  1065. <xsl:param name="promptSubmitType"/>
  1066. <xsl:param name="promptHideAdornments"/>
  1067. <xsl:param name="promptAllowComplexRange"/>
  1068. <xsl:param name="promptSuppressExtraPromptNames"/>
  1069. <xsl:param name="promptStyle"/>
  1070. <xsl:param name="promptSearchFunction"/>
  1071. <xsl:param name="promptDisabled"/>
  1072. <xsl:param name="promptCaseInsensitive"/>
  1073. <xsl:param name="promptShowCondition"/>
  1074. <!-- unique identifier for the control, generate one if not -->
  1075. <xsl:variable name="sPromptId">
  1076. <xsl:choose>
  1077. <xsl:when test="$promptId!=''">
  1078. <xsl:call-template name="convertQuotes">
  1079. <xsl:with-param name="str" select="$promptId"/>
  1080. </xsl:call-template>
  1081. </xsl:when>
  1082. <xsl:otherwise>
  1083. <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
  1084. </xsl:otherwise>
  1085. </xsl:choose>
  1086. <xsl:value-of select="$CognosViewerID"/>
  1087. </xsl:variable>
  1088. <script language="javascript" type="text/javascript">
  1089. addHiddenInputHTML("<xsl:value-of select="concat($promptFormName, $CognosViewerID)"/>", "p_<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$sPromptId"/></xsl:call-template>", "");
  1090. </script>
  1091. <div id="selectSearch{$sPromptId}" class="clsPromptComponent"></div>
  1092. <script language="javascript" type="text/javascript">
  1093. <xsl:text>genSelectSearchHTML({</xsl:text>
  1094. <xsl:call-template name="stringProp"><xsl:with-param name="name">formName</xsl:with-param><xsl:with-param name="value" select="concat($promptFormName, $CognosViewerID)"/></xsl:call-template>
  1095. <xsl:call-template name="stringProp"><xsl:with-param name="name">parameterName</xsl:with-param><xsl:with-param name="value" select="$promptParameter"/></xsl:call-template>
  1096. <xsl:call-template name="stringProp"><xsl:with-param name="name">submitType</xsl:with-param><xsl:with-param name="value" select="$promptSubmitType"/></xsl:call-template>
  1097. <xsl:call-template name="stringProp"><xsl:with-param name="name">search_criteria</xsl:with-param><xsl:with-param name="value" select="$promptSearchValue"/></xsl:call-template>
  1098. <xsl:call-template name="stringProp"><xsl:with-param name="name">search_matchAnywhere</xsl:with-param><xsl:with-param name="value" select="$promptMatchAnywhere"/></xsl:call-template>
  1099. <xsl:call-template name="stringProp"><xsl:with-param name="name">search_matchAll</xsl:with-param><xsl:with-param name="value" select="$promptMatchAll"/></xsl:call-template>
  1100. <xsl:call-template name="boolProp"><xsl:with-param name="name">multi</xsl:with-param><xsl:with-param name="value" select="$promptMultiSelect"/></xsl:call-template>
  1101. <xsl:call-template name="boolProp"><xsl:with-param name="name">required</xsl:with-param><xsl:with-param name="value" select="$promptRequired"/></xsl:call-template>
  1102. <xsl:call-template name="boolProp"><xsl:with-param name="name">showOptions</xsl:with-param><xsl:with-param name="value" select="$promptShowOptions"/></xsl:call-template>
  1103. <xsl:call-template name="boolProp"><xsl:with-param name="name">search_showNoResultFoundString</xsl:with-param><xsl:with-param name="value" select="$promptNoResultsFound"/></xsl:call-template>
  1104. <xsl:call-template name="boolProp"><xsl:with-param name="name">hideAdornments</xsl:with-param><xsl:with-param name="value" select="$promptHideAdornments"/></xsl:call-template>
  1105. <xsl:call-template name="stringProp"><xsl:with-param name="name">style</xsl:with-param><xsl:with-param name="value" select="$promptStyle"/></xsl:call-template>
  1106. <xsl:call-template name="stringProp"><xsl:with-param name="name">style_editBox</xsl:with-param><xsl:with-param name="value" select="./swsEditBox/@style"/></xsl:call-template>
  1107. <xsl:call-template name="stringProp"><xsl:with-param name="name">style_searchButton</xsl:with-param><xsl:with-param name="value" select="./swsSearchButton/@style"/></xsl:call-template>
  1108. <xsl:call-template name="stringProp"><xsl:with-param name="name">style_options</xsl:with-param><xsl:with-param name="value" select="./swsOptions/@style"/></xsl:call-template>
  1109. <xsl:call-template name="stringProp"><xsl:with-param name="name">style_resultsHeader</xsl:with-param><xsl:with-param name="value" select="./swsResultsHeader/@style"/></xsl:call-template>
  1110. <xsl:call-template name="stringProp"><xsl:with-param name="name">style_resultsListBox</xsl:with-param><xsl:with-param name="value" select="./swsResultsListbox/@style"/></xsl:call-template>
  1111. <xsl:call-template name="stringProp"><xsl:with-param name="name">style_choicesHeader</xsl:with-param><xsl:with-param name="value" select="./swsChoicesHeader/@style"/></xsl:call-template>
  1112. <xsl:call-template name="stringProp"><xsl:with-param name="name">style_choicesListBox</xsl:with-param><xsl:with-param name="value" select="./swsChoicesListbox/@style"/></xsl:call-template>
  1113. <xsl:call-template name="stringProp"><xsl:with-param name="name">search_function</xsl:with-param><xsl:with-param name="value" select="$promptSearchFunction"/></xsl:call-template>
  1114. <xsl:call-template name="boolProp"><xsl:with-param name="name">disabled</xsl:with-param><xsl:with-param name="value" select="$promptDisabled"/></xsl:call-template>
  1115. <xsl:call-template name="boolProp"><xsl:with-param name="name">search_caseInsensitive</xsl:with-param><xsl:with-param name="value" select="$promptCaseInsensitive"/><xsl:with-param name="default" select="'true'"/></xsl:call-template>
  1116. <xsl:if test="$promptId!=''">usePromptIdForName:true,</xsl:if>
  1117. <xsl:call-template name="boolProp"><xsl:with-param name="name">search_showCondition</xsl:with-param><xsl:with-param name="value" select="$promptShowCondition"/></xsl:call-template>
  1118. <xsl:call-template name="stringProp"><xsl:with-param name="name">CVId</xsl:with-param><xsl:with-param name="value" select="$CognosViewerID"/></xsl:call-template>
  1119. <xsl:text/>id:"<xsl:value-of select="$sPromptId"/>"<xsl:text/>
  1120. <xsl:text>});</xsl:text>
  1121. <xsl:choose>
  1122. <xsl:when test="$promptMultiSelect='true'">
  1123. <xsl:call-template name="getListResultsJS">
  1124. <xsl:with-param name="objectId" select="concat('search', $sPromptId)"/>
  1125. <xsl:with-param name="listType" select="'list'"/>
  1126. <xsl:with-param name="selectOptions" select="selectChoices"/>
  1127. <xsl:with-param name="bSelect" select="'true'"/>
  1128. <xsl:with-param name="bMultiSelect" select="'true'"/>
  1129. </xsl:call-template>
  1130. <xsl:call-template name="getListResultsJS">
  1131. <xsl:with-param name="objectId" select="concat('search', $sPromptId)"/>
  1132. <xsl:with-param name="listType" select="'result'"/>
  1133. <xsl:with-param name="selectOptions" select="selectOptions"/>
  1134. <xsl:with-param name="bMultiSelect" select="'true'"/>
  1135. </xsl:call-template>
  1136. </xsl:when>
  1137. <xsl:otherwise>
  1138. <xsl:choose>
  1139. <xsl:when test="not(selectOptions)">
  1140. <xsl:call-template name="getListResultsJS">
  1141. <xsl:with-param name="objectId" select="concat('search', $sPromptId)"/>
  1142. <xsl:with-param name="listType" select="'list'"/>
  1143. <xsl:with-param name="selectOptions" select="selectChoices"/>
  1144. <xsl:with-param name="bMultiSelect" select="'false'"/>
  1145. </xsl:call-template>
  1146. </xsl:when>
  1147. <xsl:otherwise>
  1148. <xsl:call-template name="getListResultsJS">
  1149. <xsl:with-param name="objectId" select="concat('search', $sPromptId)"/>
  1150. <xsl:with-param name="listType" select="'list'"/>
  1151. <xsl:with-param name="selectOptions" select="selectOptions"/>
  1152. <xsl:with-param name="bMultiSelect" select="'false'"/>
  1153. </xsl:call-template>
  1154. </xsl:otherwise>
  1155. </xsl:choose>
  1156. </xsl:otherwise>
  1157. </xsl:choose>
  1158. </script>
  1159. </xsl:template>
  1160. <!--
  1161. ********** specifically populates contents of select with search prompt controls according **********
  1162. ********** to whether the item is a result of the search, or a selected item **********
  1163. the bSelect and bMultiSelect parameters are used for single select searches to reselect choices
  1164. -->
  1165. <xsl:template name="getListResultsJS">
  1166. <xsl:param name="objectId"/>
  1167. <xsl:param name="listType"/>
  1168. <xsl:param name="selectOptions"/>
  1169. <xsl:param name="bSelect"/>
  1170. <xsl:param name="bMultiSelect"/>
  1171. <xsl:if test="count($selectOptions/selectOption)>0">
  1172. <xsl:text/><xsl:value-of select="$objectId"/>.addOptions([<xsl:text/>
  1173. <xsl:for-each select="$selectOptions/selectOption">
  1174. <xsl:variable name="attr_displayValue" select="@displayValue[last()]"/>
  1175. <xsl:variable name="attr_useValue" select="@useValue[last()]"/>
  1176. <xsl:variable name="attr_selected" select="@selected[last()]"/>
  1177. <xsl:variable name="displayValue">
  1178. <xsl:choose>
  1179. <xsl:when test="not($attr_displayValue)">
  1180. <xsl:call-template name="convertQuotes">
  1181. <xsl:with-param name="str" select="$attr_useValue"/>
  1182. </xsl:call-template>
  1183. </xsl:when>
  1184. <xsl:otherwise>
  1185. <xsl:call-template name="convertQuotes">
  1186. <xsl:with-param name="str" select="$attr_displayValue"/>
  1187. </xsl:call-template>
  1188. </xsl:otherwise>
  1189. </xsl:choose>
  1190. </xsl:variable>
  1191. <xsl:variable name="useValue">
  1192. <xsl:call-template name="convertQuotes">
  1193. <xsl:with-param name="str" select="$attr_useValue"/>
  1194. </xsl:call-template>
  1195. </xsl:variable>
  1196. <xsl:variable name="bSelectThisOption">
  1197. <xsl:choose>
  1198. <xsl:when test="$bMultiSelect='false' and $selectOptions/../selectChoices/selectOption">
  1199. <xsl:variable name="scUseValue" select="key('select-options-by-useValue', concat(../../@name, @useValue[last()]))"/>
  1200. <xsl:variable name="scDisplayValue" select="key('select-options-by-displayValue', concat(../../@name, @displayValue[last()]))"/>
  1201. <xsl:choose>
  1202. <!--
  1203. select the option if there is a suitable user choice
  1204. - match by use value first, because that is what will be used for the parameter value.
  1205. - if no use value is supplied, then match by display value
  1206. -->
  1207. <xsl:when test="count($scUseValue) &gt; 0">true</xsl:when>
  1208. <xsl:when test="count($scDisplayValue) &gt; 0">true</xsl:when>
  1209. <xsl:otherwise>false</xsl:otherwise>
  1210. </xsl:choose>
  1211. </xsl:when>
  1212. <xsl:when test="$attr_selected='true'">
  1213. <xsl:text>true</xsl:text>
  1214. </xsl:when>
  1215. <xsl:otherwise>false</xsl:otherwise>
  1216. </xsl:choose>
  1217. </xsl:variable>
  1218. <xsl:text/>["<xsl:value-of select="$displayValue"/>","<xsl:value-of select="$useValue"/>",<xsl:text/>
  1219. <xsl:value-of select="$bSelectThisOption"/>,"<xsl:value-of select="$listType"/>"],<xsl:text/>
  1220. </xsl:for-each>
  1221. <xsl:text>null]);</xsl:text>
  1222. </xsl:if>
  1223. </xsl:template>
  1224. <!--
  1225. ********** range prompt control templates **********
  1226. -->
  1227. <xsl:template name="getRangeType">
  1228. <xsl:param name="selectOptions"/>
  1229. <xsl:choose>
  1230. <xsl:when test="$selectOptions/selectBoundRange">RANGE_BOUND_VALUE</xsl:when>
  1231. <xsl:when test="$selectOptions/selectUnboundedEndRange">RANGE_START_VALUE</xsl:when>
  1232. <xsl:when test="$selectOptions/selectUnboundedStartRange">RANGE_END_VALUE</xsl:when>
  1233. <xsl:when test="$selectOptions/selectOption">RANGE_EQUAL_VALUE</xsl:when>
  1234. <xsl:otherwise>RANGE_NO_VALUE</xsl:otherwise>
  1235. </xsl:choose>
  1236. </xsl:template>
  1237. <xsl:template name="getStartRangeOption">
  1238. <xsl:param name="selectOptions"/>
  1239. <xsl:choose>
  1240. <xsl:when test="$selectOptions/selectBoundRange"><xsl:value-of select="$selectOptions/selectBoundRange/start/@useValue"/></xsl:when>
  1241. <xsl:when test="$selectOptions/selectUnboundedEndRange"><xsl:value-of select="$selectOptions/selectUnboundedEndRange/start/@useValue"/></xsl:when>
  1242. <xsl:when test="$selectOptions/selectOption"><xsl:value-of select="$selectOptions/selectOption/@useValue"/></xsl:when>
  1243. <xsl:otherwise></xsl:otherwise>
  1244. </xsl:choose>
  1245. </xsl:template>
  1246. <xsl:template name="getEndRangeOption">
  1247. <xsl:param name="selectOptions"/>
  1248. <xsl:choose>
  1249. <xsl:when test="$selectOptions/selectBoundRange"><xsl:value-of select="$selectOptions/selectBoundRange/end/@useValue[last()]"/></xsl:when>
  1250. <xsl:when test="$selectOptions/selectUnboundedStartRange"><xsl:value-of select="$selectOptions/selectUnboundedStartRange/end/@useValue[last()]"/></xsl:when>
  1251. <xsl:when test="$selectOptions/selectOption"><xsl:value-of select="$selectOptions/selectOption/@useValue[last()]"/></xsl:when>
  1252. <xsl:otherwise></xsl:otherwise>
  1253. </xsl:choose>
  1254. </xsl:template>
  1255. <xsl:template name="getMultipleRangeSavedValues">
  1256. <xsl:param name="selectChoices"/>
  1257. <xsl:param name="multipleRangeControl"/>
  1258. <xsl:for-each select="$selectChoices/*">
  1259. <xsl:variable name="startUseValue"><xsl:value-of select="./start/@useValue"/></xsl:variable>
  1260. <xsl:variable name="endUseValue"><xsl:value-of select="./end/@useValue"/></xsl:variable>
  1261. <xsl:variable name="useValue"><xsl:value-of select="./@useValue"/></xsl:variable>
  1262. <xsl:variable name="startDisplayValue">
  1263. <xsl:choose>
  1264. <xsl:when test="./start/@displayValue"><xsl:value-of select="./start/@displayValue"/></xsl:when>
  1265. <xsl:when test="../../selectOptions/selectOption[@useValue=$startUseValue]/@displayValue"><xsl:value-of select="../../selectOptions/selectOption[@useValue=$startUseValue]/@displayValue"/></xsl:when>
  1266. <xsl:otherwise><xsl:value-of select="./start/@useValue"/></xsl:otherwise>
  1267. </xsl:choose>
  1268. </xsl:variable>
  1269. <xsl:variable name="endDisplayValue">
  1270. <xsl:choose>
  1271. <xsl:when test="./end/@displayValue"><xsl:value-of select="./end/@displayValue"/></xsl:when>
  1272. <xsl:when test="../../selectOptions/selectOption[@useValue=$endUseValue]/@displayValue"><xsl:value-of select="../../selectOptions/selectOption[@useValue=$endUseValue]/@displayValue"/></xsl:when>
  1273. <xsl:otherwise><xsl:value-of select="./end/@useValue"/></xsl:otherwise>
  1274. </xsl:choose>
  1275. </xsl:variable>
  1276. <xsl:variable name="displayValue">
  1277. <xsl:choose>
  1278. <xsl:when test="@displayValue"><xsl:value-of select="@displayValue"/></xsl:when>
  1279. <xsl:when test="../../selectOptions/selectOption[@useValue=$useValue]/@displayValue"><xsl:value-of select="../../selectOptions/selectOption[@useValue=$useValue]/@displayValue"/></xsl:when>
  1280. <xsl:otherwise><xsl:value-of select="@useValue"/></xsl:otherwise>
  1281. </xsl:choose>
  1282. </xsl:variable>
  1283. <xsl:choose>
  1284. <xsl:when test="name() = 'selectBoundRange'">
  1285. <xsl:value-of select="$multipleRangeControl"/>.addSuperRangeLiteral("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$startUseValue"/></xsl:call-template>", "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$startDisplayValue"/></xsl:call-template>", "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$endUseValue"/></xsl:call-template>", "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$endDisplayValue"/></xsl:call-template>", null);
  1286. </xsl:when>
  1287. <xsl:when test="name() = 'selectUnboundedEndRange'">
  1288. <xsl:value-of select="$multipleRangeControl"/>.addSuperRangeLiteral("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$startUseValue"/></xsl:call-template>", "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$startDisplayValue"/></xsl:call-template>",null, null, null);
  1289. </xsl:when>
  1290. <xsl:when test="name() = 'selectUnboundedStartRange'">
  1291. <xsl:value-of select="$multipleRangeControl"/>.addSuperRangeLiteral(null, null, "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$endUseValue"/></xsl:call-template>", "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$endDisplayValue"/></xsl:call-template>", null);
  1292. </xsl:when>
  1293. <xsl:when test="name() = 'selectOption'">
  1294. <xsl:value-of select="$multipleRangeControl"/>.addSuperRangeLiteral("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$useValue"/></xsl:call-template>", "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$displayValue"/></xsl:call-template>", "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$useValue"/></xsl:call-template>", "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$displayValue"/></xsl:call-template>", null);
  1295. </xsl:when>
  1296. </xsl:choose>
  1297. </xsl:for-each>
  1298. <xsl:text/><xsl:value-of select="$multipleRangeControl"/>.checkData();
  1299. </xsl:template>
  1300. <!--
  1301. ********** date prompt controls **********
  1302. -->
  1303. <xsl:template name="getSelectDate">
  1304. <xsl:param name="promptFormName"/>
  1305. <xsl:param name="promptRequired"/>
  1306. <xsl:param name="promptStartOfWeek"/>
  1307. <xsl:param name="promptCalendar"/>
  1308. <xsl:param name="promptParameter"/>
  1309. <xsl:param name="promptSelectDateUI"/>
  1310. <xsl:param name="promptInputOrder"/>
  1311. <xsl:param name="promptDefaultDate"/>
  1312. <xsl:param name="promptFirstDate"/>
  1313. <xsl:param name="promptLastDate"/>
  1314. <xsl:param name="promptDateTime"/>
  1315. <xsl:param name="promptMultiSelect"/>
  1316. <xsl:param name="promptId"/>
  1317. <xsl:param name="promptSubmitType"/>
  1318. <xsl:param name="suppressDisabled"/>
  1319. <xsl:param name="promptHideAdornments"/>
  1320. <xsl:param name="promptSelectUI"/>
  1321. <xsl:param name="promptRange"/>
  1322. <xsl:param name="promptSuppressExtraPromptNames"/>
  1323. <xsl:param name="promptStyle"/>
  1324. <xsl:param name="popupLabel"/>
  1325. <xsl:param name="popupZindex">115</xsl:param>
  1326. <!-- unique identifier for the control, generate one if not -->
  1327. <xsl:variable name="sPromptId">
  1328. <xsl:choose>
  1329. <xsl:when test="$promptId!=''">
  1330. <xsl:call-template name="convertQuotes">
  1331. <xsl:with-param name="str" select="$promptId"/>
  1332. </xsl:call-template>
  1333. </xsl:when>
  1334. <xsl:otherwise>
  1335. <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
  1336. </xsl:otherwise>
  1337. </xsl:choose>
  1338. <xsl:value-of select="$CognosViewerID"/>
  1339. </xsl:variable>
  1340. <div class="clsPromptComponent" id="selectDate{$sPromptId}"></div>
  1341. <script language="javascript" type="text/javascript">
  1342. <xsl:text>genSelectDateHTML({</xsl:text>
  1343. <xsl:call-template name="stringProp"><xsl:with-param name="name">formName</xsl:with-param><xsl:with-param name="value" select="concat($promptFormName, $CognosViewerID)"/></xsl:call-template>
  1344. <xsl:call-template name="stringProp"><xsl:with-param name="name">parameterName</xsl:with-param><xsl:with-param name="value" select="$promptParameter"/></xsl:call-template>
  1345. <xsl:call-template name="stringProp"><xsl:with-param name="name">submitType</xsl:with-param><xsl:with-param name="value" select="$promptSubmitType"/></xsl:call-template>
  1346. <xsl:call-template name="stringProp"><xsl:with-param name="name">prmtDefaultDate</xsl:with-param><xsl:with-param name="value" select="$promptDefaultDate"/></xsl:call-template>
  1347. <xsl:call-template name="stringProp">
  1348. <xsl:with-param name="name">defaultValue</xsl:with-param>
  1349. <xsl:with-param name="value">
  1350. <xsl:choose>
  1351. <xsl:when test="$promptRange='true'"><xsl:call-template name='getStartRangeOption'><xsl:with-param name='selectOptions' select='./selectChoices'/></xsl:call-template></xsl:when>
  1352. <xsl:when test="$promptDefaultDate=-1"><xsl:text/></xsl:when>
  1353. <xsl:when test="./selectChoices/selectOption/@useValue!=''"><xsl:value-of select="./selectChoices/selectOption/@useValue"/></xsl:when>
  1354. <xsl:when test="./selectChoices/selectOption/@displayValue!=''"><xsl:value-of select="./selectChoices/selectOption/@displayValue"/></xsl:when>
  1355. <xsl:when test="$promptDefaultDate!=''"><xsl:value-of select="$promptDefaultDate"/></xsl:when>
  1356. <xsl:otherwise><xsl:text/></xsl:otherwise>
  1357. </xsl:choose>
  1358. </xsl:with-param>
  1359. </xsl:call-template>
  1360. <xsl:call-template name="stringProp"><xsl:with-param name="name">startOfWeek</xsl:with-param><xsl:with-param name="value" select="$promptStartOfWeek"/></xsl:call-template>
  1361. <xsl:call-template name="stringProp"><xsl:with-param name="name">calendar</xsl:with-param><xsl:with-param name="value" select="$promptCalendar"/></xsl:call-template>
  1362. <xsl:call-template name="stringProp"><xsl:with-param name="name">selectUI</xsl:with-param><xsl:with-param name="value" select="$promptSelectUI"/></xsl:call-template>
  1363. <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateUI</xsl:with-param><xsl:with-param name="value" select="$promptSelectDateUI"/></xsl:call-template>
  1364. <xsl:call-template name="stringProp"><xsl:with-param name="name">inputOrder</xsl:with-param><xsl:with-param name="value" select="$promptInputOrder"/></xsl:call-template>
  1365. <xsl:call-template name="stringProp"><xsl:with-param name="name">firstDate</xsl:with-param><xsl:with-param name="value" select="$promptFirstDate"/></xsl:call-template>
  1366. <xsl:call-template name="stringProp"><xsl:with-param name="name">lastDate</xsl:with-param><xsl:with-param name="value" select="$promptLastDate"/></xsl:call-template>
  1367. <xsl:text/>dateTime:<xsl:choose>
  1368. <xsl:when test="$promptDateTime='true'">0,</xsl:when>
  1369. <xsl:otherwise>1,</xsl:otherwise>
  1370. </xsl:choose>
  1371. <xsl:text/>initialState:<xsl:call-template name="getRangeType"><xsl:with-param name="selectOptions" select="./selectChoices"/></xsl:call-template>,<xsl:text/>
  1372. <xsl:call-template name="boolProp"><xsl:with-param name="name">required</xsl:with-param><xsl:with-param name="value" select="$promptRequired"/></xsl:call-template>
  1373. <xsl:call-template name="boolProp"><xsl:with-param name="name">suppressDisabled</xsl:with-param><xsl:with-param name="value" select="$suppressDisabled"/></xsl:call-template>
  1374. <xsl:call-template name="boolProp"><xsl:with-param name="name">hideAdornments</xsl:with-param><xsl:with-param name="value" select="$promptHideAdornments"/></xsl:call-template>
  1375. <xsl:call-template name="boolProp"><xsl:with-param name="name">suppressExtraPromptNames</xsl:with-param><xsl:with-param name="value" select="$promptSuppressExtraPromptNames"/></xsl:call-template>
  1376. <xsl:call-template name="boolProp"><xsl:with-param name="name">multi</xsl:with-param><xsl:with-param name="value" select="$promptMultiSelect"/></xsl:call-template>
  1377. <xsl:call-template name="boolProp"><xsl:with-param name="name">range</xsl:with-param><xsl:with-param name="value" select="$promptRange"/></xsl:call-template>
  1378. <xsl:call-template name="stringProp"><xsl:with-param name="name">style</xsl:with-param><xsl:with-param name="value" select="$promptStyle"/></xsl:call-template>
  1379. <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateEditBoxStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateEditBox/@style"/></xsl:call-template>
  1380. <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateYearsStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateCalendar/selectDateYears/@style"/></xsl:call-template>
  1381. <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateMonthsStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateCalendar/selectDateMonths/@style"/></xsl:call-template>
  1382. <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateDaysOfWeekStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateCalendar/selectDateDaysOfWeek/@style"/></xsl:call-template>
  1383. <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateDaysStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateCalendar/selectDateDays/@style"/></xsl:call-template>
  1384. <xsl:if test="$promptRange='true'">
  1385. <xsl:variable name="sEndValue"><xsl:call-template name='getEndRangeOption'><xsl:with-param name='selectOptions' select='./selectChoices'/></xsl:call-template></xsl:variable>
  1386. <xsl:call-template name="stringProp"><xsl:with-param name="name">endRange</xsl:with-param><xsl:with-param name="value" select="$sEndValue"/></xsl:call-template>
  1387. </xsl:if>
  1388. <xsl:call-template name="stringProp"><xsl:with-param name="name">popupLabel</xsl:with-param><xsl:with-param name="value" select="$popupLabel"/></xsl:call-template>
  1389. <xsl:call-template name="stringProp"><xsl:with-param name="name">popupZindex</xsl:with-param><xsl:with-param name="value" select="$popupZindex"/></xsl:call-template>
  1390. <xsl:call-template name="stringProp"><xsl:with-param name="name">CVId</xsl:with-param><xsl:with-param name="value" select="$CognosViewerID"/></xsl:call-template>
  1391. <xsl:text/>id:"<xsl:value-of select="$sPromptId"/>"<xsl:text/>
  1392. <xsl:text>});</xsl:text>
  1393. <xsl:choose>
  1394. <xsl:when test="$promptMultiSelect='true' and ($promptRange!='true' or not($promptRange))">
  1395. <xsl:call-template name='getListOptionsJS'>
  1396. <xsl:with-param name="objectId" select="concat('multipleDatePicker', $sPromptId)"/>
  1397. <xsl:with-param name='selectOptions' select='./selectChoices'/>
  1398. </xsl:call-template>
  1399. </xsl:when>
  1400. <xsl:when test="$promptMultiSelect='true' and $promptRange='true'">
  1401. <xsl:call-template name="getMultipleRangeSavedValues">
  1402. <xsl:with-param name="selectChoices" select="./selectChoices"/>
  1403. <xsl:with-param name="multipleRangeControl">multipleRange<xsl:value-of select="$sPromptId"/></xsl:with-param>
  1404. </xsl:call-template>
  1405. </xsl:when>
  1406. </xsl:choose>
  1407. </script>
  1408. </xsl:template>
  1409. <!--
  1410. ********** time prompt controls **********
  1411. -->
  1412. <xsl:template name="getSelectTime">
  1413. <xsl:param name="promptLocale"/>
  1414. <xsl:param name="promptFormName"/>
  1415. <xsl:param name="promptRequired"/>
  1416. <xsl:param name="promptDefaultValue"/>
  1417. <xsl:param name="promptParameter"/>
  1418. <xsl:param name="promptType"/>
  1419. <xsl:param name="promptDisplay"/>
  1420. <xsl:param name="promptInline"/>
  1421. <xsl:param name="promptTimeZone"/>
  1422. <xsl:param name="promptHourFormat"/>
  1423. <xsl:param name="promptMinuteFormat"/>
  1424. <xsl:param name="promptSecondFormat"/>
  1425. <xsl:param name="promptMode"/>
  1426. <xsl:param name="promptMultiSelect"/>
  1427. <xsl:param name="promptId"/>
  1428. <xsl:param name="promptShowSeconds"/>
  1429. <xsl:param name="promptShowMilliseconds"/>
  1430. <xsl:param name="promptSubmitType"/>
  1431. <xsl:param name="suppressDisabled"/>
  1432. <xsl:param name="promptHideAdornments"/>
  1433. <xsl:param name="promptSelectUI"/>
  1434. <xsl:param name="promptRange"/>
  1435. <xsl:param name="promptAllowComplexRange"/>
  1436. <xsl:param name="promptSuppressExtraPromptNames"/>
  1437. <xsl:param name="promptStyle"/>
  1438. <xsl:param name="promptTimeLabel"/>
  1439. <!-- unique identifier for the control, generate one if not -->
  1440. <xsl:variable name="sPromptId">
  1441. <xsl:choose>
  1442. <xsl:when test="$promptId!=''">
  1443. <xsl:call-template name="convertQuotes">
  1444. <xsl:with-param name="str" select="$promptId"/>
  1445. </xsl:call-template>
  1446. </xsl:when>
  1447. <xsl:otherwise>
  1448. <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
  1449. </xsl:otherwise>
  1450. </xsl:choose>
  1451. <xsl:value-of select="$CognosViewerID"/>
  1452. </xsl:variable>
  1453. <div id="selectTime{$sPromptId}" class="clsPromptComponent"></div>
  1454. <script language="javascript" type="text/javascript">
  1455. <xsl:text>genSelectTimeHTML({</xsl:text>
  1456. <xsl:call-template name="stringProp"><xsl:with-param name="name">formName</xsl:with-param><xsl:with-param name="value" select="concat($promptFormName, $CognosViewerID)"/></xsl:call-template>
  1457. <xsl:call-template name="stringProp"><xsl:with-param name="name">parameterName</xsl:with-param><xsl:with-param name="value" select="$promptParameter"/></xsl:call-template>
  1458. <xsl:call-template name="stringProp"><xsl:with-param name="name">submitType</xsl:with-param><xsl:with-param name="value" select="$promptSubmitType"/></xsl:call-template>
  1459. <xsl:call-template name="stringProp">
  1460. <xsl:with-param name="name">defaultValue</xsl:with-param>
  1461. <xsl:with-param name="value">
  1462. <xsl:choose>
  1463. <xsl:when test="$promptRange='true'">
  1464. <xsl:variable name="sDefaultStartTime">
  1465. <xsl:call-template name="getStartRangeOption">
  1466. <xsl:with-param name="selectOptions" select="./selectChoices"/>
  1467. </xsl:call-template>
  1468. </xsl:variable>
  1469. <xsl:choose>
  1470. <xsl:when test="$sDefaultStartTime!=''"><xsl:value-of select="$sDefaultStartTime"/></xsl:when>
  1471. <xsl:otherwise>00:00:00.000</xsl:otherwise>
  1472. </xsl:choose>
  1473. </xsl:when>
  1474. <xsl:when test="$promptDefaultValue=-1"><xsl:text/></xsl:when>
  1475. <xsl:when test="./selectChoices/selectOption/@useValue!=''"><xsl:value-of select="./selectChoices/selectOption/@useValue"/></xsl:when>
  1476. <xsl:when test="./selectChoices/selectOption/@displayValue!=''"><xsl:value-of select="./selectChoices/selectOption/@displayValue"/></xsl:when>
  1477. <xsl:when test="$promptDefaultValue!=''"><xsl:value-of select="$promptDefaultValue"/></xsl:when>
  1478. <xsl:otherwise><xsl:text/></xsl:otherwise>
  1479. </xsl:choose>
  1480. </xsl:with-param>
  1481. </xsl:call-template>
  1482. <xsl:call-template name="stringProp"><xsl:with-param name="name">selectUI</xsl:with-param><xsl:with-param name="value" select="$promptSelectUI"/></xsl:call-template>
  1483. <xsl:call-template name="stringProp"><xsl:with-param name="name">timeZone</xsl:with-param><xsl:with-param name="value" select="$promptTimeZone"/></xsl:call-template>
  1484. <xsl:call-template name="stringProp"><xsl:with-param name="name">hourFormat</xsl:with-param><xsl:with-param name="value" select="$promptHourFormat"/></xsl:call-template>
  1485. <xsl:call-template name="stringProp"><xsl:with-param name="name">minuteFormat</xsl:with-param><xsl:with-param name="value" select="$promptMinuteFormat"/></xsl:call-template>
  1486. <xsl:call-template name="stringProp"><xsl:with-param name="name">secondFormat</xsl:with-param><xsl:with-param name="value" select="$promptSecondFormat"/></xsl:call-template>
  1487. <xsl:if test="$promptType!=''">type:<xsl:value-of select="number($promptType)"/>,</xsl:if>
  1488. <xsl:text>display:</xsl:text>
  1489. <xsl:choose>
  1490. <xsl:when test="$promptDisplay!=''"><xsl:value-of select="number($promptDisplay)"/></xsl:when>
  1491. <xsl:when test="$promptShowMilliseconds='true'">0</xsl:when>
  1492. <xsl:when test="$promptShowSeconds='true'">1</xsl:when>
  1493. <xsl:otherwise>2</xsl:otherwise>
  1494. </xsl:choose>
  1495. <xsl:text>,</xsl:text>
  1496. <xsl:text>mode:</xsl:text>
  1497. <xsl:choose>
  1498. <xsl:when test="$promptMode='static'">0</xsl:when>
  1499. <xsl:when test="$promptMode='live'">1</xsl:when>
  1500. <xsl:when test="$promptMode!=''"><xsl:value-of select="number($promptMode)"/>, <xsl:text/></xsl:when>
  1501. <xsl:otherwise>0</xsl:otherwise>
  1502. </xsl:choose>
  1503. <xsl:text>,</xsl:text>
  1504. <xsl:text/>initialState:<xsl:call-template name="getRangeType"><xsl:with-param name="selectOptions" select="./selectChoices"/></xsl:call-template>,<xsl:text/>
  1505. <xsl:call-template name="boolProp"><xsl:with-param name="name">required</xsl:with-param><xsl:with-param name="value" select="$promptRequired"/></xsl:call-template>
  1506. <xsl:call-template name="boolProp"><xsl:with-param name="name">suppressDisabled</xsl:with-param><xsl:with-param name="value" select="$suppressDisabled"/></xsl:call-template>
  1507. <xsl:call-template name="boolProp"><xsl:with-param name="name">hideAdornments</xsl:with-param><xsl:with-param name="value" select="$promptHideAdornments"/></xsl:call-template>
  1508. <xsl:call-template name="boolProp"><xsl:with-param name="name">suppressExtraPromptNames</xsl:with-param><xsl:with-param name="value" select="$promptSuppressExtraPromptNames"/></xsl:call-template>
  1509. <xsl:call-template name="boolProp"><xsl:with-param name="name">multi</xsl:with-param><xsl:with-param name="value" select="$promptMultiSelect"/></xsl:call-template>
  1510. <xsl:call-template name="boolProp"><xsl:with-param name="name">range</xsl:with-param><xsl:with-param name="value" select="$promptRange"/></xsl:call-template>
  1511. <xsl:call-template name="stringProp"><xsl:with-param name="name">style</xsl:with-param><xsl:with-param name="value" select="$promptStyle"/></xsl:call-template>
  1512. <xsl:if test="$promptRange='true'">
  1513. <xsl:variable name="sDefaultEndTime"><xsl:call-template name='getEndRangeOption'><xsl:with-param name='selectOptions' select='./selectChoices'/></xsl:call-template></xsl:variable>
  1514. <xsl:call-template name="stringProp">
  1515. <xsl:with-param name="name">endTime</xsl:with-param>
  1516. <xsl:with-param name="value">
  1517. <xsl:choose>
  1518. <xsl:when test="$sDefaultEndTime!=''"><xsl:value-of select="$sDefaultEndTime"/></xsl:when>
  1519. <xsl:otherwise>23:59:59.999</xsl:otherwise>
  1520. </xsl:choose>
  1521. </xsl:with-param>
  1522. </xsl:call-template>
  1523. </xsl:if>
  1524. <xsl:call-template name="stringProp"><xsl:with-param name="name">style</xsl:with-param><xsl:with-param name="value" select="$promptStyle"/></xsl:call-template>
  1525. <xsl:call-template name="stringProp"><xsl:with-param name="name">CVId</xsl:with-param><xsl:with-param name="value" select="$CognosViewerID"/></xsl:call-template>
  1526. <xsl:text/>id:"<xsl:value-of select="$sPromptId"/>"<xsl:text/>
  1527. <xsl:if test="$promptTimeLabel != ''">
  1528. ,<xsl:call-template name="stringProp"><xsl:with-param name="isMore" select="false()"/><xsl:with-param name="name">timeLabel</xsl:with-param><xsl:with-param name="value" select="$promptTimeLabel"/></xsl:call-template>
  1529. </xsl:if>
  1530. <xsl:text>});</xsl:text>
  1531. <xsl:choose>
  1532. <xsl:when test="$promptMultiSelect='true' and ($promptRange!='true' or not($promptRange))">
  1533. <xsl:call-template name='getListOptionsJS'>
  1534. <xsl:with-param name="objectId" select="concat('multipleTimePicker', $sPromptId)"/>
  1535. <xsl:with-param name='selectOptions' select='./selectChoices'/>
  1536. </xsl:call-template>
  1537. </xsl:when>
  1538. <xsl:when test="$promptMultiSelect='true' and $promptRange='true'">
  1539. <xsl:call-template name="getMultipleRangeSavedValues">
  1540. <xsl:with-param name="selectChoices" select="./selectChoices"/>
  1541. <xsl:with-param name="multipleRangeControl">multipleRange<xsl:value-of select="$sPromptId"/></xsl:with-param>
  1542. </xsl:call-template>
  1543. </xsl:when>
  1544. </xsl:choose>
  1545. </script>
  1546. </xsl:template>
  1547. <!--
  1548. ********** dateTime prompt controls **********
  1549. -->
  1550. <xsl:template name="getSelectDateTime">
  1551. <xsl:param name="promptFormName"/>
  1552. <xsl:param name="promptRequired"/>
  1553. <xsl:param name="promptStartOfWeek"/>
  1554. <xsl:param name="promptCalendar"/>
  1555. <xsl:param name="promptParameter"/>
  1556. <xsl:param name="promptInputOrder"/>
  1557. <xsl:param name="promptDefaultDate"/>
  1558. <xsl:param name="promptDefaultTime"/>
  1559. <xsl:param name="promptFirstDate"/>
  1560. <xsl:param name="promptLastDate"/>
  1561. <xsl:param name="promptDateTime"/>
  1562. <xsl:param name="promptMultiSelect"/>
  1563. <xsl:param name="promptType"/>
  1564. <xsl:param name="promptDisplay"/>
  1565. <xsl:param name="promptInline"/>
  1566. <xsl:param name="promptTimeZone"/>
  1567. <xsl:param name="promptHourFormat"/>
  1568. <xsl:param name="promptMinuteFormat"/>
  1569. <xsl:param name="promptSecondFormat"/>
  1570. <xsl:param name="promptMode"/>
  1571. <xsl:param name="promptShowSeconds"/>
  1572. <xsl:param name="promptShowMilliseconds"/>
  1573. <xsl:param name="promptId"/>
  1574. <xsl:param name="promptSubmitType"/>
  1575. <xsl:param name="suppressDisabled"/>
  1576. <xsl:param name="promptHideAdornments"/>
  1577. <xsl:param name="promptSelectUI"/>
  1578. <xsl:param name="promptRange"/>
  1579. <xsl:param name="promptAllowComplexRange"/>
  1580. <xsl:param name="promptSuppressExtraPromptNames"/>
  1581. <xsl:param name="promptXSDFormat"/>
  1582. <xsl:param name="promptStyle"/>
  1583. <!-- unique identifier for the control, generate one if not -->
  1584. <xsl:variable name="sPromptId">
  1585. <xsl:choose>
  1586. <xsl:when test="$promptId!=''">
  1587. <xsl:call-template name="convertQuotes">
  1588. <xsl:with-param name="str" select="$promptId"/>
  1589. </xsl:call-template>
  1590. </xsl:when>
  1591. <xsl:otherwise>
  1592. <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
  1593. </xsl:otherwise>
  1594. </xsl:choose>
  1595. <xsl:value-of select="$CognosViewerID"/>
  1596. </xsl:variable>
  1597. <xsl:variable name='sStartDateTime'>
  1598. <xsl:call-template name='getStartRangeOption'>
  1599. <xsl:with-param name='selectOptions' select='./selectChoices'/>
  1600. </xsl:call-template>
  1601. </xsl:variable>
  1602. <xsl:variable name='sStartTime'>
  1603. <xsl:choose>
  1604. <xsl:when test="$sStartDateTime != ''"><xsl:value-of select="substring-after($sStartDateTime, 'T')"/></xsl:when>
  1605. <xsl:otherwise>00:00:00.000</xsl:otherwise>
  1606. </xsl:choose>
  1607. </xsl:variable>
  1608. <xsl:variable name='sEndDateTime'>
  1609. <xsl:call-template name='getEndRangeOption'>
  1610. <xsl:with-param name='selectOptions' select='./selectChoices'/>
  1611. </xsl:call-template>
  1612. </xsl:variable>
  1613. <xsl:variable name='sEndTime'>
  1614. <xsl:choose>
  1615. <xsl:when test="$sEndDateTime != ''"><xsl:value-of select="substring-after($sEndDateTime, 'T')"/></xsl:when>
  1616. <xsl:otherwise>23:59:59.999</xsl:otherwise>
  1617. </xsl:choose>
  1618. </xsl:variable>
  1619. <div class="clsPromptComponent" id="selectDateTime{$sPromptId}"></div>
  1620. <script language="javascript" type="text/javascript">
  1621. <xsl:text>genSelectDateTimeHTML({</xsl:text>
  1622. <xsl:call-template name="stringProp"><xsl:with-param name="name">formName</xsl:with-param><xsl:with-param name="value" select="concat($promptFormName, $CognosViewerID)"/></xsl:call-template>
  1623. <xsl:call-template name="stringProp"><xsl:with-param name="name">parameterName</xsl:with-param><xsl:with-param name="value" select="$promptParameter"/></xsl:call-template>
  1624. <xsl:call-template name="stringProp"><xsl:with-param name="name">submitType</xsl:with-param><xsl:with-param name="value" select="$promptSubmitType"/></xsl:call-template>
  1625. <xsl:choose>
  1626. <!-- StartDate and StartTime for Ranged prompt controls -->
  1627. <xsl:when test="$promptRange='true'">
  1628. <xsl:call-template name="stringProp"><xsl:with-param name="name">defaultDate</xsl:with-param><xsl:with-param name="value" select="substring-before($sStartDateTime, 'T')"/></xsl:call-template>
  1629. <xsl:call-template name="stringProp"><xsl:with-param name="name">defaultTime</xsl:with-param><xsl:with-param name="value" select="$sStartTime"/></xsl:call-template>
  1630. </xsl:when>
  1631. <!-- Else use Default Value -->
  1632. <xsl:otherwise>
  1633. <xsl:call-template name="stringProp">
  1634. <xsl:with-param name="name">defaultDate</xsl:with-param>
  1635. <xsl:with-param name="value">
  1636. <xsl:choose>
  1637. <xsl:when test="$promptDefaultDate =-1"><xsl:text/></xsl:when>
  1638. <xsl:when test="./selectChoices/selectOption/@useValue != ''"><xsl:value-of select="./selectChoices/selectOption/@useValue"/></xsl:when>
  1639. <xsl:when test="./selectChoices/selectOption/@displayValue != ''"><xsl:value-of select="./selectChoices/selectOption/@displayValue"/></xsl:when>
  1640. <xsl:when test="$promptDefaultDate !=''"><xsl:value-of select="$promptDefaultDate"/></xsl:when>
  1641. </xsl:choose>
  1642. </xsl:with-param>
  1643. </xsl:call-template>
  1644. <xsl:call-template name="stringProp">
  1645. <xsl:with-param name="name">defaultTime</xsl:with-param>
  1646. <xsl:with-param name="value">
  1647. <xsl:choose>
  1648. <xsl:when test="$promptDefaultTime =-1"><xsl:text/></xsl:when>
  1649. <xsl:when test="./selectChoices/selectOption/@useValue != ''"><xsl:value-of select="./selectChoices/selectOption/@useValue"/></xsl:when>
  1650. <xsl:when test="./selectChoices/selectOption/@displayValue != ''"><xsl:value-of select="./selectChoices/selectOption/@displayValue"/></xsl:when>
  1651. <xsl:when test="$promptDefaultTime !=''"><xsl:value-of select="$promptDefaultTime"/></xsl:when>
  1652. </xsl:choose>
  1653. </xsl:with-param>
  1654. </xsl:call-template>
  1655. </xsl:otherwise>
  1656. </xsl:choose>
  1657. <xsl:call-template name="stringProp"><xsl:with-param name="name">startOfWeek</xsl:with-param><xsl:with-param name="value" select="$promptStartOfWeek"/></xsl:call-template>
  1658. <xsl:call-template name="stringProp"><xsl:with-param name="name">calendar</xsl:with-param><xsl:with-param name="value" select="$promptCalendar"/></xsl:call-template>
  1659. <xsl:call-template name="stringProp"><xsl:with-param name="name">selectUI</xsl:with-param><xsl:with-param name="value" select="$promptSelectUI"/></xsl:call-template>
  1660. <xsl:call-template name="stringProp"><xsl:with-param name="name">inputOrder</xsl:with-param><xsl:with-param name="value" select="$promptInputOrder"/></xsl:call-template>
  1661. <xsl:call-template name="stringProp"><xsl:with-param name="name">firstDate</xsl:with-param><xsl:with-param name="value" select="$promptFirstDate"/></xsl:call-template>
  1662. <xsl:call-template name="stringProp"><xsl:with-param name="name">lastDate</xsl:with-param><xsl:with-param name="value" select="$promptLastDate"/></xsl:call-template>
  1663. <xsl:call-template name="stringProp"><xsl:with-param name="name">timeZone</xsl:with-param><xsl:with-param name="value" select="$promptTimeZone"/></xsl:call-template>
  1664. <xsl:call-template name="stringProp"><xsl:with-param name="name">hourFormat</xsl:with-param><xsl:with-param name="value" select="$promptHourFormat"/></xsl:call-template>
  1665. <xsl:call-template name="stringProp"><xsl:with-param name="name">minuteFormat</xsl:with-param><xsl:with-param name="value" select="$promptMinuteFormat"/></xsl:call-template>
  1666. <xsl:call-template name="stringProp"><xsl:with-param name="name">secondFormat</xsl:with-param><xsl:with-param name="value" select="$promptSecondFormat"/></xsl:call-template>
  1667. <xsl:text>dateTime:</xsl:text>
  1668. <xsl:choose>
  1669. <xsl:when test="$promptDateTime='true'">0,</xsl:when>
  1670. <xsl:otherwise>1,</xsl:otherwise>
  1671. </xsl:choose>
  1672. <xsl:if test="$promptType!=''">type:<xsl:value-of select="number($promptType)"/>,</xsl:if>
  1673. <xsl:text>display:</xsl:text>
  1674. <xsl:choose>
  1675. <xsl:when test="$promptDisplay!=''"><xsl:value-of select="number($promptDisplay)"/></xsl:when>
  1676. <xsl:when test="$promptShowMilliseconds='true'">0</xsl:when>
  1677. <xsl:when test="$promptShowSeconds='true'">1</xsl:when>
  1678. <xsl:otherwise>2</xsl:otherwise>
  1679. </xsl:choose>
  1680. <xsl:text>,</xsl:text>
  1681. <xsl:text>mode:</xsl:text>
  1682. <xsl:choose>
  1683. <xsl:when test="$promptMode='static'">0</xsl:when>
  1684. <xsl:when test="$promptMode='live'">1</xsl:when>
  1685. <xsl:when test="$promptMode!=''"><xsl:value-of select="number($promptMode)"/>, <xsl:text/></xsl:when>
  1686. <xsl:otherwise>0</xsl:otherwise>
  1687. </xsl:choose>
  1688. <xsl:text>,</xsl:text>
  1689. <xsl:text/>initialState:<xsl:call-template name="getRangeType"><xsl:with-param name="selectOptions" select="./selectChoices"/></xsl:call-template>,<xsl:text/>
  1690. <xsl:call-template name="boolProp"><xsl:with-param name="name">required</xsl:with-param><xsl:with-param name="value" select="$promptRequired"/></xsl:call-template>
  1691. <xsl:call-template name="boolProp"><xsl:with-param name="name">hideAdornments</xsl:with-param><xsl:with-param name="value" select="$promptHideAdornments"/></xsl:call-template>
  1692. <xsl:call-template name="boolProp"><xsl:with-param name="name">suppressDisabled</xsl:with-param><xsl:with-param name="value" select="$suppressDisabled"/></xsl:call-template>
  1693. <xsl:call-template name="boolProp"><xsl:with-param name="name">xSDFormat</xsl:with-param><xsl:with-param name="value" select="$promptXSDFormat"/><xsl:with-param name="default" select="'true'"/></xsl:call-template>
  1694. <xsl:call-template name="boolProp"><xsl:with-param name="name">multi</xsl:with-param><xsl:with-param name="value" select="$promptMultiSelect"/></xsl:call-template>
  1695. <xsl:call-template name="boolProp"><xsl:with-param name="name">range</xsl:with-param><xsl:with-param name="value" select="$promptRange"/></xsl:call-template>
  1696. <xsl:call-template name="stringProp"><xsl:with-param name="name">style</xsl:with-param><xsl:with-param name="value" select="$promptStyle"/></xsl:call-template>
  1697. <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateEditBoxStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateEditBox/@style"/></xsl:call-template>
  1698. <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateYearsStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateCalendar/selectDateYears/@style"/></xsl:call-template>
  1699. <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateMonthsStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateCalendar/selectDateMonths/@style"/></xsl:call-template>
  1700. <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateDaysOfWeekStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateCalendar/selectDateDaysOfWeek/@style"/></xsl:call-template>
  1701. <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateDaysStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateCalendar/selectDateDays/@style"/></xsl:call-template>
  1702. <xsl:if test="$promptRange='true'">
  1703. <xsl:call-template name="stringProp"><xsl:with-param name="name">endDate</xsl:with-param><xsl:with-param name="value" select="substring-before($sEndDateTime, 'T')"/></xsl:call-template>
  1704. <xsl:call-template name="stringProp"><xsl:with-param name="name">endTime</xsl:with-param><xsl:with-param name="value" select="$sEndTime"/></xsl:call-template>
  1705. </xsl:if>
  1706. <xsl:call-template name="boolProp"><xsl:with-param name="name">suppressExtraPromptNames</xsl:with-param><xsl:with-param name="value" select="$promptSuppressExtraPromptNames"/></xsl:call-template>
  1707. <xsl:call-template name="stringProp"><xsl:with-param name="name">CVId</xsl:with-param><xsl:with-param name="value" select="$CognosViewerID"/></xsl:call-template>
  1708. <xsl:text/>id:"<xsl:value-of select="$sPromptId"/>"<xsl:text/>
  1709. <xsl:text>});</xsl:text>
  1710. <xsl:choose>
  1711. <xsl:when test="$promptMultiSelect='true' and ($promptRange!='true' or not($promptRange))">
  1712. <xsl:call-template name='getListOptionsJS'>
  1713. <xsl:with-param name="objectId" select="concat('multipleDateTimePicker', $sPromptId)"/>
  1714. <xsl:with-param name="selectOptions" select="./selectChoices"/>
  1715. </xsl:call-template>
  1716. </xsl:when>
  1717. <xsl:when test="$promptMultiSelect='true' and $promptRange='true'">
  1718. <xsl:call-template name="getMultipleRangeSavedValues">
  1719. <xsl:with-param name="selectChoices" select="./selectChoices"/>
  1720. <xsl:with-param name="multipleRangeControl">multipleRange<xsl:value-of select="$sPromptId"/></xsl:with-param>
  1721. </xsl:call-template>
  1722. </xsl:when>
  1723. </xsl:choose>
  1724. </script>
  1725. </xsl:template>
  1726. <!--
  1727. ********** interval prompt controls **********
  1728. -->
  1729. <xsl:template name="getSelectInterval">
  1730. <xsl:param name="promptLocale"/>
  1731. <xsl:param name="promptFormName"/>
  1732. <xsl:param name="promptRequired"/>
  1733. <xsl:param name="promptDefaultValue"/>
  1734. <xsl:param name="promptParameter"/>
  1735. <xsl:param name="promptId"/>
  1736. <xsl:param name="promptMultiSelect"/>
  1737. <xsl:param name="promptSubmitType"/>
  1738. <xsl:param name="suppressDisabled"/>
  1739. <xsl:param name="promptHideAdornments"/>
  1740. <xsl:param name="promptShowSeconds"/>
  1741. <xsl:param name="promptShowMilliseconds"/>
  1742. <xsl:param name="promptRange"/>
  1743. <xsl:param name="promptAllowComplexRange"/>
  1744. <xsl:param name="promptAllowNegative"/>
  1745. <xsl:param name="promptSuppressExtraPromptNames"/>
  1746. <xsl:param name="promptStyle"/>
  1747. <!-- unique identifier for the control, generate one if not -->
  1748. <xsl:variable name="sPromptId">
  1749. <xsl:choose>
  1750. <xsl:when test="$promptId!=''">
  1751. <xsl:call-template name="convertQuotes">
  1752. <xsl:with-param name="str" select="$promptId"/>
  1753. </xsl:call-template>
  1754. </xsl:when>
  1755. <xsl:otherwise>
  1756. <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
  1757. </xsl:otherwise>
  1758. </xsl:choose>
  1759. <xsl:value-of select="$CognosViewerID"/>
  1760. </xsl:variable>
  1761. <div class="clsPromptComponent">
  1762. <div id="selectInterval{$sPromptId}" class="clsPromptComponent"></div>
  1763. <script language="javascript" type="text/javascript">
  1764. <xsl:text>genSelectIntervalHTML({</xsl:text>
  1765. <xsl:call-template name="stringProp"><xsl:with-param name="name">formName</xsl:with-param><xsl:with-param name="value" select="concat($promptFormName, $CognosViewerID)"/></xsl:call-template>
  1766. <xsl:call-template name="stringProp"><xsl:with-param name="name">parameterName</xsl:with-param><xsl:with-param name="value" select="$promptParameter"/></xsl:call-template>
  1767. <xsl:call-template name="stringProp"><xsl:with-param name="name">submitType</xsl:with-param><xsl:with-param name="value" select="$promptSubmitType"/></xsl:call-template>
  1768. <xsl:call-template name="stringProp">
  1769. <xsl:with-param name="name">defaultValue</xsl:with-param>
  1770. <xsl:with-param name="value">
  1771. <xsl:choose>
  1772. <xsl:when test="$promptRange='true'"><xsl:call-template name='getStartRangeOption'><xsl:with-param name='selectOptions' select='./selectChoices'/></xsl:call-template></xsl:when>
  1773. <xsl:when test="$promptDefaultValue=-1"><xsl:text/></xsl:when>
  1774. <xsl:when test="./selectChoices/selectOption/@useValue!=''"><xsl:value-of select="./selectChoices/selectOption/@useValue"/></xsl:when>
  1775. <xsl:when test="./selectChoices/selectOption/@displayValue!=''"><xsl:value-of select="./selectChoices/selectOption/@displayValue"/></xsl:when>
  1776. <xsl:when test="$promptDefaultValue!=''"><xsl:value-of select="$promptDefaultValue"/></xsl:when>
  1777. <xsl:otherwise><xsl:text/></xsl:otherwise>
  1778. </xsl:choose>
  1779. </xsl:with-param>
  1780. </xsl:call-template>
  1781. <xsl:text/>initialState:<xsl:call-template name="getRangeType"><xsl:with-param name="selectOptions" select="./selectChoices"/></xsl:call-template>,<xsl:text/>
  1782. <xsl:call-template name="boolProp"><xsl:with-param name="name">required</xsl:with-param><xsl:with-param name="value" select="$promptRequired"/></xsl:call-template>
  1783. <xsl:call-template name="boolProp"><xsl:with-param name="name">hideAdornments</xsl:with-param><xsl:with-param name="value" select="$promptHideAdornments"/></xsl:call-template>
  1784. <xsl:call-template name="boolProp"><xsl:with-param name="name">showSeconds</xsl:with-param><xsl:with-param name="value" select="$promptShowSeconds"/></xsl:call-template>
  1785. <xsl:call-template name="boolProp"><xsl:with-param name="name">showMilliseconds</xsl:with-param><xsl:with-param name="value" select="$promptShowMilliseconds"/></xsl:call-template>
  1786. <xsl:call-template name="boolProp"><xsl:with-param name="name">suppressExtraPromptNames</xsl:with-param><xsl:with-param name="value" select="$promptSuppressExtraPromptNames"/></xsl:call-template>
  1787. <xsl:call-template name="boolProp"><xsl:with-param name="name">multi</xsl:with-param><xsl:with-param name="value" select="$promptMultiSelect"/></xsl:call-template>
  1788. <xsl:call-template name="boolProp"><xsl:with-param name="name">range</xsl:with-param><xsl:with-param name="value" select="$promptRange"/></xsl:call-template>
  1789. <xsl:call-template name="boolProp"><xsl:with-param name="name">allowNegative</xsl:with-param><xsl:with-param name="value" select="$promptAllowNegative"/><xsl:with-param name="default">true</xsl:with-param></xsl:call-template>
  1790. <xsl:call-template name="stringProp"><xsl:with-param name="name">style</xsl:with-param><xsl:with-param name="value" select="$promptStyle"/></xsl:call-template>
  1791. <!-- range to default value for range prompt controls -->
  1792. <xsl:if test="$promptRange='true'">
  1793. <xsl:call-template name="stringProp">
  1794. <xsl:with-param name="name">endValue</xsl:with-param>
  1795. <xsl:with-param name="value"><xsl:call-template name='getEndRangeOption'><xsl:with-param name='selectOptions' select='./selectChoices'/></xsl:call-template></xsl:with-param>
  1796. </xsl:call-template>
  1797. </xsl:if>
  1798. <xsl:call-template name="stringProp"><xsl:with-param name="name">CVId</xsl:with-param><xsl:with-param name="value" select="$CognosViewerID"/></xsl:call-template>
  1799. <xsl:text/>id:"<xsl:value-of select="$sPromptId"/>"<xsl:text/>
  1800. <xsl:text>});</xsl:text>
  1801. <xsl:choose>
  1802. <xsl:when test="$promptMultiSelect='true' and ($promptRange!='true' or not($promptRange))">
  1803. <xsl:call-template name='getListOptionsJS'>
  1804. <xsl:with-param name="objectId" select="concat('multipleIntervalPicker', $sPromptId)"/>
  1805. <xsl:with-param name='selectOptions' select='./selectChoices'/>
  1806. </xsl:call-template>
  1807. </xsl:when>
  1808. <xsl:when test="$promptMultiSelect='true' and $promptRange='true'">
  1809. <xsl:call-template name="getMultipleRangeSavedValues">
  1810. <xsl:with-param name="selectChoices" select="./selectChoices"/>
  1811. <xsl:with-param name="multipleRangeControl">multipleRange<xsl:value-of select="$sPromptId"/></xsl:with-param>
  1812. </xsl:call-template>
  1813. </xsl:when>
  1814. </xsl:choose>
  1815. </script>
  1816. </div>
  1817. </xsl:template>
  1818. <!--
  1819. ********** select with tree prompt controls **********
  1820. -->
  1821. <xsl:template name="getSelectWithTree">
  1822. <xsl:param name="promptLocale" />
  1823. <xsl:param name="promptFormName" />
  1824. <xsl:param name="promptRequired" />
  1825. <xsl:param name="promptMultiSelect" />
  1826. <xsl:param name="promptStyle" />
  1827. <xsl:param name="promptParameter" />
  1828. <xsl:param name="promptId" />
  1829. <xsl:param name="promptSubmitType" />
  1830. <xsl:param name="promptHideAdornments" />
  1831. <xsl:param name="promptMustChangeDefaultValue"/>
  1832. <xsl:param name="promptHideOuterTable"/>
  1833. <xsl:param name="promptRowsPerPage"/>
  1834. <xsl:param name="promptShowPreviousValues"/>
  1835. <xsl:param name="promptCanHaveChildren"/>
  1836. <xsl:param name="promptDisabled"/>
  1837. <div class="clsPromptComponent">
  1838. <!-- unique identifier for the control, generate one if not -->
  1839. <xsl:variable name="sPromptId">
  1840. <xsl:choose>
  1841. <xsl:when test="$promptId!=''">
  1842. <xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$promptId"/></xsl:call-template>
  1843. </xsl:when>
  1844. <xsl:otherwise>
  1845. <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
  1846. </xsl:otherwise>
  1847. </xsl:choose>
  1848. <xsl:value-of select="$CognosViewerID"/>
  1849. </xsl:variable>
  1850. <xsl:variable name="sFormId">
  1851. <xsl:choose>
  1852. <xsl:when test="$promptFormName !=''">"<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="concat($promptFormName, $CognosViewerID)"/></xsl:call-template>"</xsl:when>
  1853. <xsl:otherwise>0</xsl:otherwise>
  1854. </xsl:choose>
  1855. </xsl:variable>
  1856. <xsl:variable name="htmlForm">document.forms[<xsl:value-of select="$sFormId"/>]</xsl:variable>
  1857. <xsl:variable name="bRequired">
  1858. <xsl:choose>
  1859. <xsl:when test="$promptRequired !=''">
  1860. <xsl:choose>
  1861. <xsl:when test="translate($promptRequired, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')='TRUE'">true</xsl:when>
  1862. <xsl:otherwise>false</xsl:otherwise>
  1863. </xsl:choose>
  1864. </xsl:when>
  1865. <xsl:otherwise>false</xsl:otherwise>
  1866. </xsl:choose>
  1867. </xsl:variable>
  1868. <xsl:variable name="bMultiSelect">
  1869. <xsl:choose>
  1870. <xsl:when test="$promptMultiSelect!=''">
  1871. <xsl:choose>
  1872. <xsl:when test="translate($promptMultiSelect, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')='TRUE'">true</xsl:when>
  1873. <xsl:otherwise>false</xsl:otherwise>
  1874. </xsl:choose>
  1875. </xsl:when>
  1876. <xsl:otherwise>false</xsl:otherwise>
  1877. </xsl:choose>
  1878. </xsl:variable>
  1879. <xsl:variable name="bMustChangeDefaultValue">
  1880. <xsl:choose>
  1881. <xsl:when test="$promptMustChangeDefaultValue!=''">
  1882. <xsl:choose>
  1883. <xsl:when test="translate($promptMustChangeDefaultValue, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')='TRUE'">true</xsl:when>
  1884. <xsl:otherwise>false</xsl:otherwise>
  1885. </xsl:choose>
  1886. </xsl:when>
  1887. <xsl:otherwise>false</xsl:otherwise>
  1888. </xsl:choose>
  1889. </xsl:variable>
  1890. <xsl:variable name="bHideAdornments">
  1891. <xsl:choose>
  1892. <xsl:when test="$promptHideAdornments!=''">
  1893. <xsl:choose>
  1894. <xsl:when test="translate($promptHideAdornments, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')='TRUE'">true</xsl:when>
  1895. <xsl:otherwise>false</xsl:otherwise>
  1896. </xsl:choose>
  1897. </xsl:when>
  1898. <xsl:otherwise>false</xsl:otherwise>
  1899. </xsl:choose>
  1900. </xsl:variable>
  1901. <xsl:variable name="bHideOuterTable">
  1902. <xsl:choose>
  1903. <xsl:when test="$promptHideOuterTable!=''">
  1904. <xsl:choose>
  1905. <xsl:when test="translate($promptHideOuterTable, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')='TRUE'">true</xsl:when>
  1906. <xsl:otherwise>false</xsl:otherwise>
  1907. </xsl:choose>
  1908. </xsl:when>
  1909. <xsl:otherwise>false</xsl:otherwise>
  1910. </xsl:choose>
  1911. </xsl:variable>
  1912. <xsl:variable name="bCanHaveChildren">
  1913. <xsl:choose>
  1914. <xsl:when test="$promptCanHaveChildren!=''">
  1915. <xsl:choose>
  1916. <xsl:when test="translate($promptCanHaveChildren, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')='TRUE'">true</xsl:when>
  1917. <xsl:otherwise>false</xsl:otherwise>
  1918. </xsl:choose>
  1919. </xsl:when>
  1920. <xsl:otherwise>false</xsl:otherwise>
  1921. </xsl:choose>
  1922. </xsl:variable>
  1923. <xsl:variable name="bDisabled">
  1924. <xsl:choose>
  1925. <xsl:when test="$promptDisabled!=''">
  1926. <xsl:choose>
  1927. <xsl:when test="translate($promptDisabled, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')='TRUE'">true</xsl:when>
  1928. <xsl:otherwise>false</xsl:otherwise>
  1929. </xsl:choose>
  1930. </xsl:when>
  1931. <xsl:otherwise>false</xsl:otherwise>
  1932. </xsl:choose>
  1933. </xsl:variable>
  1934. <xsl:variable name="bShowPreviousValues">
  1935. <xsl:choose>
  1936. <xsl:when test="$promptShowPreviousValues!=''">
  1937. <xsl:choose>
  1938. <xsl:when test="translate($promptShowPreviousValues, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')='TRUE'">true</xsl:when>
  1939. <xsl:otherwise>false</xsl:otherwise>
  1940. </xsl:choose>
  1941. </xsl:when>
  1942. <xsl:otherwise>false</xsl:otherwise>
  1943. </xsl:choose>
  1944. </xsl:variable>
  1945. <script language="javascript" type="text/javascript">
  1946. addHiddenInputHTML(<xsl:value-of select="$sFormId"/>, "p_<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$promptParameter"/></xsl:call-template>", "");
  1947. </script>
  1948. <div id="selectWithTree{$sPromptId}" class="clsPromptComponent"></div>
  1949. <script language="javascript" type="text/javascript">
  1950. var treeSubmit<xsl:value-of select="$sPromptId"/> = <xsl:value-of select="$htmlForm"/>.elements["p_<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$promptParameter"/></xsl:call-template>"];
  1951. var treeDiv = document.getElementById("selectWithTree<xsl:value-of select="$sPromptId"/>");
  1952. var tree<xsl:value-of select="$sPromptId"/> = new CTree (treeDiv, treeSubmit<xsl:value-of select="$sPromptId"/>, <xsl:value-of select="$bRequired"/>, <xsl:value-of select="$bMultiSelect"/>, "tree<xsl:value-of select="$sPromptId"/>", null, null, "<xsl:value-of select="$CognosViewerID"/>","<xsl:value-of select="$promptStyle"/>");
  1953. <xsl:variable name="parentNode">treeroot<xsl:value-of select="$sPromptId"/></xsl:variable>
  1954. var <xsl:value-of select="$parentNode"/> = tree<xsl:value-of select="$sPromptId"/>.getRootNode();
  1955. tree<xsl:value-of select="$sPromptId"/>.setMustChangeDefaultValue(<xsl:value-of select="$bMustChangeDefaultValue"/>);
  1956. tree<xsl:value-of select="$sPromptId"/>.setHideAdornments(<xsl:value-of select="$bHideAdornments"/>);
  1957. tree<xsl:value-of select="$sPromptId"/>.setHideOuterTable(<xsl:value-of select="$bHideOuterTable"/>);
  1958. tree<xsl:value-of select="$sPromptId"/>.setPromptingTree("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$promptParameter"/></xsl:call-template>");
  1959. <xsl:if test="$promptRowsPerPage!=''">
  1960. tree<xsl:value-of select="$sPromptId"/>.setMaxValueCount(<xsl:value-of select="number($promptRowsPerPage)"/>);
  1961. </xsl:if>
  1962. <xsl:if test="$promptShowPreviousValues!=''">
  1963. tree<xsl:value-of select="$sPromptId"/>.setShowPreviousValues(<xsl:value-of select="$bShowPreviousValues"/>);
  1964. </xsl:if>
  1965. <xsl:if test="contains($promptStyle, 'width:')">
  1966. <xsl:variable name="afterStr"><xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="substring-after($promptStyle, 'width:')"/></xsl:call-template></xsl:variable>
  1967. <xsl:choose>
  1968. <xsl:when test="contains($afterStr, ';')">
  1969. tree<xsl:value-of select="$sPromptId"/>.setContainerWidth("<xsl:value-of select="substring-before($afterStr,';')"/>");
  1970. </xsl:when>
  1971. <xsl:otherwise>
  1972. tree<xsl:value-of select="$sPromptId"/>.setContainerWidth("<xsl:value-of select="$afterStr"/>");
  1973. </xsl:otherwise>
  1974. </xsl:choose>
  1975. </xsl:if>
  1976. <xsl:if test="contains($promptStyle, 'height:')">
  1977. <xsl:variable name="afterStr"><xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="substring-after($promptStyle, 'height:')"/></xsl:call-template></xsl:variable>
  1978. <xsl:choose>
  1979. <xsl:when test="contains($afterStr, ';')">
  1980. tree<xsl:value-of select="$sPromptId"/>.setContainerHeight("<xsl:value-of select="substring-before($afterStr,';')"/>");
  1981. </xsl:when>
  1982. <xsl:otherwise>
  1983. tree<xsl:value-of select="$sPromptId"/>.setContainerHeight("<xsl:value-of select="$afterStr"/>");
  1984. </xsl:otherwise>
  1985. </xsl:choose>
  1986. </xsl:if>
  1987. <xsl:if test="$promptCanHaveChildren!=''">
  1988. tree<xsl:value-of select="$sPromptId"/>.setNodesCanHaveChildren(<xsl:value-of select="$bCanHaveChildren"/>);
  1989. </xsl:if>
  1990. <xsl:if test="$promptDisabled!=''">
  1991. tree<xsl:value-of select="$sPromptId"/>.setDisabled(<xsl:value-of select="$bDisabled"/>);
  1992. </xsl:if>
  1993. if (typeof tntGeneric == "undefined")
  1994. tntGeneric = new CTreeNodeType(TREE_FOLDER, true, PROMPT_SKIN + "/prompting/images/genericTreeNode.gif", PROMPT_SKIN + "/prompting/images/genericTreeNode.gif");
  1995. <xsl:for-each select="selectChoices/selectTreeOption">
  1996. tree<xsl:value-of select="$sPromptId"/>.addToPrevSelArray("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="@useValue"/></xsl:call-template>","<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="@displayValue"/></xsl:call-template>");
  1997. </xsl:for-each>
  1998. <xsl:for-each select="selectChoices/selectOption">
  1999. tree<xsl:value-of select="$sPromptId"/>.addToPrevSelArray("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="@useValue"/></xsl:call-template>","<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="@displayValue"/></xsl:call-template>");
  2000. </xsl:for-each>
  2001. <xsl:for-each select="selectOptions/selectTreeOption">
  2002. <xsl:call-template name="getSelectTreeOption">
  2003. <xsl:with-param name="selectTreeOption" select="."/>
  2004. <xsl:with-param name="parentNode" select="$parentNode"/>
  2005. </xsl:call-template>
  2006. </xsl:for-each>
  2007. <xsl:if test="number(selectOptions/@skipValueCount) &gt;= 0">
  2008. <xsl:value-of select="$parentNode"/>.setSkipValueCount(<xsl:value-of select="number(selectOptions/@skipValueCount)"/>);
  2009. </xsl:if>
  2010. <xsl:if test="number(selectOptions/@memberDisplayCountDefault) &gt;= 0">
  2011. tree<xsl:value-of select="$sPromptId"/>.setMaxValueCount(<xsl:value-of select="number(selectOptions/@memberDisplayCountDefault)"/>);
  2012. </xsl:if>
  2013. <xsl:if test="$bMultiSelect = 'false'">
  2014. tree<xsl:value-of select="$sPromptId"/>.setRecursiveSelect(false);
  2015. </xsl:if>
  2016. setTimeout("tree<xsl:value-of select="$sPromptId"/>.drawAll();", 100);
  2017. setTimeout("tree<xsl:value-of select="$sPromptId"/>.checkData();", 110);
  2018. <xsl:if test="selectOptions/@moreData='true' and ((number(selectOptions/@skipValueCount) + number(selectOptions/@memberDisplayCountDefault)) &lt; number(selectOptions/@memberDisplayCountLimit))">
  2019. <xsl:value-of select="$parentNode"/>.setMoreData(true);
  2020. var theNodeRef = tree<xsl:value-of select="$sPromptId"/>.getName() + <xsl:value-of select="$parentNode"/>.getTreeRef();
  2021. setTimeout("tree<xsl:value-of select="$sPromptId"/>.drawMoreData(<xsl:value-of select="$parentNode"/>, '" + theNodeRef + "');", 250);
  2022. </xsl:if>
  2023. <xsl:value-of select="$CVObject"/>preProcessControlArray = <xsl:value-of select="$CVObject"/>preProcessControlArray.concat("tree<xsl:value-of select="$sPromptId"/>");
  2024. </script>
  2025. </div>
  2026. </xsl:template>
  2027. <xsl:template name="getSelectTreeOption">
  2028. <xsl:param name="selectTreeOption"/>
  2029. <xsl:param name="parentNode"/>
  2030. <xsl:for-each select="$selectTreeOption">
  2031. <xsl:variable name="nodeName">node<xsl:value-of select="translate(generate-id(), '.', 'x')"/></xsl:variable>
  2032. var <xsl:value-of select="$nodeName"/> = new CTreeNode(<xsl:value-of select="$parentNode"/>, tntGeneric, false, "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="@displayValue"/></xsl:call-template>", "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="@useValue"/></xsl:call-template>", false);
  2033. <xsl:if test="./selectTreeOption">
  2034. <xsl:call-template name="getSelectTreeOption">
  2035. <xsl:with-param name="selectTreeOption" select="./selectTreeOption"/>
  2036. <xsl:with-param name="parentNode" select="$nodeName"/>
  2037. </xsl:call-template>
  2038. </xsl:if>
  2039. </xsl:for-each>
  2040. </xsl:template>
  2041. <!--
  2042. ////////////////////////////////////////////////////////////////////////
  2043. // Prompt Buttons
  2044. ////////////////////////////////////////////////////////////////////////
  2045. -->
  2046. <!-- Prompt Submit Button -->
  2047. <xsl:template name="getPromptButton">
  2048. <xsl:param name="promptDisplayValue"/>
  2049. <xsl:param name="promptStyle"/>
  2050. <xsl:param name="promptType"/>
  2051. <xsl:param name="promptLocale"/>
  2052. <xsl:param name="promptBackURL"/>
  2053. <xsl:param name="promptClass"/>
  2054. <xsl:param name="promptButtonName"/>
  2055. <xsl:variable name="sPromptId"><xsl:value-of select="$promptType"/><xsl:value-of select="translate(generate-id(), '.', 'x')"/><xsl:value-of select="$CognosViewerID"/></xsl:variable>
  2056. <!-- use the authored text for the label if there is any, otherwise use the default -->
  2057. <xsl:variable name="sLabel">
  2058. <xsl:choose>
  2059. <xsl:when test="$promptDisplayValue != '' ">
  2060. <xsl:value-of select="$promptDisplayValue"/>
  2061. </xsl:when>
  2062. <xsl:otherwise>
  2063. <xsl:choose>
  2064. <xsl:when test="$promptType != ''">
  2065. <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DON']/string[@id=$promptType]"/>
  2066. </xsl:when>
  2067. <xsl:otherwise/>
  2068. </xsl:choose>
  2069. </xsl:otherwise>
  2070. </xsl:choose>
  2071. </xsl:variable>
  2072. <xsl:variable name="promptTypeEnumeration">
  2073. <xsl:choose>
  2074. <xsl:when test="$promptType='back'">PROMPTBUTTON_BACK</xsl:when>
  2075. <xsl:when test="$promptType='cancel'">PROMPTBUTTON_CANCEL</xsl:when>
  2076. <xsl:when test="$promptType='next' ">PROMPTBUTTON_NEXT</xsl:when>
  2077. <xsl:when test="$promptType='finish'">PROMPTBUTTON_FINISH</xsl:when>
  2078. <xsl:when test="$promptType='reprompt'">PROMPTBUTTON_REPROMPT</xsl:when>
  2079. <xsl:when test="$promptType='OK'">PROMPTBUTTON_OK</xsl:when>
  2080. <xsl:otherwise>PROMPTBUTTON_NEXT</xsl:otherwise>
  2081. </xsl:choose>
  2082. </xsl:variable>
  2083. <xsl:variable name="bEnabled">
  2084. <xsl:choose>
  2085. <xsl:when test="($promptType='back') and (//PAGE[@canBack='false'])">false</xsl:when>
  2086. <xsl:when test="($promptType='finish') and (//PAGE[@canFinish='false'])">false</xsl:when>
  2087. <xsl:otherwise>true</xsl:otherwise>
  2088. </xsl:choose>
  2089. </xsl:variable>
  2090. <xsl:variable name="sClass">
  2091. <xsl:choose>
  2092. <xsl:when test="$promptClass != ''"><xsl:value-of select="$promptClass"/></xsl:when>
  2093. <xsl:otherwise>clsPromptButton</xsl:otherwise>
  2094. </xsl:choose>
  2095. </xsl:variable>
  2096. <xsl:variable name="sClassOver">
  2097. <xsl:choose>
  2098. <xsl:when test="$promptClass != ''">this.className = '<xsl:value-of select="$promptClass"/> bph'</xsl:when>
  2099. <xsl:otherwise>this.className = 'clsPromptButtonOver'</xsl:otherwise>
  2100. </xsl:choose>
  2101. </xsl:variable>
  2102. <xsl:variable name="sClassOut">
  2103. <xsl:choose>
  2104. <xsl:when test="$promptClass != ''">this.className = '<xsl:value-of select="$promptClass"/>'</xsl:when>
  2105. <xsl:otherwise>this.className = 'clsPromptButton'</xsl:otherwise>
  2106. </xsl:choose>
  2107. </xsl:variable>
  2108. <div class="clsPromptComponent" pt="btn">
  2109. <button type="button" name="{$sPromptId}" id="{$sPromptId}" class="{$sClass}" onmouseover="{$sClassOver}" onmouseout="{$sClassOut}">
  2110. <xsl:if test="$promptButtonName != ''">
  2111. <xsl:attribute name="layoutName">
  2112. <xsl:value-of select="$promptButtonName"/><xsl:value-of select="$CognosViewerID"/>
  2113. </xsl:attribute>
  2114. </xsl:if>
  2115. <xsl:attribute name="onclick">
  2116. <xsl:value-of select="$CVObject"/>promptAction('<xsl:value-of select="$promptType"/>'<xsl:text/>
  2117. <xsl:if test="$promptType='cancel' and not($promptBackURL='')">
  2118. <xsl:text>,'</xsl:text>
  2119. <xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$promptBackURL"/></xsl:call-template>
  2120. <xsl:text>'</xsl:text>
  2121. </xsl:if>
  2122. <xsl:text>)</xsl:text>
  2123. </xsl:attribute>
  2124. <xsl:attribute name="style">
  2125. <xsl:if test="not(*) and string-length(normalize-space($sLabel))&lt;4">padding-left:10px;padding-right:10px;</xsl:if>
  2126. <xsl:value-of select="$promptStyle"/>
  2127. </xsl:attribute>
  2128. <xsl:choose>
  2129. <xsl:when test="*"><xsl:apply-templates select="*"/></xsl:when>
  2130. <xsl:otherwise><xsl:value-of select="$sLabel"/></xsl:otherwise>
  2131. </xsl:choose>
  2132. </button>
  2133. </div>
  2134. <script language="javascript" type="text/javascript">
  2135. var promptButton<xsl:value-of select="$sPromptId"/> = new CPromptButton (document.getElementById("<xsl:value-of select="$sPromptId"/>"), <xsl:value-of select="$promptTypeEnumeration"/>, <xsl:value-of select="$bEnabled"/>, "<xsl:value-of select="$CognosViewerID"/>");
  2136. <xsl:value-of select="$CVObject"/>pageNavigationObserverArray = <xsl:value-of select="$CVObject"/>pageNavigationObserverArray.concat("promptButton<xsl:value-of select="$sPromptId"/>");
  2137. <xsl:value-of select="$CVObject"/>notify();
  2138. </script>
  2139. </xsl:template>
  2140. <!--
  2141. ////////////////////////////////////////////////////////////////////////
  2142. // Default Prompt Page Generation
  2143. ////////////////////////////////////////////////////////////////////////
  2144. The following templates are used to create default prompt pages (in the case where a prompt page has not been authored)
  2145. -->
  2146. <!-- Default Prompt Page Header -->
  2147. <xsl:template name="getDefaultPromptHeader">
  2148. <xsl:param name="promptLocale"/>
  2149. <xsl:param name="promptPageTitle"/>
  2150. <xsl:param name="promptBackURL"/>
  2151. <xsl:variable name="action">
  2152. <xsl:value-of select="$CVObject"/>promptAction(K_ACTION_CANCEL,'<xsl:text/>
  2153. <xsl:if test="not($promptBackURL='')"><xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$promptBackURL"/></xsl:call-template></xsl:if>
  2154. <xsl:text>')</xsl:text>
  2155. </xsl:variable>
  2156. <xsl:call-template name="PromptJavascriptFiles"/>
  2157. <script language="javascript" src="{$webcontentRootURI}/prompting/res/promptLocale_{substring($promptLocale,0,6)}.js" type="text/javascript">/**/</script>
  2158. <!-- determine the appropriate page title-->
  2159. <xsl:variable name="faultcode" select="//PAGE/@faultcode"/>
  2160. <xsl:variable name="dialogTitle">
  2161. <xsl:choose>
  2162. <xsl:when test="$faultcode = 'CQE-801'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_SELECT_CONNECTION_TITLE']"/></xsl:when>
  2163. <xsl:when test="$faultcode = 'CQE-802'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_SELECT_SIGNON_TITLE']"/></xsl:when>
  2164. <xsl:when test="//selectDataSourceSignon[@faultcode='CQE-803' and @faultSubcode='1']"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_ENTER_SIGNON_TITLE']"/></xsl:when>
  2165. <xsl:when test="//selectDataSourceSignon[@faultcode='CQE-803' and not(@faultSubcode='1')]"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_LOGON_FAILED_TITLE']"/></xsl:when>
  2166. <xsl:when test="$faultcode = 'CQE-804'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_CONNECTION_NOT_FOUND_TITLE']"/></xsl:when>
  2167. <xsl:when test="$faultcode = 'CQE-805'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_SIGNON_NOT_FOUND_TITLE']"/></xsl:when>
  2168. <xsl:when test="$faultcode = 'CQE-806'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_DATA_SOURCE_NOT_FOUND_TITLE']"/></xsl:when>
  2169. <xsl:otherwise>
  2170. <xsl:if test="$promptPageTitle!=''"><xsl:value-of select="$promptPageTitle"/> - </xsl:if>
  2171. <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='promptTitle']"/>
  2172. </xsl:otherwise>
  2173. </xsl:choose>
  2174. </xsl:variable>
  2175. <xsl:variable name="dialogTip">
  2176. <xsl:choose>
  2177. <xsl:when test="$faultcode = 'CQE-801'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_SELECT_CONNECTION_TIP']"/></xsl:when>
  2178. <xsl:when test="$faultcode = 'CQE-802'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_SELECT_SIGNON_TIP']"/></xsl:when>
  2179. <xsl:when test="//selectDataSourceSignon[@faultcode='CQE-803' and (@faultSubcode='1' or @faultSubcode='6')]"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_LOGON_FAILED_TIP']"/></xsl:when>
  2180. <xsl:when test="//selectDataSourceSignon[@faultcode='CQE-803' and not(@faultSubcode='1' or @faultSubcode='6')]"><xsl:value-of select="//PAGE/@faultstring"/></xsl:when>
  2181. <xsl:when test="$faultcode = 'CQE-804'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_CONNECTION_NOT_FOUND_TIP']"/></xsl:when>
  2182. <xsl:when test="$faultcode = 'CQE-805'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_SIGNON_NOT_FOUND_TIP']"/></xsl:when>
  2183. <xsl:when test="$faultcode = 'CQE-806'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_DATA_SOURCE_NOT_FOUND_TIP']"/></xsl:when>
  2184. <xsl:otherwise>
  2185. <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='hintText']"/>
  2186. </xsl:otherwise>
  2187. </xsl:choose>
  2188. </xsl:variable>
  2189. <xsl:call-template name="renderDialogHeader">
  2190. <xsl:with-param name="action" select="$action"/>
  2191. <xsl:with-param name="faultcode" select="$faultcode"/>
  2192. <xsl:with-param name="dialogTitle" select="$dialogTitle"/>
  2193. <xsl:with-param name="dialogTip" select="$dialogTip"/>
  2194. </xsl:call-template>
  2195. <table role="presentation" border="0" height="11" cellpadding="0" cellspacing="0" width="100%">
  2196. <tr>
  2197. <td colspan="2" height="10">
  2198. <img alt="" height="10" width="5" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
  2199. </td>
  2200. </tr>
  2201. </table>
  2202. <xsl:if test="//PAGE[@generateRepromptButton='true']">
  2203. <TABLE role="presentation" cellpadding="1" cellspacing="0" border="0">
  2204. <TR>
  2205. <TD height="20" width="1"><img alt="" height="10" width="1" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
  2206. <TD><TABLE role="presentation" cellpadding="1" cellspacing="0" border="0">
  2207. <TR>
  2208. <TD><xsl:call-template name="getPromptButton">
  2209. <xsl:with-param name="promptDisplayValue"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DON']/string[@id='reprompt']"/></xsl:with-param>
  2210. <xsl:with-param name="promptStyle" />
  2211. <xsl:with-param name="promptType" select="'reprompt'"/>
  2212. <xsl:with-param name="promptLocale" select="$promptLocale"/>
  2213. <xsl:with-param name="promptBackURL"/>
  2214. </xsl:call-template></TD>
  2215. <TD nowrap="nowrap" class="formText"><IMG height="30" width="30" src="{$skin_folder}/prompting/images/tip_template.gif"/></TD>
  2216. <TD nowrap="nowrap" class="formText"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='repromptHintText']"/></TD>
  2217. </TR>
  2218. </TABLE></TD>
  2219. </TR>
  2220. <TR>
  2221. <TD colspan="2" height="10"><img alt="" height="10" width="5" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
  2222. </TR>
  2223. </TABLE>
  2224. </xsl:if>
  2225. </xsl:template>
  2226. <xsl:template name="renderDialogHeader">
  2227. <xsl:param name="action"/>
  2228. <xsl:param name="faultcode"/>
  2229. <xsl:param name="dialogTitle"/>
  2230. <xsl:param name="dialogTip"/>
  2231. <table width="100%" height="21" cellspacing="0" cellpadding="0" border="0" class="dialogHeader" role="presentation">
  2232. <tr>
  2233. <td valign="top" class="dialogHeaderTitle" width="100%" tabindex="0" nowrap="nowrap">
  2234. <xsl:value-of select="$dialogTitle"/>
  2235. </td>
  2236. <td align="right" valign="middle" style="padding-right:3px;">
  2237. <xsl:choose>
  2238. <xsl:when test="$action!=''">
  2239. <a onmouseover="window.status='';return true;" onmouseout="window.status='';return true;" href="#" onclick="{$action}">
  2240. <img height="14" width="14" vspace="2" border="0" class="dialogClose" onmouseover="this.className = 'dialogCloseOver'" onmouseout="this.className = 'dialogClose'" src="{$skin_folder}/prompting/images/close_16.svg" role="button">
  2241. <xsl:attribute name="title"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='buttonClose']"/></xsl:attribute>
  2242. <xsl:attribute name="alt"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='buttonClose']"/></xsl:attribute>
  2243. </img>
  2244. </a>
  2245. </xsl:when>
  2246. <xsl:otherwise><img alt="" height="10" width="1" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/></xsl:otherwise>
  2247. </xsl:choose>
  2248. </td>
  2249. </tr>
  2250. </table>
  2251. <table border="0" width="100%" cellspacing="0" cellpadding="0" style="padding-left:5px;margin-top:10px;" role="presentation">
  2252. <tr>
  2253. <td class="dialogHeaderText" tabindex="0" align="left">
  2254. <xsl:value-of select="$dialogTip"/>
  2255. </td>
  2256. </tr>
  2257. <xsl:if test="not (//selectDataSourceSignon[@faultcode='CQE-803' and (@faultSubcode!='1' or @faultSubcode='6')]) and not($faultcode = 'CQE-804') and not($faultcode = 'CQE-805') and not($faultcode = 'CQE-806')">
  2258. <tr>
  2259. <td class="dialogHeaderText" align="left">
  2260. <table border="0" cellpadding="0" cellspacing="0" role="presentation">
  2261. <tr>
  2262. <td height="20" width="1">
  2263. <img alt="" height="10" width="1" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
  2264. </td>
  2265. <td height="20" valign="middle">
  2266. <img alt="" height="10" width="4" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
  2267. <img alt="" src="{$skin_folder}/prompting/images/icon_required.gif" class="clsErrorRequired" align="bottom" height="10" width="10" border="0"/>
  2268. <img alt="" height="10" width="4" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
  2269. <span class="clsDialogIntroduction">
  2270. <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='requiredText']"/>
  2271. </span>
  2272. </td>
  2273. </tr>
  2274. <tr>
  2275. <td height="20" width="1">
  2276. <img alt="" height="10" width="1" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
  2277. </td>
  2278. <td height="20" valign="middle">
  2279. <img alt="" height="10" width="4" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
  2280. <img alt="" src="{$skin_folder}/prompting/images/error_timed_on.gif" class="clsErrorRequired" align="bottom" height="10" width="10" border="0"/>
  2281. <img alt="" height="10" width="4" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
  2282. <span class="clsDialogIntroduction">
  2283. <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='validationText']"/>
  2284. </span>
  2285. </td>
  2286. </tr>
  2287. </table>
  2288. </td>
  2289. </tr>
  2290. </xsl:if>
  2291. </table>
  2292. </xsl:template>
  2293. <!-- ********* Default Prompt Page Control ********* -->
  2294. <xsl:template name="getDefaultPromptControl">
  2295. <xsl:param name="promptLocale"/>
  2296. <xsl:param name="promptType"/>
  2297. <xsl:param name="promptCalculationName"/>
  2298. <xsl:param name="promptExpression"/>
  2299. <xsl:param name="promptOperator"/>
  2300. <xsl:param name="promptDataType"/>
  2301. <xsl:param name="promptColumnName"/>
  2302. <xsl:variable name="promptControl" select="./descendant::selectValue|./descendant::textBox|./descendant::textBox|./descendant::selectInterval|./descendant::selectDate|./descendant::selectDateTime|./descendant::selectTime|./descendant::selectWithTree|./descendant::selectWithSearch"/>
  2303. <xsl:choose>
  2304. <xsl:when test="$promptType='calculation'">
  2305. <table width="100%" role="presentation">
  2306. <tr>
  2307. <td class="clsFormLabel" nowrap="nowrap">
  2308. <xsl:value-of select="$promptCalculationName"/>
  2309. </td>
  2310. <td width="100%">
  2311. <hr size="1"/>
  2312. </td>
  2313. </tr>
  2314. </table>
  2315. <table role="presentation">
  2316. <tr>
  2317. <td class="clsFormLabel">
  2318. <xsl:value-of select="$promptExpression"/>:</td>
  2319. </tr>
  2320. </table>
  2321. <xsl:apply-templates select="*"/>
  2322. <table border="0" height="11" cellpadding="0" cellspacing="0" width="100%" role="presentation">
  2323. <tr>
  2324. <td colspan="2" height="10">
  2325. <img alt="" height="10" width="5" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
  2326. </td>
  2327. </tr>
  2328. </table>
  2329. </xsl:when>
  2330. <xsl:otherwise>
  2331. <xsl:variable name="operator">
  2332. <xsl:value-of select="$promptOperator"/>
  2333. </xsl:variable>
  2334. <xsl:variable name="dataType">
  2335. <xsl:value-of select="$promptDataType"/>
  2336. </xsl:variable>
  2337. <xsl:variable name="sLabelId">
  2338. <xsl:value-of select="concat('PRMT_LBL_', translate(generate-id($promptControl[1]), '.', 'x'), $CognosViewerID)"/>
  2339. </xsl:variable>
  2340. <table width="100%" role="presentation">
  2341. <tr>
  2342. <td class="clsFormLabel" nowrap="nowrap">
  2343. <label id="{$sLabelId}"><xsl:value-of select="$promptColumnName"/></label>
  2344. </td>
  2345. <td width="100%">
  2346. <!--<hr size="1"/>-->
  2347. </td>
  2348. </tr>
  2349. </table>
  2350. <table role="presentation">
  2351. <tr>
  2352. <td class="clsFormLabel">
  2353. <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id=$dataType]"/>
  2354. <xsl:text> </xsl:text></td>
  2355. </tr>
  2356. </table>
  2357. <xsl:apply-templates select="*"/>
  2358. <table border="0" height="11" cellpadding="0" cellspacing="0" width="100%" role="presentation">
  2359. <tr>
  2360. <td colspan="2" height="10">
  2361. <img alt="" height="10" width="5" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
  2362. </td>
  2363. </tr>
  2364. </table>
  2365. </xsl:otherwise>
  2366. </xsl:choose>
  2367. </xsl:template>
  2368. <!-- ********* Default Prompt Page Cascading Prompt Container ********* -->
  2369. <xsl:template name="getDefaultCascadingPrompt">
  2370. <xsl:param name="promptLocale"/>
  2371. <xsl:param name="promptColumnName"/>
  2372. <xsl:variable name="promptControl" select="./descendant::selectValue"/>
  2373. <xsl:variable name="sLabelId">
  2374. <xsl:value-of select="concat('PRMT_LBL_', translate(generate-id($promptControl[1]), '.', 'x'), $CognosViewerID)"/>
  2375. </xsl:variable>
  2376. <table role="presentation" width="100%">
  2377. <tr>
  2378. <td class="clsFormLabel">
  2379. <!-- xsl:value-of select="$promptColumnName"/ -->
  2380. <label id="{$sLabelId}"><xsl:value-of select="$promptColumnName"/></label>
  2381. </td>
  2382. <td width="100%"></td>
  2383. </tr>
  2384. </table>
  2385. <xsl:apply-templates select="*"/>
  2386. <table role="presentation" border="0" height="11" cellpadding="0" cellspacing="0" width="100%">
  2387. <tr>
  2388. <td colspan="2" height="10">
  2389. <img alt="" height="10" width="5" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
  2390. </td>
  2391. </tr>
  2392. </table>
  2393. </xsl:template>
  2394. <!-- ********* Default Prompt Page Cascading Prompt Control ********* -->
  2395. <xsl:template name="getDefaultCascadingPromptControl">
  2396. <xsl:param name="promptLocale"/>
  2397. <xsl:param name="promptColumnName"/>
  2398. <xsl:param name="promptOperator"/>
  2399. <xsl:variable name="operator">
  2400. <xsl:value-of select="$promptOperator"/>
  2401. </xsl:variable>
  2402. <table role="presentation">
  2403. <tr>
  2404. <td class="clsFormLabel">
  2405. <xsl:value-of select="$promptColumnName"/>
  2406. <xsl:text> </xsl:text>
  2407. <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id=$operator]"/>
  2408. </td>
  2409. </tr>
  2410. </table>
  2411. <xsl:apply-templates select="*"/>
  2412. <table role="presentation" border="0" height="11" cellpadding="0" cellspacing="0" width="100%">
  2413. <tr>
  2414. <td colspan="2" height="10"><img alt="" height="10" width="5" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2415. </tr>
  2416. </table>
  2417. </xsl:template>
  2418. <!-- ********* Default Prompt Page Footer ********* -->
  2419. <xsl:template name="getDefaultPromptFooter">
  2420. <xsl:param name="promptLocale"/>
  2421. <xsl:param name="promptBackURL"/>
  2422. <xsl:param name="promptClass"/>
  2423. <!-- determine the appropriate page title-->
  2424. <xsl:variable name="buttonType"><xsl:call-template name="getButtonType"/></xsl:variable>
  2425. <table border="0" cellpadding="1" cellspacing="0" class="fp" role="presentation">
  2426. <tr>
  2427. <td valign="middle">
  2428. <xsl:choose>
  2429. <xsl:when test="$buttonType='CLOSE'">
  2430. <table role="presentation" cellpadding="0" cellspacing="0" class="commandButton" onmouseover="this.className = 'commandButtonOver'" onmouseout="this.className = 'commandButton'" onmousedown="this.className = 'commandButtonDown'">
  2431. <tr>
  2432. <td width="5" height="1"><img alt="" height="1" width="5" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2433. <td><xsl:call-template name="getPromptButton">
  2434. <xsl:with-param name="promptDisplayValue"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='buttonClose']"/></xsl:with-param>
  2435. <xsl:with-param name="promptStyle"/>
  2436. <xsl:with-param name="promptType" select="'cancel'"/>
  2437. <xsl:with-param name="promptLocale" select="$promptLocale"/>
  2438. <xsl:with-param name="promptBackURL" select="$promptBackURL"/>
  2439. <xsl:with-param name="promptClass" select="$promptClass"/>
  2440. </xsl:call-template></td>
  2441. </tr>
  2442. </table>
  2443. </xsl:when>
  2444. <xsl:when test="$buttonType='WIZARD'">
  2445. <table border="0" cellpadding="0" cellspacing="0" role="presentation">
  2446. <tr>
  2447. <td width="5" height="1"><img alt="" height="1" width="5" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2448. <td><xsl:call-template name="getPromptButton">
  2449. <xsl:with-param name="promptStyle" />
  2450. <xsl:with-param name="promptType" select="'cancel'"/>
  2451. <xsl:with-param name="promptLocale" select="$promptLocale"/>
  2452. <xsl:with-param name="promptBackURL" select="$promptBackURL"/>
  2453. <xsl:with-param name="promptClass" select="$promptClass"/>
  2454. </xsl:call-template></td>
  2455. <td><xsl:call-template name="getPromptButton">
  2456. <xsl:with-param name="promptStyle" />
  2457. <xsl:with-param name="promptType" select="'back'"/>
  2458. <xsl:with-param name="promptLocale" select="$promptLocale"/>
  2459. <xsl:with-param name="promptBackURL"/>
  2460. <xsl:with-param name="promptClass" select="$promptClass"/>
  2461. </xsl:call-template></td>
  2462. <td><xsl:call-template name="getPromptButton">
  2463. <xsl:with-param name="promptStyle" />
  2464. <xsl:with-param name="promptType" select="'next'"/>
  2465. <xsl:with-param name="promptLocale" select="$promptLocale"/>
  2466. <xsl:with-param name="promptBackURL"/>
  2467. <xsl:with-param name="promptClass" select="$promptClass"/>
  2468. </xsl:call-template></td>
  2469. <td><xsl:call-template name="getPromptButton">
  2470. <xsl:with-param name="promptStyle" />
  2471. <xsl:with-param name="promptType" select="'finish'"/>
  2472. <xsl:with-param name="promptLocale" select="$promptLocale"/>
  2473. <xsl:with-param name="promptBackURL"/>
  2474. <xsl:with-param name="promptClass" select="$promptClass"/>
  2475. </xsl:call-template></td>
  2476. </tr>
  2477. </table>
  2478. </xsl:when>
  2479. <xsl:otherwise>
  2480. <xsl:variable name="OKpromptType"><xsl:call-template name="getOKButtonPromptType"/></xsl:variable>
  2481. <table border="0" cellpadding="0" cellspacing="0" role="presentation">
  2482. <tr>
  2483. <td width="5" height="1"><img alt="" height="1" width="5" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2484. <td><xsl:call-template name="getPromptButton">
  2485. <xsl:with-param name="promptDisplayValue"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='buttonOK']"/></xsl:with-param>
  2486. <xsl:with-param name="promptStyle" />
  2487. <xsl:with-param name="promptType" select="$OKpromptType"/>
  2488. <xsl:with-param name="promptLocale" select="$promptLocale"/>
  2489. <xsl:with-param name="promptBackURL"/>
  2490. <xsl:with-param name="promptClass" select="$promptClass"/>
  2491. </xsl:call-template></td>
  2492. <td><xsl:call-template name="getPromptButton">
  2493. <xsl:with-param name="promptDisplayValue"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='buttonCancel']"/></xsl:with-param>
  2494. <xsl:with-param name="promptStyle" />
  2495. <xsl:with-param name="promptType" select="'cancel'"/>
  2496. <xsl:with-param name="promptLocale" select="$promptLocale"/>
  2497. <xsl:with-param name="promptBackURL" select="$promptBackURL"/>
  2498. <xsl:with-param name="promptClass" select="$promptClass"/>
  2499. </xsl:call-template></td>
  2500. </tr>
  2501. </table>
  2502. </xsl:otherwise>
  2503. </xsl:choose>
  2504. </td>
  2505. <td width="100%">&#160;</td>
  2506. </tr>
  2507. </table>
  2508. </xsl:template>
  2509. <!--
  2510. ////////////////////////////////////////////////////////////////////////
  2511. // Data Source Signon Template
  2512. ///////////////////////////////////////////////////////////////////////
  2513. <selectDataSourceSignon parameter="credential:gosales" dataSourceName="gosales" faultcode="CQE-801" faultstring="QE-DEF-0283 Ambiguous connection" faultConnectionName="gosales" faultConnectionSearchPath="/content/.." faultSignonName="" faultSignonSearchPath="">
  2514. <connection name="gosales" searchPath="/content/..." selected="false">
  2515. <signon name="a1" searchPath="/content/..." selected="false"/>
  2516. <signon name="a2" searchPath="/content/..." selected="false"/>
  2517. </connection>
  2518. </selectDataSourceSignon>
  2519. Fault codes:
  2520. CQE-801: ambiguous connection
  2521. CQE-802: ambiguous signon
  2522. CQE-803: logon failure
  2523. Fault subcodes:
  2524. 1 - Missing or invalid userId/password.
  2525. 2 - Invalid connection string.
  2526. 3 - Invalid DSN(ODBC)/ServiceName, missing DSN, or host not accessible.
  2527. 4 - Unknown cause of logon failure.
  2528. 6 - Wrong password for a protected cube (password only, no login name).
  2529. -->
  2530. <xsl:template name="getSelectDataSourceSignon">
  2531. <xsl:param name="promptLocale" />
  2532. <xsl:param name="promptParameter" />
  2533. <xsl:param name="promptConnectionName" />
  2534. <xsl:param name="promptSearchPath" />
  2535. <xsl:param name="promptFaultCode" />
  2536. <xsl:variable name="sPromptId"><xsl:value-of select="translate(generate-id(), '.', 'x')"/><xsl:value-of select="$CognosViewerID"/></xsl:variable>
  2537. <xsl:variable name="sFormId">
  2538. <xsl:choose>
  2539. <xsl:when test="$promptFormName !=''">"<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="concat($promptFormName, $CognosViewerID)"/></xsl:call-template>"</xsl:when>
  2540. <xsl:otherwise>0</xsl:otherwise>
  2541. </xsl:choose>
  2542. </xsl:variable>
  2543. <xsl:variable name="htmlForm">document.forms[<xsl:value-of select="$sFormId"/>]</xsl:variable>
  2544. <xsl:variable name="submitElementName">p_<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$promptParameter"/></xsl:call-template></xsl:variable>
  2545. <!--- Needed to pass to CSelectDataSourceSignon to ensure enterkeypress does the same thing as the Pages default OK Button onClick -->
  2546. <xsl:variable name="okButtonPromptTypeIsNext"><xsl:call-template name="isOKButtonPromptTypeNext"/></xsl:variable>
  2547. <script language="javascript" type="text/javascript">
  2548. addHiddenInputHTML(<xsl:value-of select="$sFormId"/>, "<xsl:value-of select="$submitElementName"/>", "");
  2549. // <xsl:value-of select="@faultcode"/>
  2550. </script>
  2551. <!-- determine the type of fault -->
  2552. <xsl:choose>
  2553. <xsl:when test="@faultcode='CQE-801'">
  2554. <!-- Add the dialog header when is not a prompt header -->
  2555. <xsl:if test="@defaultPromptHeader!='true'">
  2556. <xsl:variable name="dialogTitle">
  2557. <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_SELECT_CONNECTION_TITLE']"/>
  2558. </xsl:variable>
  2559. <xsl:variable name="dialogTip">
  2560. <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_SELECT_CONNECTION_TIP']"/>
  2561. </xsl:variable>
  2562. <!-- add default css file -->
  2563. <xsl:variable name="theSkin">
  2564. <xsl:choose>
  2565. <xsl:when test="$skin!='true'">
  2566. <xsl:value-of select="$skin"/>
  2567. </xsl:when>
  2568. <xsl:otherwise>corporate</xsl:otherwise>
  2569. </xsl:choose>
  2570. </xsl:variable>
  2571. <link href="{$webcontentRootURI}/skins/{$theSkin}/portal/default.css" type="text/css" rel="stylesheet"/>
  2572. <link href="{$webcontentRootURI}/schemas/GlobalReportStyles.css" type="text/css" rel="stylesheet"/>
  2573. <table class="pp" style="height:auto;" role="presentation"><tbody><tr><td>
  2574. <xsl:call-template name="renderDialogHeader">
  2575. <xsl:with-param name="action" select="''"/>
  2576. <xsl:with-param name="faultcode" select="$promptFaultCode"/>
  2577. <xsl:with-param name="dialogTitle" select="$dialogTitle"/>
  2578. <xsl:with-param name="dialogTip" select="$dialogTip"/>
  2579. </xsl:call-template>
  2580. </td></tr></tbody></table>
  2581. </xsl:if>
  2582. <input type="hidden" name="oDataSourceConnection{$sPromptId}" value=""/>
  2583. <input type="hidden" name="oDataSourceSignon{$sPromptId}" value=""/>
  2584. <input type="hidden" name="oUseSignonDefault{$sPromptId}" value="true"/>
  2585. <table cellpadding="0" cellspacing="0" border="0" role="presentation">
  2586. <tr>
  2587. <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2588. <td class="clsFormLabel"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_DATA_SOURCE']"/></td>
  2589. </tr>
  2590. <tr>
  2591. <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2592. <td class="clsReadOnlyText"><xsl:value-of select="@dataSourceName"/></td>
  2593. </tr>
  2594. </table>
  2595. <table cellpadding="0" cellspacing="0" border="0" role="presentation">
  2596. <tr>
  2597. <td height="10" valign="top"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2598. <td height="10" valign="top"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2599. </tr>
  2600. <tr>
  2601. <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2602. <td class="clsFormLabel"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_CONNECTIONS']"/></td>
  2603. </tr>
  2604. </table>
  2605. <TABLE width="100%" cellspacing="0" cellpadding="1" border="0" role="presentation">
  2606. <TR>
  2607. <TD width="1" valign="top"><BR/><IMG width="1" height="4" src="{$skin_folder}/prompting/images/spacer.gif"/><BR/></TD>
  2608. <td width="10" valign="top">
  2609. <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="10" height="20">
  2610. <tr><td>
  2611. <img src="{$skin_folder}/prompting/images/icon_required.gif" class="clsErrorRequired" align="top" height="10" width="10" border="0"/>
  2612. </td></tr>
  2613. <tr><td>
  2614. <img id="imgTest{$sPromptId}" name="imgTest{$sPromptId}" class="clsErrorRequired" src="{$skin_folder}/prompting/images/error_timed_small_off.gif" align="bottom" height="10" width="10" border="0"/>
  2615. </td></tr>
  2616. </table>
  2617. </td>
  2618. <TD colspan="2" width="100%" valign="top" rowspan="2"><TABLE role="presentation" cellspacing="0" cellpadding="2" border="0" width="100%" class="clsTableOutlineIE">
  2619. <TR class="clsTableHeader">
  2620. <TD class="clsTableTitle" valign="center" height="10" width="16" nowrap="nowrap"><xsl:text> </xsl:text></TD>
  2621. <TD width="1" height="15">
  2622. <TABLE role="presentation" border="0" cellspacing="0" cellpadding="0">
  2623. <TR>
  2624. <TD class="clsTableOutline3"><IMG width="1" height="15" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
  2625. </TR>
  2626. </TABLE>
  2627. </TD>
  2628. <TD class="clsTableTitle" valign="center" height="10" width="20" nowrap="nowrap"><xsl:text> </xsl:text></TD>
  2629. <TD width="1" height="15"><TABLE role="presentation" border="0" cellspacing="0" cellpadding="0">
  2630. <TR>
  2631. <TD class="clsTableOutline3"><IMG width="1" height="15" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
  2632. </TR>
  2633. </TABLE></TD>
  2634. <TD class="clsTableTitle" valign="center" height="10" width="50%" nowrap="nowrap"><TABLE role="presentation" cellspacing="0" cellpadding="0" border="0">
  2635. <TR>
  2636. <TD valign="top" class="clsTableTitle" nowrap="nowrap"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_CONNECTION_NAME']"/></TD>
  2637. </TR>
  2638. </TABLE></TD>
  2639. </TR>
  2640. <xsl:for-each select="connection">
  2641. <xsl:variable name="attr_name" select="@name[last()]"/>
  2642. <xsl:variable name="attr_selected" select="@selected[last()]"/>
  2643. <xsl:variable name="attr_searchPath" select="@searchPath[last()]"/>
  2644. <TR>
  2645. <TD class="clsTableText" height="10" nowrap="nowrap">
  2646. <INPUT type="radio" value="{$attr_searchPath}" name="frmcon{$sPromptId}">
  2647. <xsl:if test="$attr_selected='true'"><xsl:attribute name="checked"/></xsl:if>
  2648. <xsl:attribute name="onclick">selectDataSourceSignon<xsl:value-of select="$sPromptId"/>.setDataSourceConnection(this.value);selectDataSourceSignon<xsl:value-of select="$sPromptId"/>.checkData()</xsl:attribute>
  2649. </INPUT>
  2650. </TD>
  2651. <TD width="1" height="15"><IMG width="1" height="15" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
  2652. <TD class="clsTableText" height="10" nowrap="nowrap"><IMG width="16" height="16" alt="" src="{$skin_folder}/prompting/images/icon_data_source_connection.gif"/></TD>
  2653. <TD width="1" height="15"><IMG width="1" height="15" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
  2654. <TD class="clsTableText" height="10" width="100%" nowrap="nowrap"><xsl:value-of select="$attr_name"/></TD>
  2655. </TR>
  2656. </xsl:for-each>
  2657. </TABLE></TD>
  2658. <TD width="1" valign="top"><BR/><IMG width="1" height="4" src="{$skin_folder}/prompting/images/spacer.gif"/><BR/></TD>
  2659. </TR>
  2660. </TABLE>
  2661. <script language="javascript" type="text/javascript">
  2662. var selectDataSourceSignon<xsl:value-of select="$sPromptId"/> = new CSelectDataSourceSignon(<xsl:value-of select="$htmlForm"/>.elements["oDataSourceConnection<xsl:value-of select="$sPromptId"/>"], <xsl:value-of select="$htmlForm"/>.elements["oDataSourceSignon<xsl:value-of select="$sPromptId"/>"], null, null,<xsl:value-of select="$htmlForm"/>.elements["<xsl:value-of select="$submitElementName"/>"], <xsl:value-of select="$htmlForm"/>.elements["oUseSignonDefault<xsl:value-of select="$sPromptId"/>"], '<xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="true()"/><xsl:with-param name="str" select="$promptSubmitType"/></xsl:call-template>', <xsl:value-of select="$htmlForm"/>.elements["frmcon<xsl:value-of select="$sPromptId"/>"], document.getElementById("imgTest<xsl:value-of select="$sPromptId"/>"), null, "<xsl:value-of select="$CognosViewerID"/>", <xsl:value-of select="$okButtonPromptTypeIsNext"/>);
  2663. <xsl:value-of select="$CVObject"/>preProcessControlArray = <xsl:value-of select="$CVObject"/>preProcessControlArray.concat("selectDataSourceSignon<xsl:value-of select="$sPromptId"/>");
  2664. <xsl:for-each select="connection">
  2665. <xsl:if test="@selected='true'">
  2666. selectDataSourceSignon<xsl:value-of select="$sPromptId"/>.setDataSourceConnection("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="@searchPath"/></xsl:call-template>");
  2667. </xsl:if>
  2668. </xsl:for-each>
  2669. </script>
  2670. </xsl:when>
  2671. <xsl:when test="@faultcode='CQE-802'">
  2672. <input type="hidden" name="oDataSourceConnection{$sPromptId}" value="{@faultConnectionSearchPath}"/>
  2673. <input type="hidden" name="oDataSourceSignon{$sPromptId}" value=""/>
  2674. <input type="hidden" name="oUseSignonDefault{$sPromptId}" value="true"/>
  2675. <table cellpadding="0" cellspacing="0" border="0" role="presentation">
  2676. <tr>
  2677. <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2678. <td class="clsFormLabel"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_DATA_SOURCE']"/></td>
  2679. </tr>
  2680. <tr>
  2681. <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2682. <td class="clsReadOnlyText"><xsl:value-of select="@dataSourceName"/></td>
  2683. </tr>
  2684. </table>
  2685. <table cellpadding="0" cellspacing="0" border="0" role="presentation">
  2686. <tr>
  2687. <td height="10" valign="top"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2688. <td height="10" valign="top"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2689. </tr>
  2690. <tr>
  2691. <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2692. <td class="clsFormLabel"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_CONNECTION']"/></td>
  2693. </tr>
  2694. <tr>
  2695. <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2696. <td class="clsReadOnlyText"><xsl:value-of select="@faultConnectionName"/></td>
  2697. </tr>
  2698. </table>
  2699. <table cellpadding="0" cellspacing="0" border="0" role="presentation">
  2700. <tr>
  2701. <td height="10" valign="top"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2702. <td height="10" valign="top"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2703. </tr>
  2704. <tr>
  2705. <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2706. <td class="clsFormLabel"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='RADIO_SELECT_SIGNON']"/></td>
  2707. </tr>
  2708. </table>
  2709. <TABLE role="presentation" width="100%" cellspacing="0" cellpadding="1" border="0">
  2710. <TR>
  2711. <TD width="10" valign="top"><IMG width="10" height="4" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
  2712. <td width="10" valign="top">
  2713. <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="10" height="20">
  2714. <tr><td>
  2715. <img src="{$skin_folder}/prompting/images/icon_required.gif" class="clsErrorRequired" align="top" height="10" width="10" border="0"/>
  2716. </td></tr>
  2717. <tr><td>
  2718. <img id="imgTest{$sPromptId}" name="imgTest{$sPromptId}" class="clsErrorRequired" src="{$skin_folder}/prompting/images/error_timed_small_off.gif" align="bottom" height="10" width="10" border="0"/>
  2719. </td></tr>
  2720. </table>
  2721. </td>
  2722. <TD colspan="2" width="100%" valign="top" rowspan="2"><TABLE role="presentation" cellspacing="0" cellpadding="2" border="0" width="100%" class="clsTableOutlineIE">
  2723. <TR class="clsTableHeader">
  2724. <TD class="clsTableTitle" valign="center" height="10" width="16" nowrap="nowrap"><xsl:text> </xsl:text></TD>
  2725. <TD width="1" height="15">
  2726. <TABLE role="presentation" border="0" cellspacing="0" cellpadding="0">
  2727. <TR>
  2728. <TD class="clsTableOutline3"><IMG width="1" height="15" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
  2729. </TR>
  2730. </TABLE>
  2731. </TD>
  2732. <TD class="clsTableTitle" valign="center" height="10" width="20" nowrap="nowrap"><xsl:text> </xsl:text></TD>
  2733. <TD width="1" height="15"><TABLE role="presentation" border="0" cellspacing="0" cellpadding="0">
  2734. <TR>
  2735. <TD class="clsTableOutline3"><IMG width="1" height="15" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
  2736. </TR>
  2737. </TABLE></TD>
  2738. <TD class="clsTableTitle" valign="center" height="10" width="50%" nowrap="nowrap"><TABLE role="presentation" cellspacing="0" cellpadding="0" border="0">
  2739. <TR>
  2740. <TD valign="top" class="clsTableTitle" nowrap="nowrap"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_SIGNON_NAME']"/></TD>
  2741. </TR>
  2742. </TABLE></TD>
  2743. </TR>
  2744. <xsl:for-each select="connection/signon[ancestor::connection/@searchPath = ancestor::selectDataSourceSignon/@faultConnectionSearchPath]">
  2745. <xsl:variable name="attr_name" select="@name[last()]"/>
  2746. <xsl:variable name="attr_searchPath" select="@searchPath[last()]"/>
  2747. <xsl:variable name="attr_selected" select="@selected[last()]"/>
  2748. <TR>
  2749. <TD class="clsTableText" height="10" nowrap="nowrap">
  2750. <INPUT type="radio" value="{$attr_searchPath}" name="frmsig{$sPromptId}">
  2751. <xsl:if test="$attr_selected='true'"><xsl:attribute name="checked"/></xsl:if>
  2752. <xsl:attribute name="onclick">selectDataSourceSignon<xsl:value-of select="$sPromptId"/>.setDataSourceSignon(this.value);selectDataSourceSignon<xsl:value-of select="$sPromptId"/>.checkData();</xsl:attribute>
  2753. </INPUT>
  2754. </TD>
  2755. <TD width="1" height="15"><IMG width="1" height="15" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
  2756. <TD class="clsTableText" height="10" nowrap="nowrap"><IMG width="16" height="16" alt="" src="{$skin_folder}/prompting/images/icon_signon.gif"/></TD>
  2757. <TD width="1" height="15"><IMG width="1" height="15" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
  2758. <TD class="clsTableText" height="10" width="100%" nowrap="nowrap"><xsl:value-of select="$attr_name"/></TD>
  2759. </TR>
  2760. </xsl:for-each>
  2761. </TABLE></TD>
  2762. <TD width="1" valign="top"><BR/><IMG width="1" height="4" src="{$skin_folder}/prompting/images/spacer.gif"/><BR/></TD>
  2763. </TR>
  2764. </TABLE>
  2765. <script language="javascript" type="text/javascript">
  2766. var selectDataSourceSignon<xsl:value-of select="$sPromptId"/> = new CSelectDataSourceSignon(<xsl:value-of select="$htmlForm"/>.elements["oDataSourceConnection<xsl:value-of select="$sPromptId"/>"], <xsl:value-of select="$htmlForm"/>.elements["oDataSourceSignon<xsl:value-of select="$sPromptId"/>"], null, null, <xsl:value-of select="$htmlForm"/>.elements["<xsl:value-of select="$submitElementName"/>"], <xsl:value-of select="$htmlForm"/>.elements["oUseSignonDefault<xsl:value-of select="$sPromptId"/>"], '<xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="true()"/><xsl:with-param name="str" select="$promptSubmitType"/></xsl:call-template>', <xsl:value-of select="$htmlForm"/>.elements["frmsig<xsl:value-of select="$sPromptId"/>"], document.getElementById("imgTest<xsl:value-of select="$sPromptId"/>"), null, "<xsl:value-of select="$CognosViewerID"/>", <xsl:value-of select="$okButtonPromptTypeIsNext"/>);
  2767. <xsl:value-of select="$CVObject"/>preProcessControlArray = <xsl:value-of select="$CVObject"/>preProcessControlArray.concat("selectDataSourceSignon<xsl:value-of select="$sPromptId"/>");
  2768. <xsl:for-each select="connection/signon[ancestor::connection/@searchPath = ancestor::selectDataSourceSignon/@faultConnectionSearchPath]">
  2769. <xsl:if test="@selected='true'">
  2770. selectDataSourceSignon<xsl:value-of select="$sPromptId"/>.setDataSourceSignon("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="@searchPath"/></xsl:call-template>");
  2771. </xsl:if>
  2772. </xsl:for-each>
  2773. </script>
  2774. </xsl:when>
  2775. <xsl:when test="@faultcode='CQE-803' and (@faultSubcode='1' or @faultSubcode='6')">
  2776. <xsl:if test="number(@logonFailureCount) &gt; 2">
  2777. <table role="presentation" cellpadding="0" cellspacing="0" border="0">
  2778. <tr>
  2779. <td height="1" valign="top" width="5"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2780. <td class="clsReadOnlyText"><img alt="" height="13" width="13" border="0" src="{$skin_folder}/prompting/images/icon_critical.gif"/><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_DATA_ERROR_TEST_CONNECTION']"/></td>
  2781. </tr>
  2782. </table>
  2783. </xsl:if>
  2784. <input type="hidden" name="oDataSourceConnection{$sPromptId}" value="{@faultConnectionSearchPath}"/>
  2785. <input type="hidden" name="oDataSourceSignon{$sPromptId}" value=""/>
  2786. <input type="hidden" name="oUseSignonDefault{$sPromptId}" value="false"/>
  2787. <table cellpadding="0" cellspacing="0" border="0" role="presentation">
  2788. <tr>
  2789. <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2790. <td class="clsFormLabel"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_DATA_SOURCE']"/></td>
  2791. </tr>
  2792. <tr>
  2793. <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2794. <td class="clsReadOnlyText"><xsl:value-of select="@dataSourceName"/></td>
  2795. </tr>
  2796. </table>
  2797. <table role="presentation" cellpadding="0" cellspacing="0" border="0">
  2798. <tr>
  2799. <td height="1" valign="top" width="10"><IMG width="10" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2800. <td><table role="presentation" cellpadding="0" cellspacing="0" border="0">
  2801. <tr><td height="10" valign="top" width="10"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td></tr>
  2802. <xsl:if test="@faultSubcode!='6'">
  2803. <tr><td class="clsFormLabel"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_USER_ID']"/></td></tr>
  2804. <tr><td class="clsFormLabel"><input type="text" name="oUsername{$sPromptId}" value="" size="30"/></td></tr>
  2805. <tr><td height="5"><IMG width="1" height="5" src="{$skin_folder}/prompting/images/spacer.gif"/></td></tr>
  2806. </xsl:if>
  2807. <tr><td class="clsFormLabel"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_PASSWORD']"/></td></tr>
  2808. <tr><td class="clsFormLabel">
  2809. <input type="password" autocomplete="off" name="o{$sPromptId}Password" value="" size="30"/>
  2810. <xsl:if test="@faultSubcode='6'">
  2811. <input type="hidden" name="oUsername{$sPromptId}" value=""/>
  2812. </xsl:if>
  2813. </td></tr>
  2814. <xsl:if test="@persistPrompt and @persistPrompt='true'">
  2815. <tr><td class="clsReadOnlyText" style="white-space: nowrap;">
  2816. <input type="checkbox" id="oPersist{$sPromptId}" name="oPersist{$sPromptId}" />
  2817. <label for="oPersist{$sPromptId}">
  2818. <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_PERSIST']"/>
  2819. </label>
  2820. <input type="hidden" id="oConnectionName{$sPromptId}" name="oConnectionName{$sPromptId}" value="{@faultConnectionName}"/>
  2821. </td></tr>
  2822. </xsl:if>
  2823. <tr><td height="10"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td></tr>
  2824. </table></td>
  2825. </tr>
  2826. </table>
  2827. <script language="javascript" type="text/javascript">
  2828. var selectDataSourceSignon<xsl:value-of select="$sPromptId"/> = new CSelectDataSourceSignon(<xsl:value-of select="$htmlForm"/>.elements["oDataSourceConnection<xsl:value-of select="$sPromptId"/>"], <xsl:value-of select="$htmlForm"/>.elements["oDataSourceSignon<xsl:value-of select="$sPromptId"/>"], <xsl:value-of select="$htmlForm"/>.elements["oUsername<xsl:value-of select="$sPromptId"/>"], <xsl:value-of select="$htmlForm"/>.elements["o<xsl:value-of select="$sPromptId"/>Password"], <xsl:value-of select="$htmlForm"/>.elements["<xsl:value-of select="$submitElementName"/>"], <xsl:value-of select="$htmlForm"/>.elements["oUseSignonDefault<xsl:value-of select="$sPromptId"/>"], '<xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="true()"/><xsl:with-param name="str" select="$promptSubmitType"/></xsl:call-template>', null, null, <xsl:choose><xsl:when test="@faultSubcode='6'">true</xsl:when><xsl:otherwise>null</xsl:otherwise></xsl:choose>, "<xsl:value-of select="$CognosViewerID"/>", "<xsl:value-of select="$sPromptId"/>", <xsl:value-of select="$okButtonPromptTypeIsNext"/>);
  2829. <xsl:value-of select="$CVObject"/>preProcessControlArray = <xsl:value-of select="$CVObject"/>preProcessControlArray.concat("selectDataSourceSignon<xsl:value-of select="$sPromptId"/>");
  2830. </script>
  2831. </xsl:when>
  2832. <xsl:when test="@faultcode='CQE-803' and (@faultSubcode='2' or @faultSubcode='3' or @faultSubcode='4' or @faultSubcode='5' or @faultSubcode='99')">
  2833. <table role="presentation" cellpadding="0" cellspacing="0" border="0">
  2834. <tr>
  2835. <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2836. <td class="clsReadOnlyText"><table role="presentation" cellpadding="0" cellspacing="0" border="0">
  2837. <tr>
  2838. <td rowspan="3" valign="top"><img alt="" height="13" width="13" border="0" src="{$skin_folder}/prompting/images/icon_critical.gif" align="top"/><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif" align="top"/></td>
  2839. <td class="clsReadOnlyText"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_DATA_ERROR_TEST_CONNECTION_PROBLEM']"/></td>
  2840. </tr>
  2841. <tr>
  2842. <td class="clsReadOnlyText"><xsl:value-of select="@faultSubstring"/></td>
  2843. </tr>
  2844. <tr>
  2845. <td class="clsReadOnlyText"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_DATA_ERROR_TEST_CONNECTION_TRY_AGAIN']"/></td>
  2846. </tr>
  2847. </table></td>
  2848. </tr>
  2849. <tr>
  2850. <td colspan="2"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2851. </tr>
  2852. </table>
  2853. </xsl:when>
  2854. <xsl:otherwise>
  2855. <input type="hidden" name="oDataSourceConnection{$sPromptId}" value="{@faultConnectionSearchPath}"/>
  2856. <input type="hidden" name="oDataSourceSignon{$sPromptId}" value="{@faultSignonSearchPath}"/>
  2857. <input type="hidden" name="oUseSignonDefault{$sPromptId}" value="false"/>
  2858. <input type="hidden" name="oUsername{$sPromptId}" value=""/>
  2859. <input type="hidden" name="o{$sPromptId}Password" value=""/>
  2860. <table role="presentation" cellpadding="0" cellspacing="0" border="0">
  2861. <tr>
  2862. <td height="10" valign="top" width="10"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2863. <td height="10" valign="top"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2864. </tr>
  2865. <tr>
  2866. <td height="10" valign="top" width="10"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2867. <td valign="top" class="clsReadOnlyText"><img alt="" height="13" width="13" border="0" src="{$skin_folder}/prompting/images/icon_critical.gif"/><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/>
  2868. <xsl:value-of select="@faultstring"/></td>
  2869. </tr>
  2870. <tr>
  2871. <td height="10" valign="top" width="10"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2872. <td height="10" valign="top"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
  2873. </tr>
  2874. </table>
  2875. <script language="javascript" type="text/javascript">
  2876. var selectDataSourceSignon<xsl:value-of select="$sPromptId"/> = new CSelectDataSourceSignon(null, null, null, null, <xsl:value-of select="$htmlForm"/>.elements["<xsl:value-of select="$submitElementName"/>"], <xsl:value-of select="$htmlForm"/>.elements["oUseSignonDefault<xsl:value-of select="$sPromptId"/>"], '<xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="true()"/><xsl:with-param name="str" select="$promptSubmitType"/></xsl:call-template>', null, null, null, "<xsl:value-of select="$CognosViewerID"/>", <xsl:value-of select="$okButtonPromptTypeIsNext"/>);
  2877. <xsl:value-of select="$CVObject"/>preProcessControlArray = <xsl:value-of select="$CVObject"/>preProcessControlArray.concat("selectDataSourceSignon<xsl:value-of select="$sPromptId"/>");
  2878. </script>
  2879. </xsl:otherwise>
  2880. </xsl:choose>
  2881. </xsl:template>
  2882. <xsl:template name="stringProp">
  2883. <xsl:param name="name"/>
  2884. <xsl:param name="value"/>
  2885. <xsl:param name="isMore" select="true()"/>
  2886. <xsl:value-of select="$name"/>
  2887. <xsl:text>:"</xsl:text>
  2888. <xsl:call-template name="convertQuotes">
  2889. <xsl:with-param name="str" select="$value"/>
  2890. </xsl:call-template>
  2891. <xsl:text>"</xsl:text>
  2892. <xsl:if test="$isMore">
  2893. <xsl:text>,</xsl:text>
  2894. </xsl:if>
  2895. </xsl:template>
  2896. <xsl:template name="boolProp">
  2897. <xsl:param name="name"/>
  2898. <xsl:param name="value"/>
  2899. <xsl:param name="default" select="'false'"/>
  2900. <xsl:variable name="valueLowerCase" select="translate($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/>
  2901. <xsl:value-of select="$name"/>:<xsl:choose>
  2902. <xsl:when test="$valueLowerCase='true'">true</xsl:when>
  2903. <xsl:when test="$valueLowerCase='false'">false</xsl:when>
  2904. <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
  2905. </xsl:choose>
  2906. <xsl:text>,</xsl:text>
  2907. </xsl:template>
  2908. </xsl:stylesheet>