123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2014
- 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).
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml" includeConfig="true">
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
-
- <!--
- ===============================================================================================
- getContent - get our data from Content Manager
- ===============================================================================================
- -->
- <xts:block id="getContent" nodelist="" dependency="formlogic_init" processor="XSLT" type="exec" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- exclude-result-prefixes="xsl xtsext cml send">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <cml:object-predicates/>
-
- <xsl:template match="/">
- <!-- get all the pageDefinitions for page size drop down -->
- <xts:sequence>
- <xts:append>
- <pageDefinition>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <query xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
- <search>
- <xsl:text>/configuration/pageDefinition</xsl:text>
- <xsl:value-of select="$visibility-predicate"/>
- </search>
- <properties>
- <property name="displaySequence"/>
- <property name="defaultName"/>
- <property name="searchPath"/>
- </properties>
- <sortBy>
- <sort name="displaySequence" order="ascending"/>
- </sortBy>
- </query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </pageDefinition>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- format - render the page
- ===============================================================================================
- -->
- <xts:block id="format" mode="output" processor="XSLT" type="exec" dependency="getContent" mimeType="text/html">
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- get the new theme stuff -->
- <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <xts:logicsheet path="logicsheets/validation.xslt"/>
- <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
-
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:ut="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/ui-templates/"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- exclude-result-prefixes="pf lyt dp cf cp df utml xtsext cm ut">
-
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- Global template variables -->
- <pf:variables/>
- <ut:passwordField/>
- <xsl:variable name="mname" select="'specify_PDF_options.xts'"/>
-
- <!-- start the output -->
- <xsl:template match="/root">
- <pf:dojo>
- <require>com.ibm.cognos.ps.pdfOptions</require>
- </pf:dojo>
- <xsl:variable name="objName">
- <xsl:choose>
- <xsl:when test="key('env-param','m_new_class') and key('env-param','m_new_class') = 'jobDefinition'"><xts:string id="IDS_ADDENTRIES_TITLE_NEW_JOB"/></xsl:when>
- <xsl:when test="key('env-param','step_default_name')"><xsl:value-of select="key('env-param','step_default_name')"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="key('env-param', 'm_name')"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="browserTitle"><xts:string id="IDS_PDF_TITLE"><xts:param name="objName"><span lang="{$contentLocale}"><xsl:value-of select="$objName"/></span></xts:param></xts:string></xsl:variable>
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
- <dp:script>
- <script language="javascript">
-
- var pdfOptions = null;
-
- function init() {
- <!--
- include an array to be used in pdfOptions.js. NOTE: if these ID's change, you also need to update pdfOptions.js
- -->
- pdfOptions = new com.ibm.cognos.ps.pdfOptions(window,document.pform, {
- 'IDS_PDF_ERROR_NO_OPEN_PASSWORD':'<xts:string id="IDS_PDF_ERROR_NO_OPEN_PASSWORD" encode="javascript"/>',
- 'IDS_PDF_ERROR_NO_OPTION_PASSWORD' :'<xts:string id="IDS_PDF_ERROR_NO_OPTION_PASSWORD" encode="javascript"/>',
- 'IDS_PDF_ERROR_OPTION_PASSWORD_NO_OPTIONS': '<xts:string id="IDS_PDF_ERROR_OPTION_PASSWORD_NO_OPTIONS" encode="javascript"/>',
- 'IDS_ERR_0003_PASSWORD_VERIF_FAILED':'<xts:string id="IDS_ERR_0003_PASSWORD_VERIF_FAILED" encode="javascript"/>'
- });
- }
-
- function validate() {
- return pdfOptions.validatePDFOptions();
- }
- </script>
- </dp:script>
-
- <dp:meta>
- <pf:meta/>
- <!-- Standard meta tags -->
- </dp:meta>
- <pf:help/>
- <utml:form name="pform" method="post" action="{$gateway}">
- <utml:exclusion-list>
- <xsl:value-of select="' confirm_m_pdf_ownerPassword_runOption changed_m_pdf_ownerPassword_runOption confirm_m_pdf_userPassword_runOption changed_m_pdf_userPassword_runOption m_pdf_userPassword_runOption m_pdf_ownerPassword_runOption '"/>
- </utml:exclusion-list>
- <!-- header -->
- <dp:header>
- <dp:title>
- <xsl:copy-of select="$browserTitle"/>
- </dp:title>
- <dp:description>
- <xts:string id="IDS_PDF_INTRO"/>
- </dp:description>
- </dp:header>
- <!-- body -->
- <lyt:layout style="1">
- <lyt:section>
- <dp:list>
- <!-- orientation -->
- <dp:section><dp:label for="m_ro_outputPageOrientation"><xts:string id="IDS_OTHERRUN_ORIENTATION"/></dp:label></dp:section>
- <dp:section>
- <utml:select name="m_ro_outputPageOrientation" id="m_ro_outputPageOrientation" utml:track="true">
- <utml:default-value>
- <xsl:choose>
- <xsl:when test="key('env-param', 'm_ro_outputPageOrientation')">key('env-param', 'm_ro_outputPageOrientation')</xsl:when>
- <xsl:otherwise>default</xsl:otherwise>
- </xsl:choose>
- </utml:default-value>
- <utml:option>
- <utml:value>default</utml:value>
- <xts:string id="IDS_OTHERRUN_ORIENTATION_PAPERSIZE_DEFAULT"/>
- </utml:option>
- <utml:option>
- <utml:value>portrait</utml:value>
- <xts:string id="IDS_OTHERRUN_PORTRAIT"/>
- </utml:option>
- <utml:option>
- <utml:value>landscape</utml:value>
- <xts:string id="IDS_OTHERRUN_LANDSCAPE"/>
- </utml:option>
- </utml:select>
- </dp:section>
- <dp:section>
- <img height="5" width="1" src="{$webcontent}/images/space.gif"/>
- </dp:section>
- <!-- page size -->
- <xsl:if test="/root/pageDefinition//*[local-name()='pageDefinition']">
- <dp:section><dp:label for="m_ro_outputPageDefinition"><xts:string id="IDS_OTHERRUN_PAPERSIZE"/></dp:label></dp:section>
- <dp:section>
- <utml:select name="m_ro_outputPageDefinition" id="m_ro_outputPageDefinition" utml:track="true">
- <utml:default-value>
- <xsl:if test="not(key('env-param','m_ro_outputPageDefinition'))">default</xsl:if>
- </utml:default-value>
- <utml:option>
- <utml:value>default</utml:value>
- <xts:string id="IDS_OTHERRUN_ORIENTATION_PAPERSIZE_DEFAULT"/>
- </utml:option>
- <xsl:for-each select="/root/pageDefinition//*[local-name()='pageDefinition']">
- <utml:option>
- <xsl:if test="string(cm:searchPath) = key('env-param','m_ro_outputPageDefinition')">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <utml:value><xsl:value-of select="cm:searchPath"/></utml:value>
- <xsl:value-of select="cm:defaultName"/>
- </utml:option>
- </xsl:for-each>
- </utml:select>
- </dp:section>
- </xsl:if>
- </dp:list>
- </lyt:section>
- </lyt:layout>
-
- <!-- Access controls -->
- <lyt:layout style="1" title="IDS_PDF_ACCESS_CONTROL" border="yes">
- <lyt:section>
- <!-- password for open report -->
- <dp:choice>
- <dp:section1>
- <utml:input type="checkbox" id="checkbox_password_open" name="checkbox_password_open" value="true" onclick="pdfOptions.onClickPasswordCheckbox(this);" aria-labelledby="lbl_checkbox_password_open">
- <xsl:if test="key('env-param','checkbox_password_open') != 'true' or key('env-param','preserve_pdf_userPwd') = 'true'">
- <xsl:attribute name="checked">true</xsl:attribute>
- </xsl:if>
- </utml:input>
- </dp:section1>
- <dp:section2 id="lbl_checkbox_password_open">
- <xts:string id="IDS_PDF_OPEN_REPORT_PASSWORD"/>
- </dp:section2>
- <dp:section3>
- <!-- disable the input if there is no encrypted password-->
- <xsl:call-template name="passwordFields">
- <xsl:with-param name="fieldName" select="'m_pdf_userPassword_runOption'"/>
- <xsl:with-param name="isDisabled" select="not(key('env-param','m_pdf_userPassword_runOption')) and key('env-param','preserve_pdf_userPwd')='false'"/>
- <xsl:with-param name="preservePasswordField" select="'preserve_pdf_userPwd'"/>
- <xsl:with-param name="groupLabelId" select="'lbl_checkbox_password_open'"/>
- </xsl:call-template>
- </dp:section3>
- </dp:choice>
-
- <!-- password for access options -->
- <dp:choice>
- <dp:section1>
- <utml:input type="checkbox" id="checkbox_access_options" name="checkbox_access_options" value="true" onclick="pdfOptions.onClickPasswordCheckbox(this);" aria-labelledby="lbl_checkbox_access_options">
- <xsl:if test="key('env-param','checkbox_access_options') != 'true' or key('env-param','preserve_pdf_ownerPwd') = 'true'">
- <xsl:attribute name="checked">true</xsl:attribute>
- </xsl:if>
- </utml:input>
- </dp:section1>
- <dp:section2 id="lbl_checkbox_access_options">
- <xts:string id="IDS_PDF_ACCESS_OPTIONS_PASSWORD"/>
- </dp:section2>
- <dp:section3>
- <xsl:variable name="title"><xts:string id="IDS_PDF_CONFIRM_ACCESS_OPTIONS_TITLE"/></xsl:variable>
- <xsl:variable name="label"><xts:string id="IDS_PDF_CONFIRM_ACCESS_OPTIONS_LABEL"/></xsl:variable>
-
- <dp:list>
- <!-- access options password -->
- <dp:section>
- <!-- disable the input if there is no encrypted password-->
- <xsl:call-template name="passwordFields">
- <xsl:with-param name="fieldName" select="'m_pdf_ownerPassword_runOption'"/>
- <xsl:with-param name="isDisabled" select="not(key('env-param','m_pdf_ownerPassword_runOption')) and key('env-param','preserve_pdf_ownerPwd')='false'"/>
- <xsl:with-param name="preservePasswordField" select="'preserve_pdf_ownerPwd'"/>
- <xsl:with-param name="groupLabelId" select="'lbl_checkbox_access_options'"/>
- </xsl:call-template>
- </dp:section>
-
- <dp:section>
- <img height="5" width="1" src="{$webcontent}/images/space.gif"/>
- </dp:section>
- <!-- allow printing -->
- <dp:section>
- <dp:label for="m_pdf_allowPrintQuality"><xts:string id="IDS_PDF_ALLOW_PRINTING"/></dp:label>
- </dp:section>
- <dp:section>
- <utml:select name="m_pdf_allowPrintQuality" id="m_pdf_allowPrintQuality">
- <utml:default-value>none</utml:default-value>
- <utml:option value="none">
- <xts:string id="IDS_PDF_PRINTING_NONE"/>
- </utml:option>
- <utml:option value="low">
- <xts:string id="IDS_PDF_PRINTING_LOW"/>
- </utml:option>
- <utml:option value="lowOrHigh">
- <xts:string id="IDS_PDF_PRINTING_HIGH"/>
- </utml:option>
- </utml:select>
- </dp:section>
- <dp:section>
- <img height="5" width="1" src="{$webcontent}/images/space.gif"/>
- </dp:section>
- </dp:list>
- <!-- Allow changes -->
- <dp:choice title="IDS_PDF_ALLOW_CHANGES">
- <!-- modify the document's content -->
- <dp:section1>
- <utml:input type="checkbox" name="m_pdf_allowModifications" id="m_pdf_allowModifications" value="true"/>
- </dp:section1>
- <dp:section2 for="m_pdf_allowModifications">
- <xts:string id="IDS_PDF_ALLOW_CHANGES_MODIFY"/>
- </dp:section2>
- <!-- modify text annotations -->
- <dp:section1>
- <utml:input type="checkbox" name="m_pdf_allowAnnotations" id="m_pdf_allowAnnotations" value="true"/>
- </dp:section1>
- <dp:section2 for="m_pdf_allowAnnotations">
- <xts:string id="IDS_PDF_ALLOW_CHANGES_ADD_TEXT"/>
- </dp:section2>
- <!-- fill in forms -->
- <dp:section1>
- <utml:input type="checkbox" name="m_pdf_allowFieldCompletion" id="m_pdf_allowFieldCompletion" value="true"/>
- </dp:section1>
- <dp:section2 for="m_pdf_allowFieldCompletion">
- <xts:string id="IDS_PDF_ALLOW_CHANGES_FILL_FORMS"/>
- </dp:section2>
- <!-- assemble the document -->
- <dp:section1>
- <utml:input type="checkbox" name="m_pdf_allowAssembly" id="m_pdf_allowAssembly" value="true"/>
- </dp:section1>
- <dp:section2 for="m_pdf_allowAssembly">
- <xts:string id="IDS_PDF_ALLOW_CHANGES_ASSEMBLE"/>
- </dp:section2>
- </dp:choice>
-
- <!-- allow content extractions -->
- <dp:choice title="IDS_PDF_ALLOW_CONTENT_EXTRACTION">
- <!-- extract text -->
- <dp:section1>
- <utml:input type="checkbox" name="m_pdf_allowAccessibilitySupport" id="m_pdf_allowAccessibilitySupport" value="true"/>
- </dp:section1>
- <dp:section2 for="m_pdf_allowAccessibilitySupport">
- <xts:string id="IDS_PDF_ALLOW_CONTENT_EXTRACTION_EXTRACT"/>
- </dp:section2>
- <!-- copy text, images and other -->
- <dp:section1>
- <utml:input type="checkbox" name="m_pdf_allowContentCopy" id="m_pdf_allowContentCopy" value="true"/>
- </dp:section1>
- <dp:section2 for="m_pdf_allowContentCopy">
- <xts:string id="IDS_PDF_ALLOW_CONTENT_EXTRACTION_COPY"/>
- </dp:section2>
- </dp:choice>
- </dp:section3>
- </dp:choice>
- </lyt:section>
- </lyt:layout>
-
- <!-- footer -->
- <dp:footer>
- <df:button df:id="IDS_OK" utml:validate="true" df:style="stack-down-save"/>
- <xsl:choose>
- <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
- <df:button df:id="IDS_CANCEL" df:style="stack-down"/>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CANCEL" df:style="back-url"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:footer>
- </utml:form>
- </dp:page>
- </xsl:template>
-
- <!-- create the password and validate password fields -->
- <xsl:template name="passwordFields">
- <xsl:param name="fieldName"/>
- <xsl:param name="isDisabled"/>
- <xsl:param name="preservePasswordField"/>
- <xsl:param name="groupLabelId"/>
- <xsl:variable name="fieldValue">
- <xsl:choose>
- <xsl:when test="key('env-param',string($preservePasswordField))='true'">********</xsl:when>
- <xsl:otherwise><xsl:value-of select="key('env-param',string($fieldName))"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="hidden-control-name" select="concat('changed_', $fieldName)"/>
-
- <input type="hidden" name="{$hidden-control-name}" id="{$hidden-control-name}">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name = $hidden-control-name]">
- <xsl:attribute name="value">
- <xsl:value-of select="/root/env/param[@name = $hidden-control-name]"/>
- </xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="value">0</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </input>
-
- <dp:list>
- <dp:section><dp:label id="lbl_{$fieldName}"><xts:string id="IDS_PASSWORD"/></dp:label></dp:section>
- <dp:section>
- <input name="{$fieldName}" id="{$fieldName}" type="password" size="53" onkeydown="pdfOptions.doOnKeyDown(this);">
- <xsl:attribute name="aria-labelledby">
- <xsl:if test="$groupLabelId !=''">
- <xsl:value-of select="concat($groupLabelId,' ')"/>
- </xsl:if>
- <xsl:value-of select="concat('lbl_',$fieldName)"/>
- </xsl:attribute>
- <xsl:attribute name="value">
- <xsl:choose>
- <xsl:when test="key('env-param',string($preservePasswordField))='true'">********</xsl:when>
- <xsl:otherwise><xsl:value-of select="$fieldValue"/></xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:if test="$isDisabled">
- <xsl:attribute name="disabled"/>
- </xsl:if>
- </input>
- </dp:section>
- <dp:section><dp:label id="lbl_confirm_{$fieldName}"><xts:string id="IDS_CONFIRM_PASSWORD"/></dp:label></dp:section>
- <dp:section>
- <input name="confirm_{$fieldName}" id="confirm_{$fieldName}" type="password" size="53" onkeydown="pdfOptions.doOnKeyDown(this);">
- <xsl:attribute name="aria-labelledby">
- <xsl:if test="$groupLabelId !=''">
- <xsl:value-of select="concat($groupLabelId,' ')"/>
- </xsl:if>
- <xsl:value-of select="concat('lbl_confirm_',$fieldName)"/>
- </xsl:attribute>
- <xsl:attribute name="value">
- <xsl:choose>
- <xsl:when test="key('env-param',string($preservePasswordField))='true'">********</xsl:when>
- <xsl:otherwise><xsl:value-of select="$fieldValue"/></xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:if test="$isDisabled">
- <xsl:attribute name="disabled"/>
- </xsl:if>
- </input>
- </dp:section>
- </dp:list>
-
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - display debug information
- ===============================================================================================
- -->
- <xts:block id="debug" dependency="format" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
- <!-- get the debug logic sheet -->
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|