new_skin2.xts 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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, 2013
  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. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" messageBase="messages/portal.xml, messages/portalRL.xml" requiredCapability="canUseAdministrationPortal">
  13. <!--
  14. ===============================================================================================
  15. formlogic_init - standard form logic initialization
  16. ===============================================================================================
  17. -->
  18. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  19. <!--
  20. ===============================================================================================
  21. renderPage - render the page
  22. ===============================================================================================
  23. -->
  24. <xts:block id="render_page" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="formlogic_init">
  25. <!-- get the presentation theme -->
  26. <xts:logicsheet path="logicsheets/portal.xsl"/>
  27. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  28. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  29. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  30. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  31. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  32. <!-- apply the form logic -->
  33. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  34. <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  35. <xsl:stylesheet version="1.0"
  36. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  37. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  38. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  39. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  40. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  41. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  42. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  43. exclude-result-prefixes="xsl pf df dp lyt utml">
  44. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  45. <!-- current file name -->
  46. <xsl:variable name="mname" select="'new_skin2.xts'"/>
  47. <!-- add any theme variables -->
  48. <pf:variables/>
  49. <!-- start the output -->
  50. <xsl:template match="/root">
  51. <xsl:variable name="backURL" select="key('env-param','backURL')"/>
  52. <xsl:variable name="wizardTitle"><xts:string id="IDS_NEW_PORTALSKIN_TITLE"/></xsl:variable>
  53. <xsl:variable name="browserTitle">
  54. <xsl:text/><xts:string id="IDS_NEW_PORTALSKIN_NAME_TITLE">
  55. <xts:param name="wizardTitle"><xsl:value-of select="$wizardTitle"/></xts:param>
  56. </xts:string><xsl:text/>
  57. </xsl:variable>
  58. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  59. <dp:meta>
  60. <!-- Standard meta tags -->
  61. <pf:meta/>
  62. </dp:meta>
  63. <dp:script>
  64. <!-- Help system -->
  65. <pf:help context="HID_PORTALADMIN"/>
  66. <script language="javascript">
  67. <!-- XTS strings used in validation -->
  68. <xsl:variable name="style_location"><xts:string id="IDS_PROP_SKIN_LOCATION" encode="javascript"/></xsl:variable>
  69. <xsl:variable name="errmsg">
  70. <xts:string id="IDS_ERR_MANDATORY" encode="javascript">
  71. <xts:param name="field">" + label + "</xts:param>
  72. </xts:string>
  73. </xsl:variable>
  74. function init()
  75. {
  76. if (document.pform.m_p_resourceLocation)
  77. document.pform.m_p_resourceLocation.focus();
  78. }
  79. function validateInputField(field, label)
  80. {
  81. field.value = trim(field.value);
  82. if (field.value == '')
  83. {
  84. alert("<xsl:value-of select="normalize-space($errmsg)"/>");
  85. field.focus();
  86. return false;
  87. }
  88. return true;
  89. }
  90. function validate()
  91. {
  92. var f = document.pform;
  93. <!-- Validate the Style Location -->
  94. if ( !validateInputField(f.m_p_resourceLocation, "<xsl:value-of select="normalize-space($style_location)"/>") )
  95. return false;
  96. return true;
  97. }
  98. </script>
  99. <script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"></script>
  100. </dp:script>
  101. <utml:form name="pform" method="post" action="{$gateway}">
  102. <dp:header>
  103. <!-- header titles-->
  104. <dp:title><xsl:value-of select="$browserTitle"/></dp:title>
  105. <dp:description><xts:string id="IDS_NEW_PORTALSKIN_NAME_INTRO"/></dp:description>
  106. <dp:close>
  107. <a href="{$backURL}">
  108. <dp:closeMarker/>
  109. </a>
  110. </dp:close>
  111. </dp:header>
  112. <lyt:layout style="1">
  113. <lyt:section>
  114. <dp:input>
  115. <dp:section1>
  116. <label for="ctrl_m_p_resourceLocation"><xts:string id="IDS_PROP_SKIN_LOCATION"/></label>
  117. </dp:section1>
  118. <dp:section2>
  119. <utml:input type="text" name="m_p_resourceLocation" class="pInput" size="30" id="ctrl_m_p_resourceLocation"/>
  120. </dp:section2>
  121. </dp:input>
  122. <dp:input>
  123. <dp:section1>
  124. <label for="ctrl_m_p_previewImageLocation"><xts:string id="IDS_PROP_SKIN_PREVIEW"/></label>
  125. </dp:section1>
  126. <dp:section2>
  127. <utml:input type="text" name="m_p_previewImageLocation" class="pInput" size="30" id="ctrl_m_p_previewImageLocation"/>
  128. </dp:section2>
  129. </dp:input>
  130. </lyt:section>
  131. </lyt:layout>
  132. <dp:footer>
  133. <!-- Cancel button -->
  134. <df:button df:id="IDS_CANCEL" df:style="back-url"/>
  135. <!-- Back button -->
  136. <df:button df:id="IDS_BACK" df:style="maintain">
  137. <df:target>
  138. <xsl:value-of select="concat($app, '/new_general.xts')"/>
  139. </df:target>
  140. </df:button>
  141. <!-- Next button -->
  142. <df:button df:id="IDS_NEXT"/>
  143. <!-- Finish button -->
  144. <df:button df:id="IDS_FINISH" utml:validate="true" df:style="submit"/>
  145. </dp:footer>
  146. </utml:form>
  147. </dp:page>
  148. </xsl:template>
  149. </xsl:stylesheet>
  150. </xts:block>
  151. <!--
  152. ===============================================================================================
  153. debug - display debug information
  154. ===============================================================================================
  155. -->
  156. <xts:block id="debug" dependency="render_page" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  157. <!-- get the debug logic sheet -->
  158. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  159. <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">
  160. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  161. <xsl:template match="/">
  162. <dbg:dumpxml select="/root"/>
  163. </xsl:template>
  164. </xsl:stylesheet>
  165. </xts:block>
  166. </xts:morphlet>