preferences.xslt 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2015
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <xsl:stylesheet version="1.0"
  13. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  14. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  15. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  16. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  17. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  18. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  19. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  20. xmlns:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
  21. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  22. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  23. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  24. xmlns:out="dummy-uri"
  25. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  26. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  27. xmlns:rdb="http://developer.cognos.com/schemas/xts/rdb">
  28. <xsl:output method="xml" encoding="UTF-8" indent="no"/>
  29. <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
  30. <xsl:template match="rdb:preferences">
  31. <script language="javascript">
  32. var MSG_ERR_VALUE = "<xts:string id="IDS_ERR_INVALID_MIN_MAX" encode="javascript"/>";
  33. var bResetCustomPages = ("<out:value-of select="xtsext:javascriptencode(string(key('env-param', 'reset_mypage')))"/>" == "true");
  34. <![CDATA[
  35. function init()
  36. {
  37. if ( document.pform.m_select_productLocale && document.pform.m_productLocale)
  38. {
  39. if(document.pform.m_select_productLocale[0].checked)
  40. deSelectPref('productLocale');
  41. }
  42. if ( document.pform.m_select_contentLocale && document.pform.m_contentLocale)
  43. {
  44. if(document.pform.m_select_contentLocale[0].checked)
  45. deSelectPref('contentLocale');
  46. }
  47. if ( document.pform.m_select_locale && document.pform.m_locale)
  48. {
  49. if(document.pform.m_select_locale[0].checked)
  50. document.pform.m_locale.disabled=true;
  51. }
  52. if ( document.pform.m_select_timeZoneID && document.pform.m_timeZoneID)
  53. {
  54. if(document.pform.m_select_timeZoneID[0].checked)
  55. document.pform.m_timeZoneID.disabled=true;
  56. }
  57. if(window.doHomeTab && (bResetCustomPages || (document.pform.m_pp_home[document.pform.m_pp_home.selectedIndex].value == 'welcome') && document.pform.wTab.checked))
  58. doHomeTab(document.pform.m_pp_home[document.pform.m_pp_home.selectedIndex].value);
  59. disabledEnabledBTD();
  60. }
  61. function switchproductLocale()
  62. {
  63. if ( document.pform.m_select_productLocale)
  64. document.pform.m_select_productLocale[1].checked = true;
  65. document.pform.m_p_productLocale.value = document.pform.m_productLocale[document.pform.m_productLocale.selectedIndex].value;
  66. document.pform.changed_m_p_productLocale.value='1';
  67. }
  68. function switchcontentLocale()
  69. {
  70. if ( document.pform.m_select_contentLocale )
  71. document.pform.m_select_contentLocale[1].checked = true;
  72. document.pform.m_p_contentLocale.value = document.pform.m_contentLocale[document.pform.m_contentLocale.selectedIndex].value;
  73. document.pform.changed_m_p_contentLocale.value='1';
  74. }
  75. function switchlocale()
  76. {
  77. if ( document.pform.m_select_locale )
  78. document.pform.m_select_locale[1].checked = true;
  79. document.pform.m_p_locale.value = document.pform.m_locale[document.pform.m_locale.selectedIndex].value;
  80. document.pform.changed_m_p_locale.value='1';
  81. }
  82. function switchTimeZoneID()
  83. {
  84. if ( document.pform.m_select_timeZoneID )
  85. document.pform.m_select_timeZoneID[1].checked = true;
  86. document.pform.m_p_timeZoneID.value = document.pform.m_timeZoneID[document.pform.m_timeZoneID.selectedIndex].value;
  87. document.pform.changed_m_p_timeZoneID.value='1';
  88. }
  89. function disabledEnabledBTD()
  90. {
  91. if(document.pform.bidiEnabledOption.checked){
  92. document.pform.m_bidi_biDirectionalFeaturesEnabled.value ='true';
  93. document.pform.m_bidi_baseTextDirectionOptionEnum.disabled = false;
  94. }else{
  95. document.pform.m_bidi_biDirectionalFeaturesEnabled.value='false';
  96. document.pform.m_bidi_baseTextDirectionOptionEnum.disabled = true;
  97. }
  98. }
  99. function validate()
  100. {
  101. validateLocales();
  102. if (document.pform.m_po_linesPerPage)
  103. {
  104. var s = document.pform.m_po_linesPerPage.value;
  105. var x = s.toString();
  106. if(x.length > 3)
  107. {
  108. alert(MSG_ERR_VALUE);
  109. document.pform.m_po_linesPerPage.focus();
  110. return false;
  111. }
  112. // Look for a non-empty and a numbers-only entry ...
  113. if (s.length != 0 && s.match(/\D+/) == null)
  114. {
  115. // Look for "zero" entry
  116. var i = parseInt(s,10);
  117. if ( i == 0 )
  118. {
  119. alert(MSG_ERR_VALUE);
  120. document.pform.m_po_linesPerPage.focus();
  121. return false;
  122. }
  123. else // Just make sure there are no leading zeros ..
  124. {
  125. if (s.charAt(0) == "0" && s.charAt(1) == "0")
  126. document.pform.m_po_linesPerPage.value = s.substring(2,3);
  127. else if (s.charAt(0) == "0")
  128. document.pform.m_po_linesPerPage.value = s.substring(1,3);
  129. }
  130. if (i > 999)
  131. {
  132. alert(MSG_ERR_VALUE);
  133. document.pform.m_po_linesPerPage.focus();
  134. return false;
  135. }
  136. }
  137. else
  138. {
  139. alert(MSG_ERR_VALUE);
  140. document.pform.m_po_linesPerPage.focus();
  141. return false;
  142. }
  143. }
  144. return true;
  145. }
  146. //-- Activates the productLocale, contentLocale and timeZoneID dropdowns when the corresponding radio button control is selected.
  147. function selectPref(objName)
  148. {
  149. var oPrefControl = document.pform.elements["m_" + objName];
  150. if (oPrefControl[oPrefControl.selectedIndex])
  151. {
  152. document.pform.elements["m_p_" + objName].value = oPrefControl[oPrefControl.selectedIndex].value;
  153. setChanged('changed_m_p_' + objName);
  154. }
  155. oPrefControl.disabled = false;
  156. }
  157. //-- Deactivates the productLocale, contentLocale and timeZoneID dropdowns when the corresponding radio button control is selected.
  158. function deSelectPref(objName)
  159. {
  160. document.pform.elements["m_p_" + objName].value = '';
  161. if(document.pform.elements["m_"+objName])
  162. {
  163. document.pform.elements["m_" + objName].disabled = true;
  164. setChanged('changed_m_p_' + objName);
  165. }
  166. }
  167. function setChanged(objName)
  168. {
  169. document.pform.elements[objName].value = '1';
  170. }
  171. ]]>
  172. function preview()
  173. {
  174. document.pform.p_style_back.value = "<out:value-of select="$app"/>/<out:value-of select="$mname"/>";
  175. document.pform.ps_nav_op.value = "maintain";
  176. document.pform.m.value = "<out:value-of select="$app"/>/preview_style.xts";
  177. document.pform.submit();
  178. }
  179. function processModalCommand(sAction)
  180. {
  181. <!-- Set the right call back target -->
  182. var callBackTarget = <out:value-of select="$callBackTargetJSVar"/>;
  183. if( callBackTarget )
  184. {
  185. callBackTarget.<out:value-of select="$callBackFunctionName"/>(sAction, null);
  186. }
  187. }
  188. function validateLocales() {
  189. <!--
  190. Kludge: This is to get around an issue in CM where the user's locales in the authentication source (e.g.: LDAP)
  191. are NOT being taken into account when CM updates the locales.
  192. Here we detect that if the locales are defaulted and that user has not changed it (in the Prefs page), we will not
  193. send default locale to CM.
  194. Note: This change does not cover all issues. For example, when user is switching from a selected locale
  195. to use the default, CM will recompute and update the CRN cookie with locales from the user's browser and/or the server.
  196. The user's locale setting in the authentication source is NOT taken into account!
  197. -->
  198. var productLocaleAcquired = '<out:value-of select="string($the-object/cm:productLocale/@nil) = 'true' or $the-object/cm:productLocale/@acquired = 'true'"/>';
  199. if (productLocaleAcquired == 'true' &amp;&amp; document.pform.m_p_productLocale.value == '') {
  200. document.pform.changed_m_p_productLocale.value='0';
  201. }
  202. var contentLocaleAcquired = '<out:value-of select="string($the-object/cm:contentLocale/@nil) = 'true' or $the-object/cm:contentLocale/@acquired = 'true'"/>';
  203. if (contentLocaleAcquired == 'true' &amp;&amp; document.pform.m_p_contentLocale.value == '') {
  204. document.pform.changed_m_p_contentLocale.value='0';
  205. }
  206. }
  207. </script>
  208. <xsl:if test="@mode='properties'">
  209. <!-- is the current user editing his account object? -->
  210. <out:variable name="editSelf">
  211. <out:value-of select="string($the-object/cm:searchPath) = string($self/cm:searchPath)"/>
  212. </out:variable>
  213. </xsl:if>
  214. <!-- Test to exclude options for particular browsers; The tests are slightly different in the property page -->
  215. <xsl:variable name="excludeSafari">
  216. <xsl:text>($browser != 'safari'</xsl:text>
  217. <xsl:if test="@mode='properties'">
  218. <xsl:text> or not($editSelf)</xsl:text>
  219. </xsl:if>
  220. <xsl:text>)</xsl:text>
  221. </xsl:variable>
  222. <out:variable name="userTemplate" select="key('env-param','m_class')='account' and starts-with(/root/env/param[@name='m_obj'],'/configuration/account')"/>
  223. <xsl:variable name="ieOnly">
  224. <xsl:text>($browser = 'ie'</xsl:text>
  225. <xsl:if test="@mode='properties'">
  226. <xsl:text>or not($editSelf)</xsl:text>
  227. </xsl:if>
  228. <xsl:text>)</xsl:text>
  229. </xsl:variable>
  230. <out:variable name="serverTZID" select="/root/config/param[@name='timezone']/timezone[@type = 'serverTimeZone']/id"/>
  231. <out:variable name="defaultValues">
  232. <out:choose>
  233. <!-- read-only anonymous users editing their own preferences in the preferences page get the defaults from the cookie -->
  234. <out:when test="not(contains($the-object/cm:permissions,'write')) and $is-named ='0' and '{@mode}' = 'preferences'">
  235. <out:copy-of select="/root/user/param[@name != 'skin' and @name != 'http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures']"/>
  236. <param name="skin">storeID("<out:value-of select="$skin-objects/cm:portalSkin[cm:resourceLocation=key('user-param', 'skin')]/cm:storeID"/>")</param>
  237. <param name="accessibilityFeatures"><out:value-of select="/root/user/param[@name='http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures']"/></param>
  238. </out:when>
  239. <!--all other modes gets the defaults from the object (ie profile or account ) -->
  240. <out:otherwise>
  241. <out:variable name="object-options" select="$the-object/options/value/item[./name != 'skin' and ./name != 'http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures']"/>
  242. <!--organize the data as in the above case so that access to the defaultValues variable is uniformed -->
  243. <out:for-each select="$object-options">
  244. <param><out:attribute name="name"><out:value-of select="./name"/></out:attribute><out:copy-of select="./value"/></param>
  245. </out:for-each>
  246. <!-- if Bidi options are not the object, get the default from the user preferences in the bus header -->
  247. <out:for-each select="/root/user/param[contains(@name, 'http://developer.cognos.com/ceba/constants/biDirectionalOptionEnum')]">
  248. <out:variable name="name" select="@name"/>
  249. <out:if test="not($object-options[name = $name])">
  250. <out:copy-of select="."/>
  251. </out:if>
  252. </out:for-each>
  253. <param name="accessibilityFeatures">
  254. <out:choose>
  255. <out:when test="$the-object/options/value/item[./name = 'http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures']/value != ''">
  256. <out:value-of select="$the-object/options/value/item[./name = 'http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures']/value"/>
  257. </out:when>
  258. <out:when test="/root/configuration/property[@name='serviceDefaultOptions']/*/value/item[./name='http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures']/value != ''">
  259. <out:value-of select="/root/configuration/property[@name='serviceDefaultOptions']/*/value/item[./name='http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures']/value"/>
  260. </out:when>
  261. </out:choose>
  262. </param>
  263. <param name="skin">storeID("<out:value-of select="string($resolved-skin-object/cm:portalSkin/cm:storeID)"/>")</param>
  264. <!-- for the account object....the the format, timezone, product and content locale are stored seprately so we need to get those too -->
  265. <param name="format">
  266. <out:choose>
  267. <out:when test="$the-object/cm:format != 'XLS' or ($XLSenabled and {$ieOnly})">
  268. <out:value-of select="$the-object/cm:format"/>
  269. </out:when>
  270. <out:otherwise>
  271. <out:value-of select="'singleXLS'"/>
  272. </out:otherwise>
  273. </out:choose>
  274. </param>
  275. <param name="timeZoneID">
  276. <out:choose>
  277. <out:when test="string($the-object/cm:timeZoneID) = ''"><out:value-of select="$serverTZID"/></out:when>
  278. <out:otherwise><out:copy-of select="$the-object/cm:timeZoneID"/></out:otherwise>
  279. </out:choose>
  280. </param>
  281. <param name="productLocale"><out:copy-of select="$the-object/cm:productLocale"/></param>
  282. <param name="contentLocale"><out:copy-of select="$the-object/cm:contentLocale"/></param>
  283. </out:otherwise>
  284. </out:choose>
  285. </out:variable>
  286. <out:variable name="enteriesInListView">
  287. <!-- Lines : -->
  288. <dp:input>
  289. <dp:section1 id="id_m_po_linesPerPage_label">
  290. <xts:string id="IDS_PERS_TAB_GENERAL_LINES"/>
  291. </dp:section1>
  292. <dp:section2>
  293. <utml:input type="text" name="m_po_linesPerPage" size="3" maxlength="3" aria-labelledby="id_m_po_linesPerPage_label">
  294. <utml:value>
  295. <out:value-of select="$defaultValues/param[@name='linesPerPage']"/>
  296. </utml:value>
  297. </utml:input>
  298. </dp:section2>
  299. </dp:input>
  300. </out:variable>
  301. <out:variable name="listViewSeparator">
  302. <dp:input>
  303. <dp:section1 id="id_m_po_listViewSeparator_label">
  304. <xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS"/>
  305. </dp:section1>
  306. <dp:section2>
  307. <utml:select name="m_po_listViewSeparator" aria-labelledby="id_m_po_listViewSeparator_label">
  308. <utml:default-value>
  309. <out:value-of select="$defaultValues/param[@name='listViewSeparator']"/>
  310. </utml:default-value>
  311. <utml:option value="line"><xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS_OPTION_GL"/> </utml:option>
  312. <utml:option value="background"><xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS_OPTION_AB"/> </utml:option>
  313. <utml:option value="none"><xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS_OPTION_NS"/> </utml:option>
  314. </utml:select>
  315. </dp:section2>
  316. </dp:input>
  317. </out:variable>
  318. <out:variable name="skin">
  319. <!-- Skins -->
  320. <utml:input type="hidden" name="p_style_back" value=""/>
  321. <dp:input>
  322. <dp:section1 id="id_m_po_skin_label">
  323. <xts:string id="IDS_PERS_TAB_GENERAL_SKIN"/>
  324. </dp:section1>
  325. <dp:section2>
  326. <utml:select name="m_po_skin" aria-labelledby="id_m_po_skin_label">
  327. <out:if test="$productLocale != $contentLocale">
  328. <out:attribute name="lang">
  329. <out:value-of select="$contentLocale"/>
  330. </out:attribute>
  331. </out:if>
  332. <utml:default-value><out:value-of select="$defaultValues/param[@name='skin']"/></utml:default-value>
  333. <out:for-each select="$skin-objects/*">
  334. <out:if test="cm:published='' or cm:published='true' or $hasPATCapability">
  335. <out:variable name="currentSkinID"><out:value-of select="cm:storeID"/></out:variable>
  336. <utml:option>
  337. <utml:value>storeID("<out:value-of select="$currentSkinID"/>")</utml:value>
  338. <out:value-of select="cm:defaultName"/>
  339. </utml:option>
  340. </out:if>
  341. </out:for-each>
  342. </utml:select>
  343. <img height="1" width="10">
  344. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  345. </img>
  346. <!-- do not show the preview link for readonly named users as links do not show very nicely in readonly forms. Additionally do not show the link if there
  347. are no skins in the list-->
  348. <out:if test="(not($isNamedAccountReadOnly) and (count($skin-objects/*) &gt; 0))">
  349. <a href="javascript:preview()" ><xts:string id="IDS_PERS_TAB_GENERAL_SKIN_PREVIEW"/></a>
  350. </out:if>
  351. </dp:section2>
  352. </dp:input>
  353. </out:variable>
  354. <out:variable name="userHome">
  355. <!-- home is only shown if in properties or profile mode -->
  356. <xsl:if test="@mode='properties' or @mode='profile'">
  357. <out:variable name="homePage" select="$defaultValues/param[@name='homePage']"/>
  358. <out:variable name="defaultCCHome" select="/root/system/param[@name= 'CCHome']"/>
  359. <out:variable name="defaultMMHome" select="/root/system/param[@name = 'CMMHome']"/>
  360. <out:variable name="defaultPlanningHome" select="/root/system/param[@name = 'PlanningHome']"/>
  361. <dp:input>
  362. <dp:section1 id="id_m_po_homePage_label">
  363. <out:text/><xts:string id="IDS_HOME_SELECTION"/>
  364. </dp:section1>
  365. <dp:section2>
  366. <utml:select name="m_po_homePage" aria-labelledby="id_m_po_homePage_label">
  367. <utml:default-value>
  368. <out:value-of select="$homePage"/>
  369. </utml:default-value>
  370. <out:if test="$homePage and $homePage != '' and $homePage != $defaultCCHome and $homePage != $defaultMMHome and $homePage != $defaultPlanningHome">
  371. <utml:option>
  372. <utml:value><out:value-of select="$homePage"/></utml:value>
  373. <xts:string id="IDS_HOME_SELECTION_MAINTAIN"/>
  374. </utml:option>
  375. </out:if>
  376. <utml:option>
  377. <utml:value><out:value-of select="$defaultCCHome"/></utml:value>
  378. <xts:string id="IDS_PORTAL"/>
  379. </utml:option>
  380. <out:if test="/root/cm:queryResponse/cm:queryReply[4]//cm:componentID[cm:value='metricsManagerService'] != '' or /root/cm:queryResponse/cm:queryReply[4]//cm:componentID[cm:value='metricsManagerPortal'] != ''">
  381. <utml:option >
  382. <utml:value><out:value-of select="$defaultMMHome"/></utml:value>
  383. <xts:string id="IDS_METRICSMANAGER"/>
  384. </utml:option>
  385. </out:if>
  386. <out:if test="/root/cm:queryResponse/cm:queryReply[4]//cm:componentID[cm:value='planningService'] != ''">
  387. <utml:option >
  388. <utml:value><out:value-of select="$defaultPlanningHome"/></utml:value>
  389. <xts:string id="IDS_PLANNING"/>
  390. </utml:option>
  391. </out:if>
  392. </utml:select>
  393. </dp:section2>
  394. </dp:input>
  395. </xsl:if>
  396. </out:variable>
  397. <out:variable name="format">
  398. <xsl:if test="not(@mode='properties' or @mode='profile')">
  399. <out:if test="(not($userCanGeneratePDFOutput) or
  400. not($userCanGenerateCSVOutput) or
  401. not($userCanGenerateXMLOutput) or
  402. not($userCanGenerateXLSOutput))">
  403. <script language="javascript">
  404. function displayMessage(formatId) {
  405. var userCanGeneratePDFOutput = <out:value-of select="$userCanGeneratePDFOutput"/>;
  406. var userCanGenerateCSVOutput = <out:value-of select="$userCanGenerateCSVOutput"/>;
  407. var userCanGenerateXMLOutput = <out:value-of select="$userCanGenerateXMLOutput"/>;
  408. var userCanGenerateXLSOutput = <out:value-of select="$userCanGenerateXLSOutput"/>;
  409. <![CDATA[
  410. var display = (!userCanGeneratePDFOutput && (formatId == "PDF")) ||
  411. (!userCanGenerateCSVOutput && (formatId == "CSV")) ||
  412. (!userCanGenerateXMLOutput && (formatId == "XML")) ||
  413. (!userCanGenerateXLSOutput && ((formatId == "XLS") || (formatId == "XLWA") ||
  414. (formatId == "singleXLS") || (formatId == "spreadsheetML") || (formatId == "xlsxData") ||
  415. (formatId == "spreadsheetMLOfficeConnectionEnabled")))
  416. if (display == true) {
  417. document.getElementById("IDS_PROP_FORMAT_VIEW_ONLY").style.display="inline"
  418. }
  419. else {
  420. document.getElementById("IDS_PROP_FORMAT_VIEW_ONLY").style.display="none"
  421. }
  422. ]]>
  423. }
  424. </script>
  425. </out:if>
  426. </xsl:if>
  427. <dp:input>
  428. <dp:section1 id="id_m_p_format_label">
  429. <xts:string id="IDS_PERS_TAB_GENERAL_FORMAT"/>
  430. </dp:section1>
  431. <dp:section2>
  432. <utml:select name="m_p_format" aria-labelledby="id_m_p_format_label">
  433. <out:attribute name="onchange">displayMessage(this.value);</out:attribute>
  434. <utml:default-value>
  435. <out:value-of select="$defaultValues/param[@name='format']"/>
  436. </utml:default-value>
  437. <out:for-each select="key('system-param', 'reportFormats')/format[not(contains(@browserHide, $browser)) and contains(@appMode, 'basic') and (not(@cafaction) or xtsext:cafaction('get_configsignedreporturls', '') != 'true')]">
  438. <xsl:choose>
  439. <xsl:when test="not(@mode='properties' or @mode='profile')">
  440. <out:choose>
  441. <out:when test="(current()/@id = 'PDF' and not($userCanGeneratePDFOutput)) or
  442. (current()/@id = 'CSV' and not($userCanGenerateCSVOutput)) or
  443. (current()/@id = 'XML' and not($userCanGenerateXMLOutput)) or
  444. ((current()/@id = 'XLS' or
  445. current()/@id = 'XLWA' or
  446. current()/@id = 'singleXLS' or
  447. current()/@id = 'spreadsheetML' or
  448. current()/@id = 'xlsxData' or
  449. current()/@id = 'spreadsheetMLOfficeConnectionEnabled') and not($userCanGenerateXLSOutput))">
  450. <utml:option>
  451. <out:attribute name="aria-labelledby">IDS_PROP_FORMAT_VIEW_ONLY</out:attribute>
  452. <utml:value><out:value-of select="@id"/></utml:value>
  453. <out:value-of select="$formatNameLookUp/formats/format[@id = concat(current()/@id, '_RO')]"/>
  454. </utml:option>
  455. </out:when>
  456. <out:otherwise>
  457. <utml:option>
  458. <utml:value><out:value-of select="@id"/></utml:value>
  459. <out:value-of select="$formatNameLookUp/formats/format[@id = current()/@id]"/>
  460. </utml:option>
  461. </out:otherwise>
  462. </out:choose>
  463. </xsl:when>
  464. <xsl:otherwise>
  465. <utml:option>
  466. <utml:value><out:value-of select="@id"/></utml:value>
  467. <out:value-of select="$formatNameLookUp/formats/format[@id = current()/@id]"/>
  468. </utml:option>
  469. </xsl:otherwise>
  470. </xsl:choose>
  471. </out:for-each>
  472. </utml:select>
  473. </dp:section2>
  474. </dp:input>
  475. <xsl:if test="not(@mode='properties' or @mode='profile')">
  476. <out:if test="(not($userCanGeneratePDFOutput) or
  477. not($userCanGenerateCSVOutput) or
  478. not($userCanGenerateXMLOutput) or
  479. not($userCanGenerateXLSOutput))">
  480. <div id="IDS_PROP_FORMAT_VIEW_ONLY" class="formText" style="font-size:60%; position:relative;">
  481. <out:variable name="defaultSelection"><out:value-of select="$defaultValues/param[@name='format']"/> </out:variable>
  482. <out:if test="not(($defaultSelection = 'PDF' and not($userCanGeneratePDFOutput)) or
  483. ($defaultSelection = 'CSV' and not($userCanGenerateCSVOutput)) or
  484. ($defaultSelection = 'XML' and not($userCanGenerateXMLOutput)) or
  485. (($defaultSelection = 'XLS' or
  486. $defaultSelection = 'XLWA' or
  487. $defaultSelection = 'singleXLS' or
  488. $defaultSelection = 'spreadsheetML' or
  489. $defaultSelection = 'xlsxData' or
  490. $defaultSelection = 'spreadsheetMLOfficeConnectionEnabled') and not($userCanGenerateXLSOutput)))">
  491. <out:attribute name="style">font-size:60%; position:relative; display:none;</out:attribute>
  492. </out:if>
  493. <xts:string id="IDS_PROP_FORMAT_VIEW_ONLY"/>
  494. </div>
  495. </out:if>
  496. </xsl:if>
  497. </out:variable>
  498. <out:variable name="bidiOptions">
  499. <out:variable name="default-bidi-value">
  500. <out:choose>
  501. <out:when test="key('env-param', 'm_bidi_biDirectionalFeaturesEnabled')">
  502. <out:value-of select="key('env-param', 'm_bidi_biDirectionalFeaturesEnabled')" />
  503. </out:when>
  504. <out:otherwise>
  505. <out:value-of select="$defaultValues/param[@name='http://developer.cognos.com/ceba/constants/biDirectionalOptionEnum#biDirectionalFeaturesEnabled']" />
  506. </out:otherwise>
  507. </out:choose>
  508. </out:variable>
  509. <dp:input>
  510. <dp:section1 />
  511. <dp:section2>
  512. <table border="0" cellpadding="0" cellspacing="0" role="presentation">
  513. <tr>
  514. <td>
  515. <utml:input type="hidden" name="m_bidi_biDirectionalFeaturesEnabled">
  516. <utml:value>
  517. <out:value-of select="$default-bidi-value" />
  518. </utml:value>
  519. </utml:input>
  520. <utml:input type="checkbox" id="bidiEnabledOption_id" name="bidiEnabledOption" utml:default-condition="$default-bidi-value='true'" value="true" onclick="disabledEnabledBTD();">
  521. <utml:default-value>
  522. <out:value-of select="$default-bidi-value" />
  523. </utml:default-value>
  524. </utml:input>
  525. </td>
  526. <td class="formText" nowrap="nowrap">
  527. <label for="bidiEnabledOption_id">
  528. <out:text><xts:string id="IDS_PERS_TAB_GENERAL_BIDI_ENAB" /></out:text>
  529. </label>
  530. </td>
  531. </tr>
  532. <tr style="padding-top:10px">
  533. <td>
  534. <img height="1" width="10">
  535. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'" />/images/space.gif</xsl:attribute>
  536. </img>
  537. </td>
  538. <td>
  539. <table border="0" cellpadding="0" cellspacing="0" role="presentation">
  540. <tr>
  541. <td>
  542. <dp:input>
  543. <dp:section1>
  544. <label for="label_m_bidi_baseTextDirectionOptionEnum"><xts:string id="IDS_PERS_TAB_GENERAL_BIDI_BTD" /></label>
  545. </dp:section1>
  546. <dp:section2>
  547. <utml:select name="m_bidi_baseTextDirectionOptionEnum" id="label_m_bidi_baseTextDirectionOptionEnum">
  548. <utml:default-value>
  549. <out:value-of select="$defaultValues/param[@name='http://developer.cognos.com/ceba/constants/biDirectionalOptionEnum#baseTextDirection']" />
  550. </utml:default-value>
  551. <utml:option value="http://developer.cognos.com/ceba/constants/baseTextDirectionEnum#LTR"><xts:string id="IDS_PROP_BTD_LTR" /></utml:option>
  552. <utml:option value="http://developer.cognos.com/ceba/constants/baseTextDirectionEnum#RTL"><xts:string id="IDS_PROP_BTD_RTL" /></utml:option>
  553. <utml:option value="http://developer.cognos.com/ceba/constants/baseTextDirectionEnum#Auto"><xts:string id="IDS_PROP_BTD_AUTO" /></utml:option>
  554. </utml:select>
  555. </dp:section2>
  556. </dp:input>
  557. </td>
  558. </tr>
  559. </table>
  560. </td>
  561. </tr>
  562. </table>
  563. </dp:section2>
  564. </dp:input>
  565. </out:variable>
  566. <out:variable name="showWelcomePage">
  567. <out:variable name="default-value">
  568. <out:choose>
  569. <out:when test="key('env-param', 'm_po_showWelcomePage')">
  570. <out:value-of select="key('env-param', 'm_po_showWelcomePage')"/>
  571. </out:when>
  572. <out:otherwise>
  573. <out:value-of select="$defaultValues/param[@name='showWelcomePage']"/>
  574. </out:otherwise>
  575. </out:choose>
  576. </out:variable>
  577. <dp:input>
  578. <dp:section1/>
  579. <dp:section2>
  580. <utml:input type="hidden" name="m_po_showWelcomePage">
  581. <utml:value>
  582. <out:value-of select="$default-value"/>
  583. </utml:value>
  584. </utml:input>
  585. <utml:input type="checkbox" id="show_welcome_page_checkbox" name="show_welcome_page" utml:default-condition="$default-value='true'" value="true" onclick="if(checked) document.pform.m_po_showWelcomePage.value='true';else document.pform.m_po_showWelcomePage.value='false';">
  586. <utml:default-value>
  587. <out:value-of select="$default-value"/>
  588. </utml:default-value>
  589. </utml:input>
  590. <label for="show_welcome_page_checkbox"><out:text><xts:string id="IDS_PERS_TAB_GENERAL_SHOW_WEL"/></out:text></label>
  591. </dp:section2>
  592. </dp:input>
  593. </out:variable>
  594. <out:variable name="showHidden">
  595. <out:if test="$userCanUseShowHiddenObjectsPreferenceCapability = 'true'">
  596. <out:variable name="default-value">
  597. <out:choose>
  598. <out:when test="key('env-param', 'm_po_showHiddenObjects')">
  599. <out:value-of select="key('env-param', 'm_po_showHiddenObjects')"/>
  600. </out:when>
  601. <out:otherwise>
  602. <out:value-of select="$defaultValues/param[@name='showHiddenObjects']"/>
  603. </out:otherwise>
  604. </out:choose>
  605. </out:variable>
  606. <dp:input>
  607. <dp:section1/>
  608. <dp:section2>
  609. <utml:input type="hidden" name="m_po_showHiddenObjects">
  610. <utml:value>
  611. <out:value-of select="$default-value"/>
  612. </utml:value>
  613. </utml:input>
  614. <utml:input type="checkbox" id="id_show_hidden_objects_check" name="show_hidden_objects" utml:default-condition="$default-value='true'" value="true" onclick="if(checked) document.pform.m_po_showHiddenObjects.value='true';else document.pform.m_po_showHiddenObjects.value='false';">
  615. <utml:default-value>
  616. <out:value-of select="$default-value"/>
  617. </utml:default-value>
  618. </utml:input>
  619. <label for="id_show_hidden_objects_check"><out:text><xts:string id="IDS_PERS_TAB_GENERAL_SHOW_HIDDEN"/></out:text></label>
  620. </dp:section2>
  621. </dp:input>
  622. </out:if>
  623. </out:variable>
  624. <out:variable name="showRunOptionsSummary">
  625. <out:variable name="default-value">
  626. <out:choose>
  627. <out:when test="key('env-param', 'm_po_showOptionSummary')">
  628. <out:value-of select="key('env-param', 'm_po_showOptionSummary')"/>
  629. </out:when>
  630. <out:otherwise>
  631. <out:value-of select="$defaultValues/param[@name='showOptionSummary']"/>
  632. </out:otherwise>
  633. </out:choose>
  634. </out:variable>
  635. <dp:input>
  636. <dp:section1/>
  637. <dp:section2>
  638. <utml:input type="hidden" name="m_po_showOptionSummary">
  639. <utml:value>
  640. <out:value-of select="$default-value"/>
  641. </utml:value>
  642. </utml:input>
  643. <utml:input type="checkbox" id="id_runoptions_check" name="runoptions" utml:default-condition="$default-value='true'" value="true" onclick="if(checked) document.pform.m_po_showOptionSummary.value='true';else document.pform.m_po_showOptionSummary.value='false';">
  644. <utml:default-value>
  645. <out:value-of select="$default-value"/>
  646. </utml:default-value>
  647. </utml:input>
  648. <label for="id_runoptions_check"><out:text><xts:string id="IDS_PERS_TAB_GENERAL_RUNOPTIONS"/></out:text></label>
  649. </dp:section2>
  650. </dp:input>
  651. </out:variable>
  652. <out:variable name="enableAccessibilityForReports">
  653. <out:variable name="default-value">
  654. <out:choose>
  655. <out:when test="key('env-param', 'm_go_accessibilityFeatures')">
  656. <out:value-of select="key('env-param', 'm_go_accessibilityFeatures')"/>
  657. </out:when>
  658. <out:otherwise>
  659. <out:value-of select="$defaultValues/param[@name='accessibilityFeatures']"/>
  660. </out:otherwise>
  661. </out:choose>
  662. </out:variable>
  663. <dp:input>
  664. <dp:section1/>
  665. <dp:section2>
  666. <utml:input type="hidden" name="m_go_accessibilityFeatures">
  667. <utml:value>
  668. <out:value-of select="$default-value"/>
  669. </utml:value>
  670. </utml:input>
  671. <utml:input type="checkbox" id="id_accessibility_features_check" name="accessibility_features" utml:default-condition="$default-value='true'" value="true" onclick="if(checked) document.pform.m_go_accessibilityFeatures.value='true';else document.pform.m_go_accessibilityFeatures.value='false';">
  672. <utml:default-value>
  673. <out:value-of select="$default-value"/>
  674. </utml:default-value>
  675. </utml:input>
  676. <label for="id_accessibility_features_check"><out:text><xts:string id="IDS_PERS_TAB_GENERAL_ACCESSIBILITY"/></out:text></label>
  677. </dp:section2>
  678. </dp:input>
  679. </out:variable>
  680. <out:variable name="defaultView">
  681. <utml:radio-group name="m_po_displayMode">
  682. <utml:default-value>
  683. <out:value-of select="$defaultValues/param[@name='displayMode']"/>
  684. </utml:default-value>
  685. <dp:choice title="IDS_PERS_TAB_GENERAL_VIEW" id="ids_pers_tab_general_view">
  686. <dp:section1>
  687. <utml:input type="radio" name="m_po_displayMode" value="list" aria-labelledby="ids_pers_tab_general_view_list_label"/>
  688. </dp:section1>
  689. <dp:section2 type='label' id='ids_pers_tab_general_view_list_label'>
  690. <xts:string id="IDS_PERS_TAB_GENERAL_VIEW_LIST"/>
  691. </dp:section2>
  692. <dp:section1>
  693. <utml:input type="radio" name="m_po_displayMode" value="detail" aria-labelledby="ids_pers_tab_general_view_details_label"/>
  694. </dp:section1>
  695. <dp:section2 type='label' id="ids_pers_tab_general_view_details_label">
  696. <xts:string id="IDS_PERS_TAB_GENERAL_VIEW_DETAILS"/>
  697. </dp:section2>
  698. </dp:choice>
  699. </utml:radio-group>
  700. </out:variable>
  701. <out:variable name="columnsInDetailView">
  702. <out:if test="string(/root/configProps/param[@name='cc.nav']/property[@name='portal.navigationView']) = 'newspaper'">
  703. <dp:input>
  704. <dp:section1 id="id_m_po_columnsPerPage_label">
  705. <xts:string id="IDS_PERS_TAB_GENERAL_COLUMNS"/>
  706. </dp:section1>
  707. <dp:section2>
  708. <utml:select name="m_po_columnsPerPage" aria-labelledby="id_m_po_columnsPerPage_label">
  709. <utml:default-value>
  710. <out:value-of select="$defaultValues/param[@name='columnsPerPage']"/>
  711. </utml:default-value>
  712. <utml:option value="2"><xts:string id="IDS_PERS_TAB_GENERAL_COLUMNS_SELECT"><xts:param name="columnNumber"><out:value-of select="'2'"/></xts:param></xts:string></utml:option>
  713. <utml:option value="3"><xts:string id="IDS_PERS_TAB_GENERAL_COLUMNS_SELECT"><xts:param name="columnNumber"><out:value-of select="'3'"/></xts:param></xts:string></utml:option>
  714. <utml:option value="4"><xts:string id="IDS_PERS_TAB_GENERAL_COLUMNS_SELECT"><xts:param name="columnNumber"><out:value-of select="'4'"/></xts:param></xts:string></utml:option>
  715. <utml:option value="5"><xts:string id="IDS_PERS_TAB_GENERAL_COLUMNS_SELECT"><xts:param name="columnNumber"><out:value-of select="'5'"/></xts:param></xts:string></utml:option>
  716. </utml:select>
  717. </dp:section2>
  718. </dp:input>
  719. </out:if>
  720. </out:variable>
  721. <!-- <out:variable name="accesssibilityFeatures">
  722. <dp:input>
  723. <dp:section1>
  724. <xts:string id="IDS_PERS_TAB_GENERAL_ACCESSIBILITY"/>
  725. </dp:section1>
  726. <dp:section2>
  727. <out:variable name="uaf" select="/root/cm:queryResponse/cm:queryReply/cm:account/cm:useAccessibilityFeatures"/>
  728. <utml:input type="hidden" name="m_p_useAccessibilityFeatures">
  729. <utml:value>
  730. <out:choose>
  731. <out:when test="key('env-param', 'm_p_useAccessibilityFeatures')">
  732. <out:value-of select="key('env-param', 'm_p_useAccessibilityFeatures')"/>
  733. </out:when>
  734. <out:otherwise>
  735. <out:value-of select="$uaf"/>
  736. </out:otherwise>
  737. </out:choose>
  738. </utml:value>
  739. </utml:input>
  740. <utml:input type="checkbox" name="use_access" value="true" onclick="document.pform.m_p_useAccessibilityFeatures.value=this.checked;">
  741. <out:choose>
  742. <out:when test="key('env-param', 'm_p_useAccessibilityFeatures')">
  743. <out:if test="key('env-param', 'm_p_useAccessibilityFeatures')='true'">
  744. <out:attribute name="checked">checked</out:attribute>
  745. </out:if>
  746. </out:when>
  747. <out:when test="string($uaf) = 'true'">
  748. <out:attribute name="checked">checked</out:attribute>
  749. </out:when>
  750. </out:choose>
  751. <utml:default-value>
  752. <out:choose>
  753. <out:when test="key('env-param', 'm_p_useAccessibilityFeatures')">
  754. <out:value-of select="key('env-param', 'm_p_useAccessibilityFeatures')"/>
  755. </out:when>
  756. <out:otherwise>
  757. <out:value-of select="$uaf"/>
  758. </out:otherwise>
  759. </out:choose>
  760. </utml:default-value>
  761. </utml:input>
  762. <xts:string id="IDS_PERS_TAB_GENERAL_ACCESSIBILITY_USE"/>
  763. </dp:section2>
  764. </dp:input>
  765. </out:variable> -->
  766. <!-- Store the content local selection drop-down control in a variable -->
  767. <out:variable name="TZSelectionControl">
  768. <utml:select size="1" name="m_timeZoneID" onchange="switchTimeZoneID();" aria-labelledby="IDS_PERS_LOCALE_TIMEZONE_FOLLOWING_label">
  769. <utml:default-value><out:value-of select="$defaultValues/param[@name='timeZoneID']"/></utml:default-value>
  770. <out:choose>
  771. <out:when test="/root/config/param[@name='timezone']/timezone[string(@type)='']">
  772. <out:for-each select="/root/config/param[@name='timezone']/timezone[string(@type)='']">
  773. <utml:option>
  774. <utml:value><out:value-of select="id"/></utml:value>
  775. <out:value-of select="displayName"/>
  776. </utml:option>
  777. </out:for-each>
  778. </out:when>
  779. <out:otherwise>
  780. <utml:option>
  781. <utml:value></utml:value>
  782. <xts:string id="IDS_PERS_TAB_DEFAULT_SELECT_ENTRY"/>
  783. </utml:option>
  784. </out:otherwise>
  785. </out:choose>
  786. </utml:select>
  787. </out:variable>
  788. <out:variable name="serverTimeZoneSelect">
  789. <out:choose>
  790. <out:when test="$is-named = '1' or key('env-param','m_class')='contact'">
  791. <utml:radio-group name="m_select_timeZoneID">
  792. <utml:default-value>
  793. <out:choose>
  794. <out:when test="string($the-object/cm:timeZoneID/@nil) = 'true' or $the-object/cm:timeZoneID/@acquired = 'true'">
  795. <out:value-of select="'default'"/>
  796. </out:when>
  797. <out:otherwise>
  798. <out:value-of select="'select'"/>
  799. </out:otherwise>
  800. </out:choose>
  801. </utml:default-value>
  802. <dp:choice title="IDS_PERS_LOCALE_TIMEZONE" id="IDS_PERS_LOCALE_TIMEZONE">
  803. <out:choose>
  804. <out:when test="/root/config/param[@name='timezone']/timezone[string(@type)='']">
  805. <dp:section1>
  806. <utml:input type="radio" value="default" onclick="deSelectPref('timeZoneID')" aria-labelledby="timzeonselectDefault"/>
  807. </dp:section1>
  808. <dp:section2 id="timzeonselectDefault">
  809. <xts:string id="IDS_PERS_LOCALE_TIMEZONE_DEFAULT"/>
  810. </dp:section2>
  811. <dp:section1>
  812. <utml:input type="radio" value="select" onclick="selectPref('timeZoneID')" aria-labelledby="IDS_PERS_LOCALE_TIMEZONE_FOLLOWING_label"/>
  813. </dp:section1>
  814. <dp:section2 id="IDS_PERS_LOCALE_TIMEZONE_FOLLOWING_label" >
  815. <xts:string id="IDS_PERS_LOCALE_TIMEZONE_FOLLOWING"/>
  816. </dp:section2>
  817. <dp:section3>
  818. <out:copy-of select="$TZSelectionControl"/>
  819. </dp:section3>
  820. </out:when>
  821. <out:otherwise>
  822. <dp:section1><dp:text nospace="true">&#160;</dp:text></dp:section1>
  823. <dp:section2 id="ids_pers_locale_timezone_label">
  824. <xts:string id="IDS_PERS_LOCALE_TIMEZONE_DEFAULT"/>
  825. </dp:section2>
  826. </out:otherwise>
  827. </out:choose>
  828. </dp:choice>
  829. </utml:radio-group>
  830. </out:when>
  831. <out:otherwise>
  832. <dp:input>
  833. <dp:section1 id="ids_pers_locale_timezone_label">
  834. <xts:string id="IDS_PERS_LOCALE_TIMEZONE"/>
  835. </dp:section1>
  836. <dp:section2>
  837. <out:copy-of select="$TZSelectionControl"/>
  838. </dp:section2>
  839. </dp:input>
  840. </out:otherwise>
  841. </out:choose>
  842. </out:variable>
  843. <out:variable name="timeZoneInputs">
  844. <utml:input name="changed_m_p_timeZoneID" type="hidden" utml:update="true" value="0"/>
  845. <utml:input name="m_p_timeZoneID" type="hidden">
  846. <utml:value>
  847. <out:choose>
  848. <out:when test="(string($the-object/cm:timeZoneID/@nil) != 'true') and not(/root/env/param[@name = 'm_p_timeZoneID'])"><out:value-of select="''"/></out:when>
  849. <out:otherwise><out:value-of select="$defaultValues/param[@name='timeZoneID']"/></out:otherwise>
  850. </out:choose>
  851. </utml:value>
  852. </utml:input>
  853. </out:variable>
  854. <!-- Start body layout -->
  855. <out:choose>
  856. <out:when test="$the-object/cm:objectClass = 'contact'">
  857. <lyt:layout style="1">
  858. <lyt:section>
  859. <!-- Format : -->
  860. <out:copy-of select="$format"/>
  861. <lyt:layout style="1" title="IDS_PERS_TAB_GENERAL_REGIONAL" border="yes">
  862. <!-- Content Locale -->
  863. <lyt:section>
  864. <xsl:call-template name="gen-contact-locale-selection"/>
  865. </lyt:section>
  866. </lyt:layout>
  867. </lyt:section>
  868. </lyt:layout>
  869. </out:when>
  870. <out:otherwise>
  871. <lyt:layout style="2">
  872. <lyt:section width="30%">
  873. <!-- Lines : -->
  874. <out:copy-of select="$enteriesInListView"/>:
  875. <!-- List style -->
  876. <out:copy-of select="$listViewSeparator"/>
  877. <!-- Skins -->
  878. <out:copy-of select="$skin"/>
  879. <!-- home selection -->
  880. <out:copy-of select="$userHome"/>
  881. <!-- Show hidden entries -->
  882. <out:copy-of select="$showHidden"/>
  883. </lyt:section>
  884. <lyt:section width="70%">
  885. <!-- Format : -->
  886. <out:copy-of select="$format"/>
  887. <!-- Show Welcome page -->
  888. <out:copy-of select="$showWelcomePage"/>
  889. <!-- Run Options Confirmation -->
  890. <out:copy-of select="$showRunOptionsSummary"/>
  891. <!-- Accessibility support for reports -->
  892. <out:if test="count(/root/configuration/property[@name='overrideOptions']/*/value/item[name='http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures'])!=1">
  893. <out:copy-of select="$enableAccessibilityForReports"/>
  894. </out:if>
  895. </lyt:section>
  896. </lyt:layout>
  897. <lyt:layout style="1" title="IDS_PERS_TAB_GENERAL_PORTAL" border="yes">
  898. <lyt:section>
  899. <!-- Preferred view : -->
  900. <out:copy-of select="$defaultView"/>:
  901. <!-- Columns : -->
  902. <out:copy-of select="$columnsInDetailView"/>:
  903. <!-- Accessibility -->
  904. <!-- Comment out following section - as per UI / BI Bus.Dev. request - not active at this time.
  905. <out:copy-of select="$accesssibilityFeatures"/>
  906. -->
  907. </lyt:section>
  908. </lyt:layout>
  909. <lyt:layout style="2" title="IDS_PERS_TAB_GENERAL_REGIONAL" border="yes">
  910. <!-- product locale -->
  911. <lyt:section width="30%">
  912. <xsl:call-template name="gen-locale-selection">
  913. <xsl:with-param name="property" select="'productLocale'"/>
  914. </xsl:call-template>
  915. </lyt:section>
  916. <!-- Content Locale -->
  917. <lyt:section width="70%">
  918. <xsl:call-template name="gen-locale-selection">
  919. <xsl:with-param name="property" select="'contentLocale'"/>
  920. </xsl:call-template>
  921. </lyt:section>
  922. </lyt:layout>
  923. </out:otherwise>
  924. </out:choose>
  925. <!-- Time zone: -->
  926. <lyt:layout style="1">
  927. <lyt:section>
  928. <!-- default time zone variable used with the product time zone select -->
  929. <out:copy-of select="$serverTimeZoneSelect"/>:
  930. <out:copy-of select="$timeZoneInputs"/>
  931. </lyt:section>
  932. </lyt:layout>
  933. <lyt:layout style="1">
  934. <lyt:section >
  935. <!-- Bidi Enabled -->
  936. <out:copy-of select="$bidiOptions"/>
  937. </lyt:section>
  938. </lyt:layout>
  939. </xsl:template>
  940. <xsl:template name="gen-locale-selection">
  941. <xsl:param name="property" select="'productLocale'"/>
  942. <xsl:variable name="propertyLabel" select="concat('IDS_PERS_TAB_GENERAL_', translate($property, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'))"/>
  943. <!-- default variable used with the locale select -->
  944. <out:variable name="default-{$property}">
  945. <out:choose>
  946. <out:when test="$userTemplate=false() and $is-named = '0'">
  947. <out:value-of select="${$property}"/>
  948. </out:when>
  949. <out:when test="string(/root/env/param[@name = 'm_p_{$property}']) != ''">
  950. <out:value-of select="/root/env/param[@name = 'm_p_{$property}']"/>
  951. </out:when>
  952. <out:when test="(string($the-object/cm:{$property}/@nil) != 'true') and not(/root/env/param[@name = 'm_p_{$property}'])">
  953. <out:value-of select="$the-object/cm:{$property}"/>
  954. </out:when>
  955. <out:otherwise>
  956. <out:value-of select="${$property}"/>
  957. </out:otherwise>
  958. </out:choose>
  959. </out:variable>
  960. <!-- Store the locale drop-down control in a variable -->
  961. <out:variable name="{$property}SelectionControl">
  962. <utml:select aria-labelledby="m_{$property}_label" name="m_{$property}" onchange="switch{$property}();">
  963. <utml:default-value>
  964. <out:value-of select="$default-{$property}"/>
  965. </utml:default-value>
  966. <out:choose>
  967. <out:when test="/root/config/param[@name='locale']/locale[@type='{$property}']">
  968. <out:for-each select="/root/config/param[@name='locale']/locale[@type='{$property}']">
  969. <utml:option>
  970. <utml:value>
  971. <out:value-of select="id"/>
  972. </utml:value>
  973. <out:value-of select="displayName"/>
  974. </utml:option>
  975. </out:for-each>
  976. </out:when>
  977. <out:otherwise>
  978. <utml:option>
  979. <utml:value/>
  980. <xts:string id="IDS_PERS_TAB_DEFAULT_SELECT_ENTRY"/>
  981. </utml:option>
  982. </out:otherwise>
  983. </out:choose>
  984. </utml:select>
  985. </out:variable>
  986. <!-- For non-anonymous users, show the option to use the "Default" language or explicitly specify one. Otherwise, show the language selection drop down only. -->
  987. <out:choose>
  988. <out:when test="$is-named = '1'">
  989. <utml:radio-group name="m_select_{$property}">
  990. <utml:default-value>
  991. <out:choose>
  992. <!-- If the value returned by CM is null OR it has been "aquired", then this means that there is no valid locale value stored in CM (i.e. CM is using a default value) -->
  993. <out:when test="string($the-object/cm:{$property}/@nil) = 'true' or $the-object/cm:{$property}/@acquired = 'true'">
  994. <out:value-of select="'default'"/>
  995. </out:when>
  996. <out:otherwise>
  997. <out:value-of select="'select'"/>
  998. </out:otherwise>
  999. </out:choose>
  1000. </utml:default-value>
  1001. <dp:choice title="{$propertyLabel}" id="m_{$property}_label" >
  1002. <out:choose>
  1003. <out:when test="/root/config/param[@name='locale']/locale[@type='{$property}']">
  1004. <dp:section1>
  1005. <utml:input type="radio" value="default" onclick="deSelectPref('{$property}')" aria-labelledby="m_{$property}_IDS_PERS_TAB_GENERAL_DEFAULT"/>
  1006. </dp:section1>
  1007. <dp:section2 id="m_{$property}_IDS_PERS_TAB_GENERAL_DEFAULT">
  1008. <xts:string id="IDS_PERS_TAB_GENERAL_DEFAULT"/>
  1009. </dp:section2>
  1010. <dp:section1>
  1011. <utml:input type="radio" value="select" onclick="selectPref('{$property}');" aria-labelledby="m_{$property}_IDS_PERS_TAB_GENERAL_FOLLOWING"/>
  1012. </dp:section1>
  1013. <dp:section2 id="m_{$property}_IDS_PERS_TAB_GENERAL_FOLLOWING">
  1014. <xts:string id="IDS_PERS_TAB_GENERAL_FOLLOWING"/>
  1015. </dp:section2>
  1016. <dp:section3>
  1017. <out:copy-of select="${$property}SelectionControl"/>
  1018. </dp:section3>
  1019. </out:when>
  1020. <out:otherwise>
  1021. <dp:section1>
  1022. <dp:text nospace="true">&#160;</dp:text>
  1023. </dp:section1>
  1024. <dp:section2>
  1025. <xts:string id="IDS_PERS_TAB_GENERAL_DEFAULT"/>
  1026. </dp:section2>
  1027. </out:otherwise>
  1028. </out:choose>
  1029. </dp:choice>
  1030. </utml:radio-group>
  1031. </out:when>
  1032. <out:otherwise>
  1033. <dp:input>
  1034. <dp:section1 id="m_{$property}_label" >
  1035. <xts:string id="{$propertyLabel}"/>
  1036. </dp:section1>
  1037. <dp:section2>
  1038. <out:copy-of select="${$property}SelectionControl"/>
  1039. </dp:section2>
  1040. </dp:input>
  1041. </out:otherwise>
  1042. </out:choose>
  1043. <utml:input name="changed_m_p_{$property}" type="hidden" utml:update="true" value="0"/>
  1044. <utml:input name="m_p_{$property}" type="hidden">
  1045. <utml:value>
  1046. <out:choose>
  1047. <out:when test="(string($the-object/cm:{$property}/@nil) != 'true') and not(/root/env/param[@name = 'm_p_{$property}'])">
  1048. <out:value-of select="''"/>
  1049. </out:when>
  1050. <out:otherwise>
  1051. <out:value-of select="$default-{$property}"/>
  1052. </out:otherwise>
  1053. </out:choose>
  1054. </utml:value>
  1055. </utml:input>
  1056. </xsl:template>
  1057. <xsl:template name="gen-contact-locale-selection">
  1058. <!-- default variable used with the locale select -->
  1059. <out:variable name="default-locale">
  1060. <out:choose>
  1061. <out:when test="string(/root/env/param[@name = 'm_p_locale']) != ''">
  1062. <out:value-of select="/root/env/param[@name = 'm_p_locale']"/>
  1063. </out:when>
  1064. <out:when test="(string($the-object/cm:locale/@nil) != 'true') and not(/root/env/param[@name = 'm_p_locale'])">
  1065. <out:value-of select="$the-object/cm:locale"/>
  1066. </out:when>
  1067. <out:otherwise>
  1068. <out:value-of select="$contentLocale"/>
  1069. </out:otherwise>
  1070. </out:choose>
  1071. </out:variable>
  1072. <utml:radio-group name="m_select_locale">
  1073. <utml:default-value>
  1074. <out:choose>
  1075. <!-- If the value returned by CM is null OR it has been "aquired", then this means that there is no valid locale value stored in CM (i.e. CM is using a default value) -->
  1076. <out:when test="string($the-object/cm:locale/@nil) = 'true' or $the-object/cm:locale/@acquired = 'true'">
  1077. <out:value-of select="'default'"/>
  1078. </out:when>
  1079. <out:otherwise>
  1080. <out:value-of select="'select'"/>
  1081. </out:otherwise>
  1082. </out:choose>
  1083. </utml:default-value>
  1084. <dp:choice title="IDS_PERS_TAB_GENERAL_CONTENTLOCALE" id="IDS_PERS_TAB_GENERAL_CONTENTLOCALE">
  1085. <out:choose>
  1086. <out:when test="/root/config/param[@name='locale']/locale[@type='contentLocale']">
  1087. <dp:section1>
  1088. <utml:input type="radio" value="default" onclick="deSelectPref('locale')"/>
  1089. </dp:section1>
  1090. <dp:section2>
  1091. <xts:string id="IDS_PERS_TAB_GENERAL_DEFAULT"/>
  1092. </dp:section2>
  1093. <dp:section1>
  1094. <utml:input type="radio" value="select" onclick="selectPref('locale');"/>
  1095. </dp:section1>
  1096. <dp:section2>
  1097. <xts:string id="IDS_PERS_TAB_GENERAL_FOLLOWING"/>
  1098. </dp:section2>
  1099. <dp:section3>
  1100. <utml:select name="m_locale" onchange="switchlocale();">
  1101. <utml:default-value>
  1102. <out:value-of select="$default-locale"/>
  1103. </utml:default-value>
  1104. <out:choose>
  1105. <out:when test="/root/config/param[@name='locale']/locale[@type='contentLocale']">
  1106. <out:for-each select="/root/config/param[@name='locale']/locale[@type='contentLocale']">
  1107. <utml:option>
  1108. <utml:value>
  1109. <out:value-of select="id"/>
  1110. </utml:value>
  1111. <out:value-of select="displayName"/>
  1112. </utml:option>
  1113. </out:for-each>
  1114. </out:when>
  1115. <out:otherwise>
  1116. <utml:option>
  1117. <utml:value/>
  1118. <xts:string id="IDS_PERS_TAB_DEFAULT_SELECT_ENTRY"/>
  1119. </utml:option>
  1120. </out:otherwise>
  1121. </out:choose>
  1122. </utml:select>
  1123. </dp:section3>
  1124. </out:when>
  1125. <out:otherwise>
  1126. <dp:section1>
  1127. <dp:text nospace="true">&#160;</dp:text>
  1128. </dp:section1>
  1129. <dp:section2>
  1130. <xts:string id="IDS_PERS_TAB_GENERAL_DEFAULT"/>
  1131. </dp:section2>
  1132. </out:otherwise>
  1133. </out:choose>
  1134. </dp:choice>
  1135. </utml:radio-group>
  1136. <utml:input name="changed_m_p_locale" type="hidden" utml:update="true" value="0"/>
  1137. <utml:input name="m_p_locale" type="hidden">
  1138. <utml:value>
  1139. <out:choose>
  1140. <out:when test="(string($the-object/cm:locale/@nil) != 'true') and not(/root/env/param[@name = 'm_p_locale'])">
  1141. <out:value-of select="''"/>
  1142. </out:when>
  1143. <out:otherwise>
  1144. <out:value-of select="$default-locale"/>
  1145. </out:otherwise>
  1146. </out:choose>
  1147. </utml:value>
  1148. </utml:input>
  1149. </xsl:template>
  1150. <xsl:template match="*">
  1151. <xsl:copy>
  1152. <xsl:copy-of select="@*"/>
  1153. <xsl:apply-templates/>
  1154. </xsl:copy>
  1155. </xsl:template>
  1156. </xsl:stylesheet>