12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2015
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- xmlns:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:out="dummy-uri"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:rdb="http://developer.cognos.com/schemas/xts/rdb">
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
- <xsl:template match="rdb:preferences">
- <script language="javascript">
- var MSG_ERR_VALUE = "<xts:string id="IDS_ERR_INVALID_MIN_MAX" encode="javascript"/>";
- var bResetCustomPages = ("<out:value-of select="xtsext:javascriptencode(string(key('env-param', 'reset_mypage')))"/>" == "true");
- <![CDATA[
- function init()
- {
- if ( document.pform.m_select_productLocale && document.pform.m_productLocale)
- {
- if(document.pform.m_select_productLocale[0].checked)
- deSelectPref('productLocale');
- }
- if ( document.pform.m_select_contentLocale && document.pform.m_contentLocale)
- {
- if(document.pform.m_select_contentLocale[0].checked)
- deSelectPref('contentLocale');
- }
- if ( document.pform.m_select_locale && document.pform.m_locale)
- {
- if(document.pform.m_select_locale[0].checked)
- document.pform.m_locale.disabled=true;
- }
- if ( document.pform.m_select_timeZoneID && document.pform.m_timeZoneID)
- {
- if(document.pform.m_select_timeZoneID[0].checked)
- document.pform.m_timeZoneID.disabled=true;
- }
- if(window.doHomeTab && (bResetCustomPages || (document.pform.m_pp_home[document.pform.m_pp_home.selectedIndex].value == 'welcome') && document.pform.wTab.checked))
- doHomeTab(document.pform.m_pp_home[document.pform.m_pp_home.selectedIndex].value);
- disabledEnabledBTD();
- }
- function switchproductLocale()
- {
- if ( document.pform.m_select_productLocale)
- document.pform.m_select_productLocale[1].checked = true;
- document.pform.m_p_productLocale.value = document.pform.m_productLocale[document.pform.m_productLocale.selectedIndex].value;
- document.pform.changed_m_p_productLocale.value='1';
- }
- function switchcontentLocale()
- {
- if ( document.pform.m_select_contentLocale )
- document.pform.m_select_contentLocale[1].checked = true;
- document.pform.m_p_contentLocale.value = document.pform.m_contentLocale[document.pform.m_contentLocale.selectedIndex].value;
- document.pform.changed_m_p_contentLocale.value='1';
- }
- function switchlocale()
- {
- if ( document.pform.m_select_locale )
- document.pform.m_select_locale[1].checked = true;
- document.pform.m_p_locale.value = document.pform.m_locale[document.pform.m_locale.selectedIndex].value;
- document.pform.changed_m_p_locale.value='1';
- }
- function switchTimeZoneID()
- {
- if ( document.pform.m_select_timeZoneID )
- document.pform.m_select_timeZoneID[1].checked = true;
- document.pform.m_p_timeZoneID.value = document.pform.m_timeZoneID[document.pform.m_timeZoneID.selectedIndex].value;
- document.pform.changed_m_p_timeZoneID.value='1';
- }
- function disabledEnabledBTD()
- {
- if(document.pform.bidiEnabledOption.checked){
- document.pform.m_bidi_biDirectionalFeaturesEnabled.value ='true';
- document.pform.m_bidi_baseTextDirectionOptionEnum.disabled = false;
- }else{
- document.pform.m_bidi_biDirectionalFeaturesEnabled.value='false';
- document.pform.m_bidi_baseTextDirectionOptionEnum.disabled = true;
- }
- }
- function validate()
- {
- validateLocales();
- if (document.pform.m_po_linesPerPage)
- {
- var s = document.pform.m_po_linesPerPage.value;
- var x = s.toString();
- if(x.length > 3)
- {
- alert(MSG_ERR_VALUE);
- document.pform.m_po_linesPerPage.focus();
- return false;
- }
- // Look for a non-empty and a numbers-only entry ...
- if (s.length != 0 && s.match(/\D+/) == null)
- {
- // Look for "zero" entry
- var i = parseInt(s,10);
- if ( i == 0 )
- {
- alert(MSG_ERR_VALUE);
- document.pform.m_po_linesPerPage.focus();
- return false;
- }
- else // Just make sure there are no leading zeros ..
- {
- if (s.charAt(0) == "0" && s.charAt(1) == "0")
- document.pform.m_po_linesPerPage.value = s.substring(2,3);
- else if (s.charAt(0) == "0")
- document.pform.m_po_linesPerPage.value = s.substring(1,3);
- }
- if (i > 999)
- {
- alert(MSG_ERR_VALUE);
- document.pform.m_po_linesPerPage.focus();
- return false;
- }
- }
- else
- {
- alert(MSG_ERR_VALUE);
- document.pform.m_po_linesPerPage.focus();
- return false;
- }
- }
- return true;
- }
- //-- Activates the productLocale, contentLocale and timeZoneID dropdowns when the corresponding radio button control is selected.
- function selectPref(objName)
- {
- var oPrefControl = document.pform.elements["m_" + objName];
- if (oPrefControl[oPrefControl.selectedIndex])
- {
- document.pform.elements["m_p_" + objName].value = oPrefControl[oPrefControl.selectedIndex].value;
- setChanged('changed_m_p_' + objName);
- }
- oPrefControl.disabled = false;
- }
- //-- Deactivates the productLocale, contentLocale and timeZoneID dropdowns when the corresponding radio button control is selected.
- function deSelectPref(objName)
- {
- document.pform.elements["m_p_" + objName].value = '';
- if(document.pform.elements["m_"+objName])
- {
- document.pform.elements["m_" + objName].disabled = true;
- setChanged('changed_m_p_' + objName);
- }
- }
- function setChanged(objName)
- {
- document.pform.elements[objName].value = '1';
- }
- ]]>
- function preview()
- {
- document.pform.p_style_back.value = "<out:value-of select="$app"/>/<out:value-of select="$mname"/>";
- document.pform.ps_nav_op.value = "maintain";
- document.pform.m.value = "<out:value-of select="$app"/>/preview_style.xts";
- document.pform.submit();
- }
- function processModalCommand(sAction)
- {
- <!-- Set the right call back target -->
- var callBackTarget = <out:value-of select="$callBackTargetJSVar"/>;
- if( callBackTarget )
- {
- callBackTarget.<out:value-of select="$callBackFunctionName"/>(sAction, null);
- }
- }
- function validateLocales() {
- <!--
- Kludge: This is to get around an issue in CM where the user's locales in the authentication source (e.g.: LDAP)
- are NOT being taken into account when CM updates the locales.
-
- Here we detect that if the locales are defaulted and that user has not changed it (in the Prefs page), we will not
- send default locale to CM.
-
- Note: This change does not cover all issues. For example, when user is switching from a selected locale
- to use the default, CM will recompute and update the CRN cookie with locales from the user's browser and/or the server.
- The user's locale setting in the authentication source is NOT taken into account!
- -->
- var productLocaleAcquired = '<out:value-of select="string($the-object/cm:productLocale/@nil) = 'true' or $the-object/cm:productLocale/@acquired = 'true'"/>';
- if (productLocaleAcquired == 'true' && document.pform.m_p_productLocale.value == '') {
- document.pform.changed_m_p_productLocale.value='0';
- }
- var contentLocaleAcquired = '<out:value-of select="string($the-object/cm:contentLocale/@nil) = 'true' or $the-object/cm:contentLocale/@acquired = 'true'"/>';
- if (contentLocaleAcquired == 'true' && document.pform.m_p_contentLocale.value == '') {
- document.pform.changed_m_p_contentLocale.value='0';
- }
- }
- </script>
- <xsl:if test="@mode='properties'">
- <!-- is the current user editing his account object? -->
- <out:variable name="editSelf">
- <out:value-of select="string($the-object/cm:searchPath) = string($self/cm:searchPath)"/>
- </out:variable>
- </xsl:if>
- <!-- Test to exclude options for particular browsers; The tests are slightly different in the property page -->
- <xsl:variable name="excludeSafari">
- <xsl:text>($browser != 'safari'</xsl:text>
- <xsl:if test="@mode='properties'">
- <xsl:text> or not($editSelf)</xsl:text>
- </xsl:if>
- <xsl:text>)</xsl:text>
- </xsl:variable>
- <out:variable name="userTemplate" select="key('env-param','m_class')='account' and starts-with(/root/env/param[@name='m_obj'],'/configuration/account')"/>
- <xsl:variable name="ieOnly">
- <xsl:text>($browser = 'ie'</xsl:text>
- <xsl:if test="@mode='properties'">
- <xsl:text>or not($editSelf)</xsl:text>
- </xsl:if>
- <xsl:text>)</xsl:text>
- </xsl:variable>
- <out:variable name="serverTZID" select="/root/config/param[@name='timezone']/timezone[@type = 'serverTimeZone']/id"/>
- <out:variable name="defaultValues">
- <out:choose>
- <!-- read-only anonymous users editing their own preferences in the preferences page get the defaults from the cookie -->
- <out:when test="not(contains($the-object/cm:permissions,'write')) and $is-named ='0' and '{@mode}' = 'preferences'">
- <out:copy-of select="/root/user/param[@name != 'skin' and @name != 'http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures']"/>
- <param name="skin">storeID("<out:value-of select="$skin-objects/cm:portalSkin[cm:resourceLocation=key('user-param', 'skin')]/cm:storeID"/>")</param>
- <param name="accessibilityFeatures"><out:value-of select="/root/user/param[@name='http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures']"/></param>
- </out:when>
- <!--all other modes gets the defaults from the object (ie profile or account ) -->
- <out:otherwise>
- <out:variable name="object-options" select="$the-object/options/value/item[./name != 'skin' and ./name != 'http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures']"/>
- <!--organize the data as in the above case so that access to the defaultValues variable is uniformed -->
- <out:for-each select="$object-options">
- <param><out:attribute name="name"><out:value-of select="./name"/></out:attribute><out:copy-of select="./value"/></param>
- </out:for-each>
-
- <!-- if Bidi options are not the object, get the default from the user preferences in the bus header -->
- <out:for-each select="/root/user/param[contains(@name, 'http://developer.cognos.com/ceba/constants/biDirectionalOptionEnum')]">
- <out:variable name="name" select="@name"/>
- <out:if test="not($object-options[name = $name])">
- <out:copy-of select="."/>
- </out:if>
- </out:for-each>
-
- <param name="accessibilityFeatures">
- <out:choose>
- <out:when test="$the-object/options/value/item[./name = 'http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures']/value != ''">
- <out:value-of select="$the-object/options/value/item[./name = 'http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures']/value"/>
- </out:when>
- <out:when test="/root/configuration/property[@name='serviceDefaultOptions']/*/value/item[./name='http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures']/value != ''">
- <out:value-of select="/root/configuration/property[@name='serviceDefaultOptions']/*/value/item[./name='http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures']/value"/>
- </out:when>
- </out:choose>
- </param>
- <param name="skin">storeID("<out:value-of select="string($resolved-skin-object/cm:portalSkin/cm:storeID)"/>")</param>
- <!-- for the account object....the the format, timezone, product and content locale are stored seprately so we need to get those too -->
- <param name="format">
- <out:choose>
- <out:when test="$the-object/cm:format != 'XLS' or ($XLSenabled and {$ieOnly})">
- <out:value-of select="$the-object/cm:format"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="'singleXLS'"/>
- </out:otherwise>
- </out:choose>
- </param>
- <param name="timeZoneID">
- <out:choose>
- <out:when test="string($the-object/cm:timeZoneID) = ''"><out:value-of select="$serverTZID"/></out:when>
- <out:otherwise><out:copy-of select="$the-object/cm:timeZoneID"/></out:otherwise>
- </out:choose>
- </param>
- <param name="productLocale"><out:copy-of select="$the-object/cm:productLocale"/></param>
- <param name="contentLocale"><out:copy-of select="$the-object/cm:contentLocale"/></param>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <out:variable name="enteriesInListView">
- <!-- Lines : -->
- <dp:input>
- <dp:section1 id="id_m_po_linesPerPage_label">
- <xts:string id="IDS_PERS_TAB_GENERAL_LINES"/>
- </dp:section1>
- <dp:section2>
- <utml:input type="text" name="m_po_linesPerPage" size="3" maxlength="3" aria-labelledby="id_m_po_linesPerPage_label">
- <utml:value>
- <out:value-of select="$defaultValues/param[@name='linesPerPage']"/>
- </utml:value>
- </utml:input>
- </dp:section2>
- </dp:input>
- </out:variable>
- <out:variable name="listViewSeparator">
- <dp:input>
- <dp:section1 id="id_m_po_listViewSeparator_label">
- <xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS"/>
- </dp:section1>
- <dp:section2>
- <utml:select name="m_po_listViewSeparator" aria-labelledby="id_m_po_listViewSeparator_label">
- <utml:default-value>
- <out:value-of select="$defaultValues/param[@name='listViewSeparator']"/>
- </utml:default-value>
- <utml:option value="line"><xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS_OPTION_GL"/> </utml:option>
- <utml:option value="background"><xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS_OPTION_AB"/> </utml:option>
- <utml:option value="none"><xts:string id="IDS_PERS_TAB_GENERAL_SEPARATORS_OPTION_NS"/> </utml:option>
- </utml:select>
- </dp:section2>
- </dp:input>
- </out:variable>
- <out:variable name="skin">
- <!-- Skins -->
- <utml:input type="hidden" name="p_style_back" value=""/>
- <dp:input>
- <dp:section1 id="id_m_po_skin_label">
- <xts:string id="IDS_PERS_TAB_GENERAL_SKIN"/>
- </dp:section1>
- <dp:section2>
- <utml:select name="m_po_skin" aria-labelledby="id_m_po_skin_label">
- <out:if test="$productLocale != $contentLocale">
- <out:attribute name="lang">
- <out:value-of select="$contentLocale"/>
- </out:attribute>
- </out:if>
- <utml:default-value><out:value-of select="$defaultValues/param[@name='skin']"/></utml:default-value>
- <out:for-each select="$skin-objects/*">
- <out:if test="cm:published='' or cm:published='true' or $hasPATCapability">
- <out:variable name="currentSkinID"><out:value-of select="cm:storeID"/></out:variable>
- <utml:option>
- <utml:value>storeID("<out:value-of select="$currentSkinID"/>")</utml:value>
- <out:value-of select="cm:defaultName"/>
- </utml:option>
- </out:if>
- </out:for-each>
- </utml:select>
- <img height="1" width="10">
- <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
- </img>
- <!-- 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
- are no skins in the list-->
- <out:if test="(not($isNamedAccountReadOnly) and (count($skin-objects/*) > 0))">
- <a href="javascript:preview()" ><xts:string id="IDS_PERS_TAB_GENERAL_SKIN_PREVIEW"/></a>
- </out:if>
- </dp:section2>
- </dp:input>
- </out:variable>
- <out:variable name="userHome">
- <!-- home is only shown if in properties or profile mode -->
- <xsl:if test="@mode='properties' or @mode='profile'">
- <out:variable name="homePage" select="$defaultValues/param[@name='homePage']"/>
- <out:variable name="defaultCCHome" select="/root/system/param[@name= 'CCHome']"/>
- <out:variable name="defaultMMHome" select="/root/system/param[@name = 'CMMHome']"/>
- <out:variable name="defaultPlanningHome" select="/root/system/param[@name = 'PlanningHome']"/>
- <dp:input>
- <dp:section1 id="id_m_po_homePage_label">
- <out:text/><xts:string id="IDS_HOME_SELECTION"/>
- </dp:section1>
- <dp:section2>
- <utml:select name="m_po_homePage" aria-labelledby="id_m_po_homePage_label">
- <utml:default-value>
- <out:value-of select="$homePage"/>
- </utml:default-value>
- <out:if test="$homePage and $homePage != '' and $homePage != $defaultCCHome and $homePage != $defaultMMHome and $homePage != $defaultPlanningHome">
- <utml:option>
- <utml:value><out:value-of select="$homePage"/></utml:value>
- <xts:string id="IDS_HOME_SELECTION_MAINTAIN"/>
- </utml:option>
- </out:if>
- <utml:option>
- <utml:value><out:value-of select="$defaultCCHome"/></utml:value>
- <xts:string id="IDS_PORTAL"/>
- </utml:option>
- <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'] != ''">
- <utml:option >
- <utml:value><out:value-of select="$defaultMMHome"/></utml:value>
- <xts:string id="IDS_METRICSMANAGER"/>
- </utml:option>
- </out:if>
- <out:if test="/root/cm:queryResponse/cm:queryReply[4]//cm:componentID[cm:value='planningService'] != ''">
- <utml:option >
- <utml:value><out:value-of select="$defaultPlanningHome"/></utml:value>
- <xts:string id="IDS_PLANNING"/>
- </utml:option>
- </out:if>
- </utml:select>
- </dp:section2>
- </dp:input>
- </xsl:if>
- </out:variable>
- <out:variable name="format">
- <xsl:if test="not(@mode='properties' or @mode='profile')">
- <out:if test="(not($userCanGeneratePDFOutput) or
- not($userCanGenerateCSVOutput) or
- not($userCanGenerateXMLOutput) or
- not($userCanGenerateXLSOutput))">
- <script language="javascript">
- function displayMessage(formatId) {
- var userCanGeneratePDFOutput = <out:value-of select="$userCanGeneratePDFOutput"/>;
- var userCanGenerateCSVOutput = <out:value-of select="$userCanGenerateCSVOutput"/>;
- var userCanGenerateXMLOutput = <out:value-of select="$userCanGenerateXMLOutput"/>;
- var userCanGenerateXLSOutput = <out:value-of select="$userCanGenerateXLSOutput"/>;
-
- <![CDATA[
- var display = (!userCanGeneratePDFOutput && (formatId == "PDF")) ||
- (!userCanGenerateCSVOutput && (formatId == "CSV")) ||
- (!userCanGenerateXMLOutput && (formatId == "XML")) ||
- (!userCanGenerateXLSOutput && ((formatId == "XLS") || (formatId == "XLWA") ||
- (formatId == "singleXLS") || (formatId == "spreadsheetML") || (formatId == "xlsxData") ||
- (formatId == "spreadsheetMLOfficeConnectionEnabled")))
-
- if (display == true) {
- document.getElementById("IDS_PROP_FORMAT_VIEW_ONLY").style.display="inline"
- }
- else {
- document.getElementById("IDS_PROP_FORMAT_VIEW_ONLY").style.display="none"
- }
- ]]>
- }
- </script>
- </out:if>
- </xsl:if>
-
- <dp:input>
- <dp:section1 id="id_m_p_format_label">
- <xts:string id="IDS_PERS_TAB_GENERAL_FORMAT"/>
- </dp:section1>
- <dp:section2>
- <utml:select name="m_p_format" aria-labelledby="id_m_p_format_label">
- <out:attribute name="onchange">displayMessage(this.value);</out:attribute>
- <utml:default-value>
- <out:value-of select="$defaultValues/param[@name='format']"/>
- </utml:default-value>
- <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')]">
- <xsl:choose>
- <xsl:when test="not(@mode='properties' or @mode='profile')">
- <out:choose>
- <out:when test="(current()/@id = 'PDF' and not($userCanGeneratePDFOutput)) or
- (current()/@id = 'CSV' and not($userCanGenerateCSVOutput)) or
- (current()/@id = 'XML' and not($userCanGenerateXMLOutput)) or
- ((current()/@id = 'XLS' or
- current()/@id = 'XLWA' or
- current()/@id = 'singleXLS' or
- current()/@id = 'spreadsheetML' or
- current()/@id = 'xlsxData' or
- current()/@id = 'spreadsheetMLOfficeConnectionEnabled') and not($userCanGenerateXLSOutput))">
- <utml:option>
- <out:attribute name="aria-labelledby">IDS_PROP_FORMAT_VIEW_ONLY</out:attribute>
- <utml:value><out:value-of select="@id"/></utml:value>
- <out:value-of select="$formatNameLookUp/formats/format[@id = concat(current()/@id, '_RO')]"/>
- </utml:option>
- </out:when>
- <out:otherwise>
- <utml:option>
- <utml:value><out:value-of select="@id"/></utml:value>
- <out:value-of select="$formatNameLookUp/formats/format[@id = current()/@id]"/>
- </utml:option>
- </out:otherwise>
- </out:choose>
- </xsl:when>
- <xsl:otherwise>
- <utml:option>
- <utml:value><out:value-of select="@id"/></utml:value>
- <out:value-of select="$formatNameLookUp/formats/format[@id = current()/@id]"/>
- </utml:option>
- </xsl:otherwise>
- </xsl:choose>
- </out:for-each>
- </utml:select>
- </dp:section2>
- </dp:input>
- <xsl:if test="not(@mode='properties' or @mode='profile')">
- <out:if test="(not($userCanGeneratePDFOutput) or
- not($userCanGenerateCSVOutput) or
- not($userCanGenerateXMLOutput) or
- not($userCanGenerateXLSOutput))">
- <div id="IDS_PROP_FORMAT_VIEW_ONLY" class="formText" style="font-size:60%; position:relative;">
- <out:variable name="defaultSelection"><out:value-of select="$defaultValues/param[@name='format']"/> </out:variable>
- <out:if test="not(($defaultSelection = 'PDF' and not($userCanGeneratePDFOutput)) or
- ($defaultSelection = 'CSV' and not($userCanGenerateCSVOutput)) or
- ($defaultSelection = 'XML' and not($userCanGenerateXMLOutput)) or
- (($defaultSelection = 'XLS' or
- $defaultSelection = 'XLWA' or
- $defaultSelection = 'singleXLS' or
- $defaultSelection = 'spreadsheetML' or
- $defaultSelection = 'xlsxData' or
- $defaultSelection = 'spreadsheetMLOfficeConnectionEnabled') and not($userCanGenerateXLSOutput)))">
- <out:attribute name="style">font-size:60%; position:relative; display:none;</out:attribute>
- </out:if>
- <xts:string id="IDS_PROP_FORMAT_VIEW_ONLY"/>
- </div>
- </out:if>
- </xsl:if>
- </out:variable>
- <out:variable name="bidiOptions">
- <out:variable name="default-bidi-value">
- <out:choose>
- <out:when test="key('env-param', 'm_bidi_biDirectionalFeaturesEnabled')">
- <out:value-of select="key('env-param', 'm_bidi_biDirectionalFeaturesEnabled')" />
- </out:when>
- <out:otherwise>
- <out:value-of select="$defaultValues/param[@name='http://developer.cognos.com/ceba/constants/biDirectionalOptionEnum#biDirectionalFeaturesEnabled']" />
- </out:otherwise>
- </out:choose>
- </out:variable>
- <dp:input>
- <dp:section1 />
- <dp:section2>
- <table border="0" cellpadding="0" cellspacing="0" role="presentation">
- <tr>
- <td>
- <utml:input type="hidden" name="m_bidi_biDirectionalFeaturesEnabled">
- <utml:value>
- <out:value-of select="$default-bidi-value" />
- </utml:value>
- </utml:input>
- <utml:input type="checkbox" id="bidiEnabledOption_id" name="bidiEnabledOption" utml:default-condition="$default-bidi-value='true'" value="true" onclick="disabledEnabledBTD();">
- <utml:default-value>
- <out:value-of select="$default-bidi-value" />
- </utml:default-value>
- </utml:input>
- </td>
- <td class="formText" nowrap="nowrap">
- <label for="bidiEnabledOption_id">
- <out:text><xts:string id="IDS_PERS_TAB_GENERAL_BIDI_ENAB" /></out:text>
- </label>
- </td>
- </tr>
- <tr style="padding-top:10px">
- <td>
- <img height="1" width="10">
- <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'" />/images/space.gif</xsl:attribute>
- </img>
- </td>
- <td>
- <table border="0" cellpadding="0" cellspacing="0" role="presentation">
- <tr>
- <td>
- <dp:input>
- <dp:section1>
- <label for="label_m_bidi_baseTextDirectionOptionEnum"><xts:string id="IDS_PERS_TAB_GENERAL_BIDI_BTD" /></label>
- </dp:section1>
- <dp:section2>
- <utml:select name="m_bidi_baseTextDirectionOptionEnum" id="label_m_bidi_baseTextDirectionOptionEnum">
- <utml:default-value>
- <out:value-of select="$defaultValues/param[@name='http://developer.cognos.com/ceba/constants/biDirectionalOptionEnum#baseTextDirection']" />
- </utml:default-value>
- <utml:option value="http://developer.cognos.com/ceba/constants/baseTextDirectionEnum#LTR"><xts:string id="IDS_PROP_BTD_LTR" /></utml:option>
- <utml:option value="http://developer.cognos.com/ceba/constants/baseTextDirectionEnum#RTL"><xts:string id="IDS_PROP_BTD_RTL" /></utml:option>
- <utml:option value="http://developer.cognos.com/ceba/constants/baseTextDirectionEnum#Auto"><xts:string id="IDS_PROP_BTD_AUTO" /></utml:option>
- </utml:select>
- </dp:section2>
- </dp:input>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </dp:section2>
- </dp:input>
- </out:variable>
- <out:variable name="showWelcomePage">
- <out:variable name="default-value">
- <out:choose>
- <out:when test="key('env-param', 'm_po_showWelcomePage')">
- <out:value-of select="key('env-param', 'm_po_showWelcomePage')"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$defaultValues/param[@name='showWelcomePage']"/>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <dp:input>
- <dp:section1/>
- <dp:section2>
- <utml:input type="hidden" name="m_po_showWelcomePage">
- <utml:value>
- <out:value-of select="$default-value"/>
- </utml:value>
- </utml:input>
- <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';">
- <utml:default-value>
- <out:value-of select="$default-value"/>
- </utml:default-value>
- </utml:input>
- <label for="show_welcome_page_checkbox"><out:text><xts:string id="IDS_PERS_TAB_GENERAL_SHOW_WEL"/></out:text></label>
- </dp:section2>
- </dp:input>
- </out:variable>
- <out:variable name="showHidden">
- <out:if test="$userCanUseShowHiddenObjectsPreferenceCapability = 'true'">
- <out:variable name="default-value">
- <out:choose>
- <out:when test="key('env-param', 'm_po_showHiddenObjects')">
- <out:value-of select="key('env-param', 'm_po_showHiddenObjects')"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$defaultValues/param[@name='showHiddenObjects']"/>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <dp:input>
- <dp:section1/>
- <dp:section2>
- <utml:input type="hidden" name="m_po_showHiddenObjects">
- <utml:value>
- <out:value-of select="$default-value"/>
- </utml:value>
- </utml:input>
- <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';">
- <utml:default-value>
- <out:value-of select="$default-value"/>
- </utml:default-value>
- </utml:input>
- <label for="id_show_hidden_objects_check"><out:text><xts:string id="IDS_PERS_TAB_GENERAL_SHOW_HIDDEN"/></out:text></label>
- </dp:section2>
- </dp:input>
- </out:if>
- </out:variable>
- <out:variable name="showRunOptionsSummary">
- <out:variable name="default-value">
- <out:choose>
- <out:when test="key('env-param', 'm_po_showOptionSummary')">
- <out:value-of select="key('env-param', 'm_po_showOptionSummary')"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$defaultValues/param[@name='showOptionSummary']"/>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <dp:input>
- <dp:section1/>
- <dp:section2>
- <utml:input type="hidden" name="m_po_showOptionSummary">
- <utml:value>
- <out:value-of select="$default-value"/>
- </utml:value>
- </utml:input>
- <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';">
- <utml:default-value>
- <out:value-of select="$default-value"/>
- </utml:default-value>
- </utml:input>
- <label for="id_runoptions_check"><out:text><xts:string id="IDS_PERS_TAB_GENERAL_RUNOPTIONS"/></out:text></label>
- </dp:section2>
- </dp:input>
- </out:variable>
- <out:variable name="enableAccessibilityForReports">
- <out:variable name="default-value">
- <out:choose>
- <out:when test="key('env-param', 'm_go_accessibilityFeatures')">
- <out:value-of select="key('env-param', 'm_go_accessibilityFeatures')"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$defaultValues/param[@name='accessibilityFeatures']"/>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <dp:input>
- <dp:section1/>
- <dp:section2>
- <utml:input type="hidden" name="m_go_accessibilityFeatures">
- <utml:value>
- <out:value-of select="$default-value"/>
- </utml:value>
- </utml:input>
- <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';">
- <utml:default-value>
- <out:value-of select="$default-value"/>
- </utml:default-value>
- </utml:input>
- <label for="id_accessibility_features_check"><out:text><xts:string id="IDS_PERS_TAB_GENERAL_ACCESSIBILITY"/></out:text></label>
- </dp:section2>
- </dp:input>
- </out:variable>
- <out:variable name="defaultView">
- <utml:radio-group name="m_po_displayMode">
- <utml:default-value>
- <out:value-of select="$defaultValues/param[@name='displayMode']"/>
- </utml:default-value>
- <dp:choice title="IDS_PERS_TAB_GENERAL_VIEW" id="ids_pers_tab_general_view">
- <dp:section1>
- <utml:input type="radio" name="m_po_displayMode" value="list" aria-labelledby="ids_pers_tab_general_view_list_label"/>
- </dp:section1>
- <dp:section2 type='label' id='ids_pers_tab_general_view_list_label'>
- <xts:string id="IDS_PERS_TAB_GENERAL_VIEW_LIST"/>
- </dp:section2>
- <dp:section1>
- <utml:input type="radio" name="m_po_displayMode" value="detail" aria-labelledby="ids_pers_tab_general_view_details_label"/>
- </dp:section1>
- <dp:section2 type='label' id="ids_pers_tab_general_view_details_label">
- <xts:string id="IDS_PERS_TAB_GENERAL_VIEW_DETAILS"/>
- </dp:section2>
- </dp:choice>
- </utml:radio-group>
- </out:variable>
- <out:variable name="columnsInDetailView">
- <out:if test="string(/root/configProps/param[@name='cc.nav']/property[@name='portal.navigationView']) = 'newspaper'">
- <dp:input>
- <dp:section1 id="id_m_po_columnsPerPage_label">
- <xts:string id="IDS_PERS_TAB_GENERAL_COLUMNS"/>
- </dp:section1>
- <dp:section2>
- <utml:select name="m_po_columnsPerPage" aria-labelledby="id_m_po_columnsPerPage_label">
- <utml:default-value>
- <out:value-of select="$defaultValues/param[@name='columnsPerPage']"/>
- </utml:default-value>
- <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>
- <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>
- <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>
- <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>
- </utml:select>
- </dp:section2>
- </dp:input>
- </out:if>
- </out:variable>
- <!-- <out:variable name="accesssibilityFeatures">
- <dp:input>
- <dp:section1>
- <xts:string id="IDS_PERS_TAB_GENERAL_ACCESSIBILITY"/>
- </dp:section1>
- <dp:section2>
- <out:variable name="uaf" select="/root/cm:queryResponse/cm:queryReply/cm:account/cm:useAccessibilityFeatures"/>
- <utml:input type="hidden" name="m_p_useAccessibilityFeatures">
- <utml:value>
- <out:choose>
- <out:when test="key('env-param', 'm_p_useAccessibilityFeatures')">
- <out:value-of select="key('env-param', 'm_p_useAccessibilityFeatures')"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$uaf"/>
- </out:otherwise>
- </out:choose>
- </utml:value>
- </utml:input>
- <utml:input type="checkbox" name="use_access" value="true" onclick="document.pform.m_p_useAccessibilityFeatures.value=this.checked;">
- <out:choose>
- <out:when test="key('env-param', 'm_p_useAccessibilityFeatures')">
- <out:if test="key('env-param', 'm_p_useAccessibilityFeatures')='true'">
- <out:attribute name="checked">checked</out:attribute>
- </out:if>
- </out:when>
- <out:when test="string($uaf) = 'true'">
- <out:attribute name="checked">checked</out:attribute>
- </out:when>
- </out:choose>
- <utml:default-value>
- <out:choose>
- <out:when test="key('env-param', 'm_p_useAccessibilityFeatures')">
- <out:value-of select="key('env-param', 'm_p_useAccessibilityFeatures')"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$uaf"/>
- </out:otherwise>
- </out:choose>
- </utml:default-value>
- </utml:input>
- <xts:string id="IDS_PERS_TAB_GENERAL_ACCESSIBILITY_USE"/>
- </dp:section2>
- </dp:input>
- </out:variable> -->
- <!-- Store the content local selection drop-down control in a variable -->
- <out:variable name="TZSelectionControl">
- <utml:select size="1" name="m_timeZoneID" onchange="switchTimeZoneID();" aria-labelledby="IDS_PERS_LOCALE_TIMEZONE_FOLLOWING_label">
- <utml:default-value><out:value-of select="$defaultValues/param[@name='timeZoneID']"/></utml:default-value>
- <out:choose>
- <out:when test="/root/config/param[@name='timezone']/timezone[string(@type)='']">
- <out:for-each select="/root/config/param[@name='timezone']/timezone[string(@type)='']">
- <utml:option>
- <utml:value><out:value-of select="id"/></utml:value>
- <out:value-of select="displayName"/>
- </utml:option>
- </out:for-each>
- </out:when>
- <out:otherwise>
- <utml:option>
- <utml:value></utml:value>
- <xts:string id="IDS_PERS_TAB_DEFAULT_SELECT_ENTRY"/>
- </utml:option>
- </out:otherwise>
- </out:choose>
- </utml:select>
- </out:variable>
- <out:variable name="serverTimeZoneSelect">
- <out:choose>
- <out:when test="$is-named = '1' or key('env-param','m_class')='contact'">
- <utml:radio-group name="m_select_timeZoneID">
- <utml:default-value>
- <out:choose>
- <out:when test="string($the-object/cm:timeZoneID/@nil) = 'true' or $the-object/cm:timeZoneID/@acquired = 'true'">
- <out:value-of select="'default'"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="'select'"/>
- </out:otherwise>
- </out:choose>
- </utml:default-value>
- <dp:choice title="IDS_PERS_LOCALE_TIMEZONE" id="IDS_PERS_LOCALE_TIMEZONE">
- <out:choose>
- <out:when test="/root/config/param[@name='timezone']/timezone[string(@type)='']">
- <dp:section1>
- <utml:input type="radio" value="default" onclick="deSelectPref('timeZoneID')" aria-labelledby="timzeonselectDefault"/>
- </dp:section1>
- <dp:section2 id="timzeonselectDefault">
- <xts:string id="IDS_PERS_LOCALE_TIMEZONE_DEFAULT"/>
- </dp:section2>
- <dp:section1>
- <utml:input type="radio" value="select" onclick="selectPref('timeZoneID')" aria-labelledby="IDS_PERS_LOCALE_TIMEZONE_FOLLOWING_label"/>
- </dp:section1>
- <dp:section2 id="IDS_PERS_LOCALE_TIMEZONE_FOLLOWING_label" >
- <xts:string id="IDS_PERS_LOCALE_TIMEZONE_FOLLOWING"/>
- </dp:section2>
- <dp:section3>
- <out:copy-of select="$TZSelectionControl"/>
- </dp:section3>
- </out:when>
- <out:otherwise>
- <dp:section1><dp:text nospace="true"> </dp:text></dp:section1>
- <dp:section2 id="ids_pers_locale_timezone_label">
- <xts:string id="IDS_PERS_LOCALE_TIMEZONE_DEFAULT"/>
- </dp:section2>
- </out:otherwise>
- </out:choose>
- </dp:choice>
- </utml:radio-group>
- </out:when>
- <out:otherwise>
- <dp:input>
- <dp:section1 id="ids_pers_locale_timezone_label">
- <xts:string id="IDS_PERS_LOCALE_TIMEZONE"/>
- </dp:section1>
- <dp:section2>
- <out:copy-of select="$TZSelectionControl"/>
- </dp:section2>
- </dp:input>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <out:variable name="timeZoneInputs">
- <utml:input name="changed_m_p_timeZoneID" type="hidden" utml:update="true" value="0"/>
- <utml:input name="m_p_timeZoneID" type="hidden">
- <utml:value>
- <out:choose>
- <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>
- <out:otherwise><out:value-of select="$defaultValues/param[@name='timeZoneID']"/></out:otherwise>
- </out:choose>
- </utml:value>
- </utml:input>
- </out:variable>
- <!-- Start body layout -->
- <out:choose>
- <out:when test="$the-object/cm:objectClass = 'contact'">
- <lyt:layout style="1">
- <lyt:section>
- <!-- Format : -->
- <out:copy-of select="$format"/>
- <lyt:layout style="1" title="IDS_PERS_TAB_GENERAL_REGIONAL" border="yes">
- <!-- Content Locale -->
- <lyt:section>
- <xsl:call-template name="gen-contact-locale-selection"/>
- </lyt:section>
- </lyt:layout>
- </lyt:section>
- </lyt:layout>
- </out:when>
- <out:otherwise>
- <lyt:layout style="2">
- <lyt:section width="30%">
- <!-- Lines : -->
- <out:copy-of select="$enteriesInListView"/>:
- <!-- List style -->
- <out:copy-of select="$listViewSeparator"/>
- <!-- Skins -->
- <out:copy-of select="$skin"/>
- <!-- home selection -->
- <out:copy-of select="$userHome"/>
- <!-- Show hidden entries -->
- <out:copy-of select="$showHidden"/>
- </lyt:section>
- <lyt:section width="70%">
- <!-- Format : -->
- <out:copy-of select="$format"/>
- <!-- Show Welcome page -->
- <out:copy-of select="$showWelcomePage"/>
- <!-- Run Options Confirmation -->
- <out:copy-of select="$showRunOptionsSummary"/>
- <!-- Accessibility support for reports -->
- <out:if test="count(/root/configuration/property[@name='overrideOptions']/*/value/item[name='http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures'])!=1">
- <out:copy-of select="$enableAccessibilityForReports"/>
- </out:if>
- </lyt:section>
- </lyt:layout>
- <lyt:layout style="1" title="IDS_PERS_TAB_GENERAL_PORTAL" border="yes">
- <lyt:section>
- <!-- Preferred view : -->
- <out:copy-of select="$defaultView"/>:
- <!-- Columns : -->
- <out:copy-of select="$columnsInDetailView"/>:
- <!-- Accessibility -->
- <!-- Comment out following section - as per UI / BI Bus.Dev. request - not active at this time.
- <out:copy-of select="$accesssibilityFeatures"/>
- -->
- </lyt:section>
- </lyt:layout>
- <lyt:layout style="2" title="IDS_PERS_TAB_GENERAL_REGIONAL" border="yes">
- <!-- product locale -->
- <lyt:section width="30%">
- <xsl:call-template name="gen-locale-selection">
- <xsl:with-param name="property" select="'productLocale'"/>
- </xsl:call-template>
- </lyt:section>
- <!-- Content Locale -->
- <lyt:section width="70%">
- <xsl:call-template name="gen-locale-selection">
- <xsl:with-param name="property" select="'contentLocale'"/>
- </xsl:call-template>
- </lyt:section>
- </lyt:layout>
- </out:otherwise>
- </out:choose>
- <!-- Time zone: -->
- <lyt:layout style="1">
- <lyt:section>
- <!-- default time zone variable used with the product time zone select -->
- <out:copy-of select="$serverTimeZoneSelect"/>:
- <out:copy-of select="$timeZoneInputs"/>
- </lyt:section>
- </lyt:layout>
- <lyt:layout style="1">
- <lyt:section >
- <!-- Bidi Enabled -->
- <out:copy-of select="$bidiOptions"/>
- </lyt:section>
- </lyt:layout>
- </xsl:template>
- <xsl:template name="gen-locale-selection">
- <xsl:param name="property" select="'productLocale'"/>
- <xsl:variable name="propertyLabel" select="concat('IDS_PERS_TAB_GENERAL_', translate($property, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'))"/>
- <!-- default variable used with the locale select -->
- <out:variable name="default-{$property}">
- <out:choose>
- <out:when test="$userTemplate=false() and $is-named = '0'">
- <out:value-of select="${$property}"/>
- </out:when>
- <out:when test="string(/root/env/param[@name = 'm_p_{$property}']) != ''">
- <out:value-of select="/root/env/param[@name = 'm_p_{$property}']"/>
- </out:when>
- <out:when test="(string($the-object/cm:{$property}/@nil) != 'true') and not(/root/env/param[@name = 'm_p_{$property}'])">
- <out:value-of select="$the-object/cm:{$property}"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="${$property}"/>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <!-- Store the locale drop-down control in a variable -->
- <out:variable name="{$property}SelectionControl">
- <utml:select aria-labelledby="m_{$property}_label" name="m_{$property}" onchange="switch{$property}();">
- <utml:default-value>
- <out:value-of select="$default-{$property}"/>
- </utml:default-value>
- <out:choose>
- <out:when test="/root/config/param[@name='locale']/locale[@type='{$property}']">
- <out:for-each select="/root/config/param[@name='locale']/locale[@type='{$property}']">
- <utml:option>
- <utml:value>
- <out:value-of select="id"/>
- </utml:value>
- <out:value-of select="displayName"/>
- </utml:option>
- </out:for-each>
- </out:when>
- <out:otherwise>
- <utml:option>
- <utml:value/>
- <xts:string id="IDS_PERS_TAB_DEFAULT_SELECT_ENTRY"/>
- </utml:option>
- </out:otherwise>
- </out:choose>
- </utml:select>
- </out:variable>
- <!-- For non-anonymous users, show the option to use the "Default" language or explicitly specify one. Otherwise, show the language selection drop down only. -->
- <out:choose>
- <out:when test="$is-named = '1'">
- <utml:radio-group name="m_select_{$property}">
- <utml:default-value>
- <out:choose>
- <!-- 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) -->
- <out:when test="string($the-object/cm:{$property}/@nil) = 'true' or $the-object/cm:{$property}/@acquired = 'true'">
- <out:value-of select="'default'"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="'select'"/>
- </out:otherwise>
- </out:choose>
- </utml:default-value>
- <dp:choice title="{$propertyLabel}" id="m_{$property}_label" >
- <out:choose>
- <out:when test="/root/config/param[@name='locale']/locale[@type='{$property}']">
- <dp:section1>
- <utml:input type="radio" value="default" onclick="deSelectPref('{$property}')" aria-labelledby="m_{$property}_IDS_PERS_TAB_GENERAL_DEFAULT"/>
- </dp:section1>
- <dp:section2 id="m_{$property}_IDS_PERS_TAB_GENERAL_DEFAULT">
- <xts:string id="IDS_PERS_TAB_GENERAL_DEFAULT"/>
- </dp:section2>
- <dp:section1>
- <utml:input type="radio" value="select" onclick="selectPref('{$property}');" aria-labelledby="m_{$property}_IDS_PERS_TAB_GENERAL_FOLLOWING"/>
- </dp:section1>
- <dp:section2 id="m_{$property}_IDS_PERS_TAB_GENERAL_FOLLOWING">
- <xts:string id="IDS_PERS_TAB_GENERAL_FOLLOWING"/>
- </dp:section2>
- <dp:section3>
- <out:copy-of select="${$property}SelectionControl"/>
- </dp:section3>
- </out:when>
- <out:otherwise>
- <dp:section1>
- <dp:text nospace="true"> </dp:text>
- </dp:section1>
- <dp:section2>
- <xts:string id="IDS_PERS_TAB_GENERAL_DEFAULT"/>
- </dp:section2>
- </out:otherwise>
- </out:choose>
- </dp:choice>
- </utml:radio-group>
- </out:when>
- <out:otherwise>
- <dp:input>
- <dp:section1 id="m_{$property}_label" >
- <xts:string id="{$propertyLabel}"/>
- </dp:section1>
- <dp:section2>
- <out:copy-of select="${$property}SelectionControl"/>
- </dp:section2>
- </dp:input>
- </out:otherwise>
- </out:choose>
- <utml:input name="changed_m_p_{$property}" type="hidden" utml:update="true" value="0"/>
- <utml:input name="m_p_{$property}" type="hidden">
- <utml:value>
- <out:choose>
- <out:when test="(string($the-object/cm:{$property}/@nil) != 'true') and not(/root/env/param[@name = 'm_p_{$property}'])">
- <out:value-of select="''"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$default-{$property}"/>
- </out:otherwise>
- </out:choose>
- </utml:value>
- </utml:input>
- </xsl:template>
- <xsl:template name="gen-contact-locale-selection">
- <!-- default variable used with the locale select -->
- <out:variable name="default-locale">
- <out:choose>
- <out:when test="string(/root/env/param[@name = 'm_p_locale']) != ''">
- <out:value-of select="/root/env/param[@name = 'm_p_locale']"/>
- </out:when>
- <out:when test="(string($the-object/cm:locale/@nil) != 'true') and not(/root/env/param[@name = 'm_p_locale'])">
- <out:value-of select="$the-object/cm:locale"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$contentLocale"/>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <utml:radio-group name="m_select_locale">
- <utml:default-value>
- <out:choose>
- <!-- 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) -->
- <out:when test="string($the-object/cm:locale/@nil) = 'true' or $the-object/cm:locale/@acquired = 'true'">
- <out:value-of select="'default'"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="'select'"/>
- </out:otherwise>
- </out:choose>
- </utml:default-value>
- <dp:choice title="IDS_PERS_TAB_GENERAL_CONTENTLOCALE" id="IDS_PERS_TAB_GENERAL_CONTENTLOCALE">
- <out:choose>
- <out:when test="/root/config/param[@name='locale']/locale[@type='contentLocale']">
- <dp:section1>
- <utml:input type="radio" value="default" onclick="deSelectPref('locale')"/>
- </dp:section1>
- <dp:section2>
- <xts:string id="IDS_PERS_TAB_GENERAL_DEFAULT"/>
- </dp:section2>
- <dp:section1>
- <utml:input type="radio" value="select" onclick="selectPref('locale');"/>
- </dp:section1>
- <dp:section2>
- <xts:string id="IDS_PERS_TAB_GENERAL_FOLLOWING"/>
- </dp:section2>
- <dp:section3>
- <utml:select name="m_locale" onchange="switchlocale();">
- <utml:default-value>
- <out:value-of select="$default-locale"/>
- </utml:default-value>
- <out:choose>
- <out:when test="/root/config/param[@name='locale']/locale[@type='contentLocale']">
- <out:for-each select="/root/config/param[@name='locale']/locale[@type='contentLocale']">
- <utml:option>
- <utml:value>
- <out:value-of select="id"/>
- </utml:value>
- <out:value-of select="displayName"/>
- </utml:option>
- </out:for-each>
- </out:when>
- <out:otherwise>
- <utml:option>
- <utml:value/>
- <xts:string id="IDS_PERS_TAB_DEFAULT_SELECT_ENTRY"/>
- </utml:option>
- </out:otherwise>
- </out:choose>
- </utml:select>
- </dp:section3>
- </out:when>
- <out:otherwise>
- <dp:section1>
- <dp:text nospace="true"> </dp:text>
- </dp:section1>
- <dp:section2>
- <xts:string id="IDS_PERS_TAB_GENERAL_DEFAULT"/>
- </dp:section2>
- </out:otherwise>
- </out:choose>
- </dp:choice>
- </utml:radio-group>
- <utml:input name="changed_m_p_locale" type="hidden" utml:update="true" value="0"/>
- <utml:input name="m_p_locale" type="hidden">
- <utml:value>
- <out:choose>
- <out:when test="(string($the-object/cm:locale/@nil) != 'true') and not(/root/env/param[@name = 'm_p_locale'])">
- <out:value-of select="''"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$default-locale"/>
- </out:otherwise>
- </out:choose>
- </utml:value>
- </utml:input>
- </xsl:template>
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|