root/trunk/deployment/websubmit/webapp/resources/demoskins/default/default/default.xsl

Revision 2197 (checked in by douglm, 4 years ago)

Fix message

  • Property svn:eol-style set to LF
Line 
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet
3   version="1.0"
4   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5   xmlns="http://www.w3.org/1999/xhtml">
6 <xsl:output
7   method="xml"
8   indent="no"
9   media-type="text/html"
10   doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
11   doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
12   standalone="yes"
13   omit-xml-declaration="yes"/>
14
15   <!-- ========================================================= -->
16   <!--         PUBLIC EVENTS SUBMISSION CALENDAR STYLESHEET      -->
17   <!-- ========================================================= -->
18
19   <!-- **********************************************************************
20     Copyright 2007 Rensselaer Polytechnic Institute. All worldwide rights reserved.
21
22     Redistribution and use of this distribution in source and binary forms,
23     with or without modification, are permitted provided that:
24        The above copyright notice and this permission notice appear in all
25         copies and supporting documentation;
26
27         The name, identifiers, and trademarks of Rensselaer Polytechnic
28         Institute are not used in advertising or publicity without the
29         express prior written permission of Rensselaer Polytechnic Institute;
30
31     DISCLAIMER: The software is distributed" AS IS" without any express or
32     implied warranty, including but not limited to, any implied warranties
33     of merchantability or fitness for a particular purpose or any warrant)'
34     of non-infringement of any current or pending patent rights. The authors
35     of the software make no representations about the suitability of this
36     software for any particular purpose. The entire risk as to the quality
37     and performance of the software is with the user. Should the software
38     prove defective, the user assumes the cost of all necessary servicing,
39     repair or correction. In particular, neither Rensselaer Polytechnic
40     Institute, nor the authors of the software are liable for any indirect,
41     special, consequential, or incidental damages related to the software,
42     to the maximum extent the law permits. -->
43
44   <!-- DEFINE INCLUDES -->
45   <xsl:include href="../../../bedework-common/default/default/errors.xsl"/>
46   <xsl:include href="../../../bedework-common/default/default/messages.xsl"/>
47   <xsl:include href="../../../bedework-common/default/default/util.xsl"/>
48
49   <!-- DEFINE GLOBAL CONSTANTS -->
50   <!-- URL of html resources (images, css, other html); by default this is
51        set to the application root, but for the personal calendar
52        this should be changed to point to a
53        web server over https to avoid mixed content errors, e.g.,
54   <xsl:variable name="resourcesRoot">https://mywebserver.edu/myresourcesdir</xsl:variable>
55     -->
56   <xsl:variable name="resourcesRoot" select="/bedework/approot"/>
57
58   <!-- URL of the XSL template directory -->
59   <!-- The approot is an appropriate place to put
60        included stylesheets and xml fragments. These are generally
61        referenced relatively (like errors.xsl and messages.xsl above);
62        this variable is here for your convenience if you choose to
63        reference it explicitly.  It is not used in this stylesheet, however,
64        and can be safely removed if you so choose. -->
65   <xsl:variable name="appRoot" select="/bedework/approot"/>
66
67   <!-- Properly encoded prefixes to the application actions; use these to build
68        urls; allows the application to be used without cookies or within a portal.
69        These urls are rewritten in header.jsp and simply passed through for use
70        here. Every url includes a query string (either ?b=de or a real query
71        string) so that all links constructed in this stylesheet may begin the
72        query string with an ampersand. -->
73
74   <xsl:variable name="submissionsRootEncoded" select="/bedework/submissionsRoot/encoded"/>
75   <xsl:variable name="submissionsRootUnencoded" select="/bedework/submissionsRoot/unencoded"/>
76
77   <!-- main -->
78   <xsl:variable name="setup" select="/bedework/urlPrefixes/setup"/>
79   <xsl:variable name="initEvent" select="/bedework/urlPrefixes/event/initEvent"/>
80   <xsl:variable name="initPendingEvents" select="/bedework/urlPrefixes/event/initPendingEvents"/>
81   <xsl:variable name="addEvent" select="/bedework/urlPrefixes/event/addEvent"/>
82   <xsl:variable name="editEvent" select="/bedework/urlPrefixes/event/editEvent"/>
83   <xsl:variable name="gotoEditEvent" select="/bedework/urlPrefixes/event/gotoEditEvent"/>
84   <xsl:variable name="updateEvent" select="/bedework/urlPrefixes/event/updateEvent"/>
85   <xsl:variable name="delEvent" select="/bedework/urlPrefixes/event/delEvent"/>
86   <xsl:variable name="initUpload" select="/bedework/urlPrefixes/misc/initUpload/a/@href"/>
87   <xsl:variable name="upload" select="/bedework/urlPrefixes/misc/upload/a/@href"/>
88
89   <!-- URL of the web application - includes web context -->
90   <xsl:variable name="urlPrefix" select="/bedework/urlprefix"/>
91
92   <!-- Other generally useful global variables -->
93   <xsl:variable name="prevdate" select="/bedework/previousdate"/>
94   <xsl:variable name="nextdate" select="/bedework/nextdate"/>
95   <xsl:variable name="curdate" select="/bedework/currentdate/date"/>
96   <xsl:variable name="skin">default</xsl:variable>
97   <xsl:variable name="publicCal">/cal</xsl:variable>
98
99   <!-- the following variable can be set to "true" or "false";
100        to use jQuery widgets and fancier UI features, set to false - these are
101        not guaranteed to work in portals. -->
102   <xsl:variable name="portalFriendly">false</xsl:variable>
103
104  <!-- BEGIN MAIN TEMPLATE -->
105   <xsl:template match="/">
106     <html lang="en">
107       <head>
108         <xsl:call-template name="headSection"/>
109       </head>
110       <body>
111         <xsl:choose>
112           <xsl:when test="/bedework/page = 'addEvent'">
113             <xsl:attribute name="onload">focusElement('bwEventTitle');bwSetupDatePickers();</xsl:attribute>
114           </xsl:when>
115           <xsl:when test="/bedework/page = 'editEvent'">
116             <xsl:attribute name="onload">initRXDates();initXProperties();bwSetupDatePickers();</xsl:attribute>
117           </xsl:when>
118         </xsl:choose>
119         <div id="bedework"><!-- main wrapper div -->
120           <xsl:call-template name="header"/>
121           <xsl:call-template name="messagesAndErrors"/>
122           <xsl:call-template name="menuTabs"/>
123           <div id="bodyContent">
124             <xsl:choose>
125               <xsl:when test="/bedework/page='addEvent'">
126                 <xsl:apply-templates select="/bedework/formElements" mode="addEvent"/>
127               </xsl:when>
128               <xsl:when test="/bedework/page='eventList'">
129                 <xsl:call-template name="eventList"/>
130               </xsl:when>
131               <xsl:when test="/bedework/page='editEvent'">
132                 <xsl:apply-templates select="/bedework/formElements" mode="editEvent"/>
133               </xsl:when>
134               <xsl:when test="/bedework/page='upload'">
135                 <xsl:call-template name="upload" />
136               </xsl:when>
137               <xsl:otherwise>
138                 <!-- home / entrance screen -->
139                 <xsl:call-template name="home"/>
140               </xsl:otherwise>
141             </xsl:choose>
142           </div>
143           <!-- footer -->
144           <xsl:call-template name="footer"/>
145         </div>
146       </body>
147     </html>
148   </xsl:template>
149
150   <!--==== HEAD SECTION  ====-->
151   <xsl:template name="headSection">
152     <title>Bedework: Submit a Public Event</title>
153     <meta name="robots" content="noindex,nofollow"/>
154     <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
155     <link rel="stylesheet" href="{$resourcesRoot}/default/default/default.css"/>
156     <link rel="icon" type="image/ico" href="{$resourcesRoot}/resources/bedework.ico" />
157     <!-- note: the non-breaking spaces in the script bodies below are to avoid
158          losing the script closing tags (which avoids browser problems) -->
159     <script type="text/javascript" src="{$resourcesRoot}/resources/bedework.js">&#160;</script>
160     <xsl:if test="/bedework/page='addEvent' or /bedework/page='editEvent'">
161       <script type="text/javascript" src="{$resourcesRoot}/resources/bwClock.js">&#160;</script>
162       <link rel="stylesheet" href="{$resourcesRoot}/resources/bwClock.css"/>
163       <xsl:choose>
164         <xsl:when test="$portalFriendly = 'true'">
165           <script type="text/javascript" src="{$resourcesRoot}/resources/dynCalendarWidget.js">&#160;</script>
166           <link rel="stylesheet" href="{$resourcesRoot}/resources/dynCalendarWidget.css"/>
167         </xsl:when>
168         <xsl:otherwise>
169           <!-- <script type="text/javascript" src="/bedework-common/javascript/jquery/jquery-1.2.6.min.js">&#160;</script>
170           <script type="text/javascript" src="/bedework-common/javascript/jquery/jquery-ui-1.5.2.min.js">&#160;</script>
171           <link rel="stylesheet" href="/bedework-common/javascript/jquery/bedeworkJqueryThemes.css"/> -->
172           <script type="text/javascript" src="/bedework-common/javascript/jquery/jquery-1.3.2.min.js">&#160;</script>
173           <script type="text/javascript" src="/bedework-common/javascript/jquery/jquery-ui-1.7.1.custom.min.js">&#160;</script>
174           <link rel="stylesheet" href="/bedework-common/javascript/jquery/css/custom-theme/jquery-ui-1.7.1.custom.css"/>
175           <link rel="stylesheet" href="/bedework-common/javascript/jquery/css/custom-theme/bedeworkJquery.css"/>
176           <script type="text/javascript">
177             <xsl:comment>
178             $.datepicker.setDefaults({
179               constrainInput: true,
180               dateFormat: "yy-mm-dd",
181               showOn: "both",
182               buttonImage: "<xsl:value-of select='$resourcesRoot'/>/resources/calIcon.gif",
183               buttonImageOnly: true,
184               gotoCurrent: true,
185               duration: ""
186             });
187
188             function bwSetupDatePickers() {
189               // startdate
190               $("#bwEventWidgetStartDate").datepicker({
191                 defaultDate: new Date(<xsl:value-of select="/bedework/formElements/form/start/yearText/input/@value"/>, <xsl:value-of select="number(/bedework/formElements/form/start/month/select/option[@selected = 'selected']/@value) - 1"/>, <xsl:value-of select="/bedework/formElements/form/start/day/select/option[@selected = 'selected']/@value"/>)
192               }).attr("readonly", "readonly");
193               $("#bwEventWidgetStartDate").val('<xsl:value-of select="substring-before(/bedework/formElements/form/start/rfc3339DateTime,'T')"/>');
194
195               // enddate
196               $("#bwEventWidgetEndDate").datepicker({
197                 defaultDate: new Date(<xsl:value-of select="/bedework/formElements/form/end/dateTime/yearText/input/@value"/>, <xsl:value-of select="number(/bedework/formElements/form/end/dateTime/month/select/option[@selected = 'selected']/@value) - 1"/>, <xsl:value-of select="/bedework/formElements/form/end/dateTime/day/select/option[@selected = 'selected']/@value"/>)
198               }).attr("readonly", "readonly");
199               $("#bwEventWidgetEndDate").val('<xsl:value-of select="substring-before(/bedework/formElements/form/end/rfc3339DateTime,'T')"/>');
200             }
201             </xsl:comment>
202           </script>
203         </xsl:otherwise>
204       </xsl:choose>
205       <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkEventForm.js">&#160;</script>
206       <script type="text/javascript" src="/bedework-common/javascript/bedework/bedeworkXProperties.js">&#160;</script>
207       <script type="text/javascript" src="/bedework-common/javascript/bedework/bedeworkUtil.js">&#160;</script>
208     </xsl:if>
209     <script type="text/javascript">
210       <xsl:comment>
211       function focusElement(id) {
212       // focuses element by id
213         document.getElementById(id).focus();
214       }
215       function initRXDates() {
216         // return string values to be loaded into javascript for rdates
217         <xsl:for-each select="/bedework/formElements/form/rdates/rdate">
218           bwRdates.update('<xsl:value-of select="date"/>','<xsl:value-of select="time"/>',false,false,false,'<xsl:value-of select="tzid"/>');
219         </xsl:for-each>
220         // return string values to be loaded into javascript for exdates
221         <xsl:for-each select="/bedework/formElements/form/exdates/rdate">
222           bwExdates.update('<xsl:value-of select="date"/>','<xsl:value-of select="time"/>',false,false,false,'<xsl:value-of select="tzid"/>');
223         </xsl:for-each>
224       }
225       function initXProperties() {
226         <xsl:for-each select="/bedework/formElements/form/xproperties/node()[text()]">
227           bwXProps.init('<xsl:value-of select="name()"/>',[<xsl:for-each select="parameters/node()">['<xsl:value-of select="name()"/>','<xsl:value-of select="node()"/>']<xsl:if test="position() != last()">,</xsl:if></xsl:for-each>],'<xsl:call-template name="escapeApos"><xsl:with-param name="str"><xsl:value-of select="values/text"/></xsl:with-param></xsl:call-template>');
228         </xsl:for-each>
229       }
230       </xsl:comment>
231     </script>
232   </xsl:template>
233
234   <!--==== HEADER TEMPLATES and NAVIGATION  ====-->
235
236   <xsl:template name="header">
237     <div id="header">
238       <a href="/bedework/">
239         <img id="logo"
240             alt="logo"
241             src="{$resourcesRoot}/resources/bedeworkAdminLogo.gif"
242             width="217"
243             height="40"
244             border="0"/>
245       </a>
246       <!-- set the page heading: -->
247       <h1>
248         Bedework Public Event Submission
249       </h1>
250     </div>
251     <div id="statusBar">
252       logged in as
253           <xsl:text> </xsl:text>
254           <strong><xsl:value-of select="/bedework/userid"/></strong>
255           <xsl:text> </xsl:text>
256           <span class="logout"><a href="{$setup}&amp;logout=true">logout</a></span>
257     </div>
258   </xsl:template>
259
260   <xsl:template name="messagesAndErrors">
261     <xsl:if test="/bedework/message">
262       <ul id="messages">
263         <xsl:for-each select="/bedework/message">
264           <li><xsl:apply-templates select="."/></li>
265         </xsl:for-each>
266       </ul>
267     </xsl:if>
268     <xsl:if test="/bedework/error">
269       <ul id="errors">
270         <xsl:for-each select="/bedework/error">
271           <li><xsl:apply-templates select="."/></li>
272         </xsl:for-each>
273       </ul>
274     </xsl:if>
275   </xsl:template>
276
277   <!--==== MENUTABS ====-->
278   <xsl:template name="menuTabs">
279     <ul id="menuTabs">
280       <xsl:choose>
281         <xsl:when test="/bedework/page='home'">
282           <li class="selected">Overview</li>
283           <li><a href="{$initEvent}">Add Event</a></li>
284           <li><a href="{$initPendingEvents}&amp;calPath={$submissionsRootEncoded}&amp;listAllEvents=true">My Pending Events</a></li>
285         </xsl:when>
286         <xsl:when test="/bedework/page='eventList'">
287           <li><a href="{$setup}">Overview</a></li>
288           <li><a href="{$initEvent}">Add Event</a></li>
289           <li class="selected">My Pending Events</li>
290         </xsl:when>
291         <xsl:otherwise>
292           <li><a href="{$setup}">Overview</a></li>
293           <li class="selected">Add Event</li>
294           <li><a href="{$initPendingEvents}&amp;calPath={$submissionsRootEncoded}&amp;listAllEvents=true">My Pending Events</a></li>
295         </xsl:otherwise>
296       </xsl:choose>
297     </ul>
298   </xsl:template>
299
300   <!--==== HOME ====-->
301   <xsl:template name="home">
302     <div class="navButtons navBox">
303       <a href="{$initEvent}">start
304         <img alt="previous"
305           src="{$resourcesRoot}/resources/arrowRight.gif"
306           width="13"
307           height="13"
308           border="0"/>
309       </a>
310     </div>
311     <h1>Entering Events</h1>
312     <ol id="introduction">
313       <li>
314         Before submitting a public event, <a href="/cal">see if it has already been
315         entered</a>. It is possible that an event may be created under a
316         different title than you'd expect.
317       </li>
318       <li>
319         Make your titles descriptive: rather than
320         "Lecture" use "Music Lecture Series: 'Uses of the
321         Neapolitan Chord'". "Cinema Club" would also be too vague,
322         while "Cinema Club: 'Citizen Kane'" is better. Bear in
323         mind that your event will "share the stage" with other events
324         in the calendar - try to be as clear as possible when
325         thinking of titles. Express not only what the event is, but
326         (briefly) what it's about. Elaborate on the event in the
327         description field, but try not to repeat the same
328         information.  Try to think like a user when suggesting an event:
329         use language that will explain your event to someone who knows
330         absolutely nothing about it.
331       </li>
332       <li>
333         Do not include locations and times in the description
334         field (unless it is to add extra information not already
335         displayed).
336       </li>
337     </ol>
338   </xsl:template>
339
340   <!--==== ADD EVENT ====-->
341   <xsl:template match="formElements" mode="addEvent">
342     <xsl:variable name="submitter">
343       <xsl:choose>
344         <xsl:when test="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTEDBY']"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTEDBY']/values/text"/></xsl:when>
345         <xsl:otherwise><xsl:value-of select="/bedework/userid"/></xsl:otherwise>
346       </xsl:choose>
347     </xsl:variable>
348     <form name="eventForm" method="post" action="{$addEvent}" id="standardForm" onsubmit="return setEventFields(this,{$portalFriendly},'{$submitter}');">
349       <xsl:apply-templates select="." mode="eventForm"/>
350     </form>
351   </xsl:template>
352
353   <!--==== EDIT EVENT ====-->
354   <xsl:template match="formElements" mode="editEvent">
355     <xsl:variable name="submitter">
356       <xsl:choose>
357         <xsl:when test="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTEDBY']"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTEDBY']/values/text"/></xsl:when>
358         <xsl:otherwise><xsl:value-of select="/bedework/userid"/></xsl:otherwise>
359       </xsl:choose>
360     </xsl:variable>
361     <form name="eventForm" method="post" action="{$updateEvent}" id="standardForm" onsubmit="return setEventFields(this,{$portalFriendly},'{$submitter}');">
362       <xsl:apply-templates select="." mode="eventForm"/>
363     </form>
364   </xsl:template>
365
366
367   <!--==== ADD and EDIT EVENT FORM ====-->
368   <xsl:template match="formElements" mode="eventForm">
369     <xsl:variable name="calPathEncoded" select="form/calendar/encodedPath"/>
370     <xsl:variable name="calPath" select="form/calendar/path"/>
371     <xsl:variable name="guid" select="guid"/>
372     <xsl:variable name="recurrenceId" select="recurrenceId"/>
373     <!-- comment field to hold the user's suggestions:  -->
374     <input type="hidden" name="xbwsubmitcomment" id="bwEventComment" value=""/>
375
376       <!-- event info for edit event -->
377       <xsl:if test="/bedework/creating != 'true'">
378
379         <table class="common" cellspacing="0">
380           <tr>
381             <th colspan="2" class="commonHeader">
382               <div id="eventActions">
383                 <xsl:choose>
384                   <xsl:when test="recurrenceId != ''">
385                     <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/>
386                     Delete:
387                     <a href="{$delEvent}&amp;calPath={$calPath}&amp;guid={$guid}" title="delete master (recurring event)">all</a>,
388                     <a href="{$delEvent}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete instance (recurring event)">instance</a>
389                   </xsl:when>
390                   <xsl:otherwise>
391                     <a href="{$delEvent}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete event">
392                       <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/>
393                       Delete
394                       <xsl:if test="form/recurringEntity='true'">
395                         all
396                       </xsl:if>
397                     </a>
398                   </xsl:otherwise>
399                 </xsl:choose>
400               </div>
401               <!-- Display type of event -->
402               <xsl:variable name="entityType">
403                 <xsl:choose>
404                   <xsl:when test="entityType = '2'">Task</xsl:when>
405                   <xsl:when test="scheduleMethod = '2'">Meeting</xsl:when>
406                   <xsl:otherwise>Event</xsl:otherwise>
407                 </xsl:choose>
408               </xsl:variable>
409               <xsl:if test="form/recurringEntity='true' or recurrenceId != ''">
410                 Recurring
411               </xsl:if>
412               <xsl:choose>
413                 <xsl:when test="form">
414                   <!-- just a placeholder: need to add owner to the jsp -->
415                   Personal <xsl:value-of select="$entityType"/>
416                 </xsl:when>
417                 <xsl:when test="public = 'true'">
418                   Public <xsl:value-of select="$entityType"/>
419                 </xsl:when>
420                 <xsl:otherwise>
421                   <xsl:value-of select="$entityType"/> (<xsl:value-of select="calendar/owner"/>)
422                 </xsl:otherwise>
423               </xsl:choose>
424               <xsl:if test="form/recurringEntity='true' and recurrenceId = ''">
425                 <xsl:text> </xsl:text>
426                 <em>(recurrence master)</em>
427               </xsl:if>
428             </th>
429           </tr>
430         </table>
431       </xsl:if>
432
433     <div id="instructions">
434       <div id="bwHelp-Details">
435         <div class="navButtons">
436           <a href="javascript:show('bwEventTab-Location','bwHelp-Location','bwBottomNav-Location');hide('bwEventTab-Details','bwHelp-Details','bwBottomNav-Details');"
437              onclick="return validateStep1();">
438             next
439             <img alt="previous"
440               src="{$resourcesRoot}/resources/arrowRight.gif"
441               width="13"
442               height="13"
443               border="0"/>
444           </a>
445         </div>
446         <strong>Step 1:</strong> Enter Event Details. <em>Optional fields are italicized.</em>
447       </div>
448       <div id="bwHelp-Location" class="invisible">
449         <div class="navButtons">
450           <a href="javascript:show('bwEventTab-Details','bwHelp-Details','bwBottomNav-Details'); hide('bwEventTab-Location','bwHelp-Location','bwBottomNav-Location');">
451             <img alt="previous"
452               src="{$resourcesRoot}/resources/arrowLeft.gif"
453               width="13"
454               height="13"
455               border="0"/>
456           previous</a> |
457           <a href="javascript:show('bwEventTab-Contact','bwHelp-Contact','bwBottomNav-Contact'); hide('bwEventTab-Location','bwHelp-Location','bwBottomNav-Location');"
458              onclick="return validateStep2();">
459             next
460             <img alt="previous"
461               src="{$resourcesRoot}/resources/arrowRight.gif"
462               width="13"
463               height="13"
464               border="0"/>
465           </a>
466         </div>
467         <strong>Step 2:</strong> Select Location.
468       </div>
469       <div id="bwHelp-Contact" class="invisible">
470         <div class="navButtons">
471           <a href="javascript:show('bwEventTab-Location','bwHelp-Location','bwBottomNav-Location'); hide('bwHelp-Contact','bwEventTab-Contact','bwBottomNav-Contact');">
472             <img alt="previous"
473               src="{$resourcesRoot}/resources/arrowLeft.gif"
474               width="13"
475               height="13"
476               border="0"/>
477           previous</a> |
478           <a href="javascript:show('bwEventTab-Categories','bwHelp-Categories','bwBottomNav-Categories'); hide('bwHelp-Contact','bwEventTab-Contact','bwBottomNav-Contact');"
479              onclick="return validateStep3();">
480             next
481             <img alt="previous"
482               src="{$resourcesRoot}/resources/arrowRight.gif"
483               width="13"
484               height="13"
485               border="0"/>
486           </a>
487         </div>
488         <strong>Step 3:</strong> Select Contact.
489       </div>
490       <div id="bwHelp-Categories" class="invisible">
491         <!-- this tab is now "topical areas - we will leave the ids named "categories" for now. -->
492         <div class="navButtons">
493           <a href="javascript:show('bwEventTab-Contact','bwHelp-Contact','bwBottomNav-Contact'); hide('bwHelp-Categories','bwEventTab-Categories','bwBottomNav-Categories');">
494             <img alt="previous"
495               src="{$resourcesRoot}/resources/arrowLeft.gif"
496               width="13"
497               height="13"
498               border="0"/>
499           previous</a> |
500           <a href="javascript:show('bwHelp-Review','bwEventTab-Review','bwBottomNav-Review'); hide('bwHelp-Categories','bwEventTab-Categories','bwBottomNav-Categories'); ">
501             next
502             <img alt="previous"
503               src="{$resourcesRoot}/resources/arrowRight.gif"
504               width="13"
505               height="13"
506               border="0"/>
507           </a>
508         </div>
509         <strong>Step 4:</strong> Suggest Topical Areas. <em>Optional.</em>
510       </div>
511       <div id="bwHelp-Review" class="invisible">
512         <div class="navButtons">
513           <a href="javascript:show('bwHelp-Categories','bwEventTab-Categories','bwBottomNav-Categories'); hide('bwHelp-Review','bwEventTab-Review','bwBottomNav-Review'); ">
514             <img alt="previous"
515               src="{$resourcesRoot}/resources/arrowLeft.gif"
516               width="13"
517               height="13"
518               border="0"/>
519           previous</a>
520           <span class="hidden">
521             <!-- this is here just to take up the appropriate space  -->
522             <xsl:text> </xsl:text>| next
523             <img alt="previous"
524               src="{$resourcesRoot}/resources/arrowRight.gif"
525               width="13"
526               height="13"
527               border="0"/>
528           </span>
529         </div>
530         <strong>Step 5:</strong> Contact Information and Comments.
531       </div>
532     </div>
533
534     <div id="eventFormContent">
535       <!-- Basic tab -->
536       <!-- ============== -->
537       <!-- this tab is visible by default -->
538       <div id="bwEventTab-Details">
539         <table cellspacing="0" class="common">
540           <!-- Calendar -->
541           <!-- ======== -->
542           <xsl:variable name="submissionCalendars">
543             <xsl:value-of select="count(/bedework/myCalendars//calendar[calType='1'])"/>
544           </xsl:variable>
545           <tr>
546             <xsl:if test="$submissionCalendars = 1">
547               <xsl:attribute name="class">invisible</xsl:attribute>
548               <!-- hide this row altogether if there is only one calendar; if you want the calendar
549                    path displayed, comment out this xsl:if. -->
550             </xsl:if>
551             <td class="fieldname">
552               Calendar:
553             </td>
554             <td class="fieldval">
555               <xsl:choose>
556                 <xsl:when test="$submissionCalendars = 1">
557                   <!-- there is only 1 writable calendar, just send a hidden field -->
558                   <xsl:variable name="newCalPath"><xsl:value-of select="/bedework/myCalendars//calendar[calType='1']/path"/></xsl:variable>
559                   <input type="hidden" name="newCalPath" value="{$newCalPath}"/>
560                   <span id="bwEventCalDisplay">
561                     <xsl:value-of select="$newCalPath"/>
562                   </span>
563                 </xsl:when>
564                 <xsl:otherwise>
565                   <select name="newCalPath" id="bwNewCalPathField">
566                     <xsl:for-each select="/bedework/myCalendars//calendar[calType='1']">
567                       <option>
568                         <xsl:attribute name="value"><xsl:value-of select="path"/></xsl:attribute>
569                         <xsl:value-of select="substring-after(substring-after(path,/bedework/submissionsRoot/unencoded),'/')"/>
570                       </option>
571                     </xsl:for-each>
572                   </select>
573                 </xsl:otherwise>
574               </xsl:choose>
575             </td>
576           </tr>
577           <!--  Summary (title) of event  -->
578           <!--  ========================= -->
579           <tr>
580             <td class="fieldname">
581               Title:
582             </td>
583             <td class="fieldval">
584               <div id="bwEventTitleNotice" class="invisible">You must include a title.</div> <!-- a holder for validation notes -->
585               <xsl:variable name="title" select="form/title/input/@value"/>
586               <input type="text" name="summary" size="80" value="{$title}" id="bwEventTitle"/>
587             </td>
588           </tr>
589
590           <!--  Date and Time -->
591           <!--  ============= -->
592           <tr>
593             <td class="fieldname">
594               Date &amp; Time:
595             </td>
596             <td class="fieldval">
597               <!-- Set the timefields class for the first load of the page;
598                    subsequent changes will take place using javascript without a
599                    page reload. -->
600               <xsl:variable name="timeFieldsClass">
601                 <xsl:choose>
602                   <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when>
603                   <xsl:otherwise>timeFields</xsl:otherwise>
604                 </xsl:choose>
605               </xsl:variable>
606
607               <!-- date only event: anniversary event - often interpreted as "all day event" -->
608               <xsl:choose>
609                 <xsl:when test="form/allDay/input/@checked='checked'">
610                   <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/>
611                   <input type="hidden" name="eventStartDate.dateOnly" value="true" id="allDayStartDateField"/>
612                   <input type="hidden" name="eventEndDate.dateOnly" value="true" id="allDayEndDateField"/>
613                 </xsl:when>
614                 <xsl:otherwise>
615                   <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/>
616                   <input type="hidden" name="eventStartDate.dateOnly" value="false" id="allDayStartDateField"/>
617                   <input type="hidden" name="eventEndDate.dateOnly" value="false" id="allDayEndDateField"/>
618                 </xsl:otherwise>
619               </xsl:choose>
620               all day
621
622               <!-- HIDE floating event: no timezone (and not UTC)
623               <xsl:choose>
624                 <xsl:when test="form/floating/input/@checked='checked'">
625                   <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="on" checked="checked"/>
626                   <input type="hidden" name="eventStartDate.floating" value="true" id="startFloating"/>
627                   <input type="hidden" name="eventEndDate.floating" value="true" id="endFloating"/>
628                 </xsl:when>
629                 <xsl:otherwise>
630                   <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="off"/>
631                   <input type="hidden" name="eventStartDate.floating" value="false" id="startFloating"/>
632                   <input type="hidden" name="eventEndDate.floating" value="false" id="endFloating"/>
633                 </xsl:otherwise>
634               </xsl:choose>
635               floating -->
636
637               <!-- HIDE store time as coordinated universal time (UTC)
638               <xsl:choose>
639                 <xsl:when test="form/storeUTC/input/@checked='checked'">
640                   <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="on" checked="checked"/>
641                   <input type="hidden" name="eventStartDate.storeUTC" value="true" id="startStoreUTC"/>
642                   <input type="hidden" name="eventEndDate.storeUTC" value="true" id="endStoreUTC"/>
643                 </xsl:when>
644                 <xsl:otherwise>
645                   <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="off"/>
646                   <input type="hidden" name="eventStartDate.storeUTC" value="false" id="startStoreUTC"/>
647                   <input type="hidden" name="eventEndDate.storeUTC" value="false" id="endStoreUTC"/>
648                 </xsl:otherwise>
649               </xsl:choose>
650               store as UTC-->
651
652               <br/>
653               <div class="dateStartEndBox">
654                 <strong>Start:</strong>
655                 <div class="dateFields">
656                   <span class="startDateLabel">Date </span>
657                   <xsl:choose>
658                     <xsl:when test="$portalFriendly = 'true'">
659                       <xsl:copy-of select="/bedework/formElements/form/start/month/*"/>
660                       <xsl:copy-of select="/bedework/formElements/form/start/day/*"/>
661                       <xsl:choose>
662                         <xsl:when test="/bedework/creating = 'true'">
663                           <xsl:copy-of select="/bedework/formElements/form/start/year/*"/>
664                         </xsl:when>
665                         <xsl:otherwise>
666                           <xsl:copy-of select="/bedework/formElements/form/start/yearText/*"/>
667                         </xsl:otherwise>
668                       </xsl:choose>
669                       <script language="JavaScript" type="text/javascript">
670                         <xsl:comment>
671                         startDateDynCalWidget = new dynCalendar('startDateDynCalWidget', <xsl:value-of select="number(/bedework/formElements/form/start/yearText/input/@value)"/>, <xsl:value-of select="number(/bedework/formElements/form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(/bedework/formElements/form/start/day/select/option[@selected='selected']/@value)"/>, 'startDateCalWidgetCallback', '<xsl:value-of select="$resourcesRoot"/>/resources/');
672                         </xsl:comment>
673                       </script>
674                     </xsl:when>
675                     <xsl:otherwise>
676                       <input type="text" name="bwEventWidgetStartDate" id="bwEventWidgetStartDate" size="10"/>
677                       <script language="JavaScript" type="text/javascript">
678                         <xsl:comment>
679                         /*$("#bwEventWidgetStartDate").datepicker({
680                           defaultDate: new Date(<xsl:value-of select="form/start/yearText/input/@value"/>, <xsl:value-of select="number(form/start/month/select/option[@selected = 'selected']/@value) - 1"/>, <xsl:value-of select="form/start/day/select/option[@selected = 'selected']/@value"/>)
681                         }).attr("readonly", "readonly");
682                         $("#bwEventWidgetStartDate").val('<xsl:value-of select="substring-before(form/start/rfc3339DateTime,'T')"/>');
683                         */
684                         </xsl:comment>
685                       </script>
686                       <input type="hidden" name="eventStartDate.year">
687                         <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute>
688                       </input>
689                       <input type="hidden" name="eventStartDate.month">
690                         <xsl:attribute name="value"><xsl:value-of select="form/start/month/select/option[@selected = 'selected']/@value"/></xsl:attribute>
691                       </input>
692                       <input type="hidden" name="eventStartDate.day">
693                         <xsl:attribute name="value"><xsl:value-of select="form/start/day/select/option[@selected = 'selected']/@value"/></xsl:attribute>
694                       </input>
695                     </xsl:otherwise>
696                   </xsl:choose>
697                 </div>
698                 <div class="{$timeFieldsClass}" id="startTimeFields">
699                   <span id="calWidgetStartTimeHider" class="show">
700                     <xsl:copy-of select="form/start/hour/*"/>
701                     <xsl:copy-of select="form/start/minute/*"/>
702                     <xsl:if test="form/start/ampm">
703                       <xsl:copy-of select="form/start/ampm/*"/>
704                     </xsl:if>
705                     <xsl:text> </xsl:text>
706                     <a href="javascript:bwClockLaunch('eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0" alt="bwClock"/></a>
707
708                     <select name="eventStartDate.tzid" id="startTzid" class="timezones">
709                       <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if>
710                       <option value="-1">select timezone...</option>
711                       <xsl:variable name="startTzId" select="form/start/tzid"/>
712                       <xsl:for-each select="/bedework/timezones/timezone">
713                         <option>
714                           <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute>
715                           <xsl:if test="$startTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if>
716                           <xsl:value-of select="name"/>
717                         </option>
718                       </xsl:for-each>
719                     </select>
720                   </span>
721                 </div>
722               </div>
723               <div class="dateStartEndBox">
724                 <strong>
725                   <xsl:choose>
726                     <xsl:when test="form/entityType = '2'">Due:</xsl:when>
727                     <xsl:otherwise>End:</xsl:otherwise>
728                   </xsl:choose>
729                 </strong>
730                 <xsl:choose>
731                   <xsl:when test="form/end/type='E'">
732                     <input type="radio" name="eventEndType" value="E" checked="checked" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/>
733                   </xsl:when>
734                   <xsl:otherwise>
735                     <input type="radio" name="eventEndType" value="E" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/>
736                   </xsl:otherwise>
737                 </xsl:choose>
738                 Date
739                 <xsl:variable name="endDateTimeClass">
740                   <xsl:choose>
741                     <xsl:when test="form/end/type='E'">shown</xsl:when>
742                     <xsl:otherwise>invisible</xsl:otherwise>
743                   </xsl:choose>
744                 </xsl:variable>
745                 <div class="{$endDateTimeClass}" id="endDateTime">
746                   <div class="dateFields">
747                     <xsl:choose>
748                       <xsl:when test="$portalFriendly = 'true'">
749                         <xsl:copy-of select="/bedework/formElements/form/end/dateTime/month/*"/>
750                         <xsl:copy-of select="/bedework/formElements/form/end/dateTime/day/*"/>
751                         <xsl:choose>
752                           <xsl:when test="/bedework/creating = 'true'">
753                             <xsl:copy-of select="/bedework/formElements/form/end/dateTime/year/*"/>
754                           </xsl:when>
755                           <xsl:otherwise>
756                             <xsl:copy-of select="/bedework/formElements/form/end/dateTime/yearText/*"/>
757                           </xsl:otherwise>
758                         </xsl:choose>
759                         <script language="JavaScript" type="text/javascript">
760                         <xsl:comment>
761                           endDateDynCalWidget = new dynCalendar('endDateDynCalWidget', <xsl:value-of select="number(/bedework/formElements/form/start/yearText/input/@value)"/>, <xsl:value-of select="number(/bedework/formElements/form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(/bedework/formElements/form/start/day/select/option[@selected='selected']/@value)"/>, 'endDateCalWidgetCallback', '<xsl:value-of select="$resourcesRoot"/>/resources/');
762                         </xsl:comment>
763                         </script>
764                       </xsl:when>
765                       <xsl:otherwise>
766                         <input type="text" name="bwEventWidgetEndDate" id="bwEventWidgetEndDate" size="10"/>
767                         <script language="JavaScript" type="text/javascript">
768                           <xsl:comment>
769                           /*$("#bwEventWidgetEndDate").datepicker({
770                             defaultDate: new Date(<xsl:value-of select="form/end/dateTime/yearText/input/@value"/>, <xsl:value-of select="number(form/end/dateTime/month/select/option[@selected = 'selected']/@value) - 1"/>, <xsl:value-of select="form/end/dateTime/day/select/option[@selected = 'selected']/@value"/>)
771                           }).attr("readonly", "readonly");
772                           $("#bwEventWidgetEndDate").val('<xsl:value-of select="substring-before(form/end/rfc3339DateTime,'T')"/>');
773                           */
774                           </xsl:comment>
775                         </script>
776                         <input type="hidden" name="eventEndDate.year">
777                           <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/yearText/input/@value"/></xsl:attribute>
778                         </input>
779                         <input type="hidden" name="eventEndDate.month">
780                           <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/month/select/option[@selected = 'selected']/@value"/></xsl:attribute>
781                         </input>
782                         <input type="hidden" name="eventEndDate.day">
783                           <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/day/select/option[@selected = 'selected']/@value"/></xsl:attribute>
784                         </input>
785                       </xsl:otherwise>
786                     </xsl:choose>
787                   </div>
788                   <div class="{$timeFieldsClass}" id="endTimeFields">
789                     <span id="calWidgetEndTimeHider" class="show">
790                       <xsl:copy-of select="form/end/dateTime/hour/*"/>
791                       <xsl:copy-of select="form/end/dateTime/minute/*"/>
792                       <xsl:if test="form/end/dateTime/ampm">
793                         <xsl:copy-of select="form/end/dateTime/ampm/*"/>
794                       </xsl:if>
795                       <xsl:text> </xsl:text>
796                       <a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0" alt="bwClock"/></a>
797
798                       <select name="eventEndDate.tzid" id="endTzid" class="timezones">
799                         <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if>
800                         <option value="-1">select timezone...</option>
801                         <xsl:variable name="endTzId" select="form/end/dateTime/tzid"/>
802                         <xsl:for-each select="/bedework/timezones/timezone">
803                           <option>
804                             <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute>
805                               <xsl:if test="$endTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if>
806                             <xsl:value-of select="name"/>
807                           </option>
808                         </xsl:for-each>
809                       </select>
810                     </span>
811                   </div>
812                 </div><br/>
813                 <div id="clock" class="invisible">
814                   <xsl:call-template name="clock"/>
815                 </div>
816                 <div class="dateFields">
817                   <xsl:choose>
818                     <xsl:when test="form/end/type='D'">
819                       <input type="radio" name="eventEndType" value="D" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/>
820                     </xsl:when>
821                     <xsl:otherwise>
822                       <input type="radio" name="eventEndType" value="D" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/>
823                     </xsl:otherwise>
824                   </xsl:choose>
825                   Duration
826                   <xsl:variable name="endDurationClass">
827                     <xsl:choose>
828                       <xsl:when test="form/end/type='D'">shown</xsl:when>
829                       <xsl:otherwise>invisible</xsl:otherwise>
830                     </xsl:choose>
831                   </xsl:variable>
832                   <xsl:variable name="durationHrMinClass">
833                     <xsl:choose>
834                       <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when>
835                       <xsl:otherwise>shown</xsl:otherwise>
836                     </xsl:choose>
837                   </xsl:variable>
838                   <div class="{$endDurationClass}" id="endDuration">
839                     <xsl:choose>
840                       <xsl:when test="form/end/duration/weeks/input/@value = '0'">
841                       <!-- we are using day, hour, minute format -->
842                       <!-- must send either no week value or week value of 0 (zero) -->
843                         <div class="durationBox">
844                           <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')" checked="checked"/>
845                           <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/>
846                           <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays"/>days
847                           <span id="durationHrMin" class="{$durationHrMinClass}">
848                             <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/>
849                             <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours"/>hours
850                             <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/>
851                             <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes"/>minutes
852                           </span>
853                         </div>
854                         <span class="durationSpacerText">or</span>
855                         <div class="durationBox">
856                           <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/>
857                           <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/>
858                           <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="disabled"/>weeks
859                         </div>
860                       </xsl:when>
861                       <xsl:otherwise>
862                         <!-- we are using week format -->
863                         <div class="durationBox">
864                           <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/>
865                           <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/>
866                           <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="disabled"/>days
867                           <span id="durationHrMin" class="{$durationHrMinClass}">
868                             <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/>
869                             <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="disabled"/>hours
870                             <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/>
871                             <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="disabled"/>minutes
872                           </span>
873                         </div>
874                         <span class="durationSpacerText">or</span>
875                         <div class="durationBox">
876                           <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')" checked="checked"/>
877                           <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/>
878                           <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks"/>weeks
879                         </div>
880                       </xsl:otherwise>
881                     </xsl:choose>
882                   </div>
883                 </div><br/>
884                 <div class="dateFields" id="noDuration">
885                   <xsl:choose>
886                     <xsl:when test="form/end/type='N'">
887                       <input type="radio" name="eventEndType" value="N" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/>
888                     </xsl:when>
889                     <xsl:otherwise>
890                       <input type="radio" name="eventEndType" value="N" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/>
891                     </xsl:otherwise>
892                   </xsl:choose>
893                   This
894                   <xsl:choose>
895                     <xsl:when test="form/entityType = '2'">task</xsl:when>
896                     <xsl:otherwise>event</xsl:otherwise>
897                   </xsl:choose>
898                   has no duration / end date
899                 </div>
900               </div>
901             </td>
902           </tr>
903
904           <!--  Description  -->
905           <tr>
906             <td class="fieldname">Description:</td>
907             <td class="fieldval">
908               <div id="bwEventDescNotice" class="invisible">You must include a description.</div> <!-- a holder for validation notes -->
909               <xsl:choose>
910                 <xsl:when test="normalize-space(form/desc/textarea) = ''">
911                   <textarea name="description" cols="60" rows="4" id="bwEventDesc">
912                     <xsl:text> </xsl:text>
913                   </textarea>
914                   <!-- keep this space to avoid browser
915                   rendering errors when the text area is empty -->
916                 </xsl:when>
917                 <xsl:otherwise>
918                   <textarea name="description" cols="60" rows="4" id="bwEventDesc">
919                     <xsl:value-of select="form/desc/textarea"/>
920                   </textarea>
921                 </xsl:otherwise>
922               </xsl:choose>
923             </td>
924           </tr>
925           <!--  Status  -->
926           <tr>
927             <td class="fieldname">
928               Status:
929             </td>
930             <td class="fieldval">
931               <input type="radio" name="eventStatus" value="CONFIRMED">
932                 <xsl:if test="form/status = 'CONFIRMED' or /bedework/creating = 'true' or form/status = ''"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
933               </input>
934               confirmed
935               <input type="radio" name="eventStatus" value="TENTATIVE">
936                 <xsl:if test="form/status = 'TENTATIVE'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
937               </input>
938               tentative
939               <input type="radio" name="eventStatus" value="CANCELLED">
940                 <xsl:if test="form/status = 'CANCELLED'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
941               </input>
942               canceled
943             </td>
944           </tr>
945           <!-- Cost -->
946           <tr>
947             <td class="fieldname"><em>Cost:</em></td>
948             <td class="fieldval">
949               <input type="text" name="eventCost" size="30" value="">
950                 <xsl:attribute name="value"><xsl:value-of select="form/cost/input/@value"/></xsl:attribute>
951               </input>
952               <span class="note"> optional: if any, and place to purchase tickets</span>
953             </td>
954           </tr>
955           <!--  Link (url associated with event)  -->
956           <tr>
957             <td class="fieldname"><em>Event URL:</em></td>
958             <td class="fieldval">
959               <input type="text" name="eventLink" size="30" value="">
960                 <xsl:attribute name="value"><xsl:value-of select="form/link/input/@value"/></xsl:attribute>
961               </input>
962               <span class="note"> optional: for more information about the event</span>
963             </td>
964           </tr>
965           <!-- Image Url -->
966           <tr>
967             <td class="fieldname"><em>Image URL:</em></td>
968             <td class="fieldval">
969               <input type="text" name="xBwImageHolder" size="30" value="">
970                 <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-IMAGE']/values/text"/></xsl:attribute>
971               </input>
972               <xsl:text> </xsl:text>
973               <span class="note"> optional: to include an image with the event description</span>
974             </td>
975           </tr>
976         </table>
977       </div>
978
979       <!-- Location tab -->
980       <!-- ============== -->
981       <div id="bwEventTab-Location" class="invisible">
982         <div id="bwLocationUidNotice" class="invisible">You must either select a location or suggest one below.</div>
983         <div class="mainForm">
984           <span id="eventFormLocationList">
985             <select name="locationUid" class="bigSelect" id="bwLocationUid">
986               <option value="">select an existing location...</option>
987               <xsl:copy-of select="form/location/locationmenu/select/*"/>
988             </select>
989           </span>
990         </div>
991         <p class="subFormMessage">
992           Didn't find the location?  Suggest a new one:
993         </p>
994         <div class="subForm">
995           <p>
996             <label for="commentLocationAddress">Address: </label>
997             <input type="text" name="commentLocationAddress" id="bwCommentLocationAddress">
998               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/values/text"/></xsl:attribute>
999             </input>
1000           </p>
1001           <p>
1002             <label for="commentLocationSubaddress"><em>Sub-address:</em> </label>
1003             <input type="text" name="commentLocationSubaddress" id="commentLocationSubaddress">
1004               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/parameters/node()[name()='X-BEDEWORK-PARAM-SUBADDRESS']"/></xsl:attribute>
1005             </input>
1006             <span class="note"> optional</span>
1007           </p>
1008           <p>
1009             <label for="commentLocationURL"><em>URL:</em> </label>
1010             <input type="text" name="commentLocationURL" id="commentLocationURL">
1011               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/parameters/node()[name()='X-BEDEWORK-PARAM-URL']"/></xsl:attribute>
1012             </input>
1013             <span class="note"> optional</span>
1014           </p>
1015         </div>
1016       </div>
1017
1018       <!-- Contact tab -->
1019       <!-- ============== -->
1020       <div id="bwEventTab-Contact" class="invisible">
1021         <div id="bwContactUidNotice" class="invisible">You must either select a contact or suggest one below.</div>
1022         <div class="mainForm">
1023           <select name="contactUid" id="bwContactUid" class="bigSelect">
1024             <option value="">
1025               select an existing contact...
1026             </option>
1027             <xsl:copy-of select="form/contact/all/select/*"/>
1028           </select>
1029         </div>
1030         <p class="subFormMessage">
1031           Didn't find the contact you need?  Suggest a new one:
1032         </p>
1033         <div class="subForm">
1034           <p>
1035             <label for="commentContactName">Organization Name: </label>
1036             <input type="text" name="commentContactName" id="bwCommentContactName" size="40">
1037               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/values/text"/></xsl:attribute>
1038             </input>
1039             <span class="note"> Please limit contacts to organizations, not individuals.</span>
1040           </p>
1041           <p>
1042             <label for="commentContactPhone"><em>Phone:</em> </label>
1043             <input type="text" name="commentContactPhone">
1044               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-PHONE']"/></xsl:attribute>
1045             </input>
1046             <span class="note"> optional</span>
1047           </p>
1048           <p>
1049             <label for="commentContactURL"><em>URL:</em> </label>
1050             <input type="text" name="commentContactURL">
1051               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-URL']"/></xsl:attribute>
1052             </input>
1053             <span class="note"> optional</span>
1054           </p>
1055           <p>
1056             <label for="commentContactEmail"><em>Email:</em> </label>
1057             <input type="text" name="commentContactEmail">
1058               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-EMAIL']"/></xsl:attribute>
1059             </input>
1060             <span class="note"> optional</span>
1061           </p>
1062         </div>
1063       </div>
1064
1065       <!-- Categories tab (now Topical areas) -->
1066       <!-- ================================== -->
1067       <div id="bwEventTab-Categories" class="invisible">
1068         <!-- Topical area  -->
1069         <!-- These are the subscriptions (aliases) where the events should show up.
1070              By selecting one or more of these, appropriate categories will be set on the event -->
1071         <ul class="aliasTree">
1072           <!-- hard coding the "aliases" name is not best, but will do for now -->
1073           <xsl:apply-templates select="form/calendars/calendar/calendar[name='aliases']" mode="showEventFormAliases">
1074             <xsl:with-param name="root">true</xsl:with-param>
1075           </xsl:apply-templates>
1076         </ul>
1077         <p class="subFormMessage">
1078           Missing a topical area?  Please describe what type of event you're submitting:
1079         </p>
1080         <div class="subForm">
1081           <p>
1082             <label for="commentCategories">Type of event: </label>
1083             <input type="text" name="commentCategories" size="80">
1084               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-CATEGORIES']/values/text"/></xsl:attribute>
1085             </input>
1086           </p>
1087         </div>
1088         <!-- xsl:variable name="catCount" select="count(form/categories/all/category)"/>
1089         <xsl:choose>
1090           <xsl:when test="not(form/categories/all/category)">
1091             no categories defined
1092           </xsl:when>
1093           <xsl:otherwise>
1094             <table cellpadding="0" id="allCategoryCheckboxes">
1095               <tr>
1096                 <td>
1097                   <xsl:for-each select="form/categories/all/category[position() &lt;= ceiling($catCount div 2)]">
1098                     <input type="checkbox" name="catUid">
1099                       <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute>
1100                       <xsl:if test="uid = ../../current//category/uid"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
1101                       <xsl:value-of select="keyword"/>
1102                     </input><br/>
1103                   </xsl:for-each>
1104                 </td>
1105                 <td>
1106                   <xsl:for-each select="form/categories/all/category[position() &gt; ceiling($catCount div 2)]">
1107                     <input type="checkbox" name="catUid">
1108                       <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute>
1109                       <xsl:if test="uid = ../../current//category/uid"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
1110                       <xsl:value-of select="keyword"/>
1111                     </input><br/>
1112                   </xsl:for-each>
1113                 </td>
1114               </tr>
1115             </table>
1116           </xsl:otherwise>
1117         </xsl:choose>
1118         <p class="subFormMessage">
1119           Didn't find the category you want?  Suggest a new one:
1120         </p>
1121         <div class="subForm">
1122           <p>
1123             <label for="commentCategories">Category suggestion: </label>
1124             <input type="text" name="commentCategories" size="30">
1125               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-CATEGORIES']/values/text"/></xsl:attribute>
1126             </input>
1127           </p>
1128         </div-->
1129       </div>
1130
1131       <!--   Review tab   -->
1132       <!-- ============== -->
1133       <div id="bwEventTab-Review" class="invisible">
1134         <!--  <table id="bwEventSubmitReview" class="common">
1135           <tr>
1136             <th colspan="2">Event Details</th>
1137           </tr>-->
1138           <!-- the form elements will be inserted here -->
1139         <!-- </table>-->
1140
1141         <div id="bwCommentNotes">
1142           <!-- holders for validation notes -->
1143           <div id="xBwEmailHolderNotice" class="invisible">You must include your email address.</div>
1144           <div id="xBwEmailHolderInvalidNotice" class="invisible">This does not appear to be a valid email address.  Please correct.</div>
1145           <p>
1146             <label for="xBwEmailHolder">Enter your email address: </label><br/>
1147             <input type="text" name="xBwEmailHolder" id="xBwEmailHolder" size="80">
1148               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTER-EMAIL']/values/text"/></xsl:attribute>
1149             </input>
1150           </p>
1151
1152           <p>
1153             Please supply any final notes or instructions regarding your event:<br/>
1154           <!-- note: don't remove the #160 from the textarea or browsers will see it as a closed tag when empty -->
1155            <textarea name="commentNotes" cols="60" rows="4"><!--
1156            --><xsl:value-of select="normalize-space(form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/values/text)"/><!--
1157            --><xsl:if test="normalize-space(form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/values/text) = ''">&#160;</xsl:if><!--
1158            --></textarea>
1159           </p>
1160         </div>
1161         <div class="eventSubmitButtons">
1162           <input name="submit" class="submit" type="submit" value="submit for approval"/>
1163           <input name="cancelled" type="submit" value="cancel"/>
1164         </div>
1165       </div>
1166     </div>
1167
1168     <div id="bwBottomNav">
1169       <div id="bwBottomNav-Details">
1170         <div class="navButtons">
1171           <a href="javascript:show('bwEventTab-Location','bwHelp-Location','bwBottomNav-Location'); hide('bwEventTab-Details','bwHelp-Details','bwBottomNav-Details');">
1172             next
1173             <img alt="previous"
1174               src="{$resourcesRoot}/resources/arrowRight.gif"
1175               width="13"
1176               height="13"
1177               border="0"/>
1178           </a>
1179         </div>
1180       </div>
1181       <div id="bwBottomNav-Location" class="invisible">
1182         <div class="navButtons">
1183           <a href="javascript:show('bwEventTab-Details','bwHelp-Details','bwBottomNav-Details'); hide('bwEventTab-Location','bwHelp-Location','bwBottomNav-Location');">
1184             <img alt="previous"
1185               src="{$resourcesRoot}/resources/arrowLeft.gif"
1186               width="13"
1187               height="13"
1188               border="0"/>
1189           previous</a> |
1190           <a href="javascript:show('bwEventTab-Contact','bwHelp-Contact','bwBottomNav-Contact'); hide('bwEventTab-Location','bwHelp-Location','bwBottomNav-Location');">
1191             next
1192             <img alt="previous"
1193               src="{$resourcesRoot}/resources/arrowRight.gif"
1194               width="13"
1195               height="13"
1196               border="0"/>
1197           </a>
1198         </div>
1199       </div>
1200       <div id="bwBottomNav-Contact" class="invisible">
1201         <div class="navButtons">
1202           <a href="javascript:show('bwEventTab-Location','bwHelp-Location','bwBottomNav-Location'); hide('bwHelp-Contact','bwEventTab-Contact','bwBottomNav-Contact');">
1203             <img alt="previous"
1204               src="{$resourcesRoot}/resources/arrowLeft.gif"
1205               width="13"
1206               height="13"
1207               border="0"/>
1208           previous</a> |
1209           <a href="javascript:show('bwEventTab-Categories','bwHelp-Categories','bwBottomNav-Categories'); hide('bwHelp-Contact','bwEventTab-Contact','bwBottomNav-Contact');">
1210             next
1211             <img alt="previous"
1212               src="{$resourcesRoot}/resources/arrowRight.gif"
1213               width="13"
1214               height="13"
1215               border="0"/>
1216           </a>
1217         </div>
1218       </div>
1219       <div id="bwBottomNav-Categories" class="invisible">
1220         <div class="navButtons">
1221           <a href="javascript:show('bwEventTab-Contact','bwHelp-Contact','bwBottomNav-Contact'); hide('bwHelp-Categories','bwEventTab-Categories','bwBottomNav-Categories');">
1222             <img alt="previous"
1223               src="{$resourcesRoot}/resources/arrowLeft.gif"
1224               width="13"
1225               height="13"
1226               border="0"/>
1227           previous</a> |
1228           <a href="javascript:show('bwHelp-Review','bwEventTab-Review','bwBottomNav-Review'); hide('bwHelp-Categories','bwEventTab-Categories','bwBottomNav-Categories');">
1229             <!-- displayReview('standardForm','bwEventSubmitReview',1) -->
1230             next
1231             <img alt="previous"
1232               src="{$resourcesRoot}/resources/arrowRight.gif"
1233               width="13"
1234               height="13"
1235               border="0"/>
1236           </a>
1237         </div>
1238       </div>
1239       <div id="bwBottomNav-Review" class="invisible">
1240         <div class="navButtons">
1241           <a href="javascript:show('bwHelp-Categories','bwEventTab-Categories','bwBottomNav-Categories'); hide('bwHelp-Review','bwEventTab-Review','bwBottomNav-Review'); ">
1242             <img alt="previous"
1243               src="{$resourcesRoot}/resources/arrowLeft.gif"
1244               width="13"
1245               height="13"
1246               border="0"/>
1247           previous</a>
1248           <span class="hidden">
1249             <xsl:text> </xsl:text>| next
1250             <img alt="previous"
1251               src="{$resourcesRoot}/resources/arrowRight.gif"
1252               width="13"
1253               height="13"
1254               border="0"/>
1255           </span>
1256         </div>
1257       </div>
1258     </div>
1259   </xsl:template>
1260
1261   <xsl:template match="calendar" mode="showEventFormAliases">
1262     <xsl:param name="root">false</xsl:param>
1263     <li>
1264       <xsl:if test="$root != 'true'">
1265         <!-- hide the root calendar. -->
1266         <xsl:choose>
1267           <xsl:when test="calType = '7' or calType = '8'">
1268             <!-- we've hit an unresolvable alias; stop descending -->
1269             <input type="checkbox" name="forDiplayOnly" disabled="disabled"/>
1270             <em><xsl:value-of select="name"/>?</em>
1271           </xsl:when>
1272           <xsl:when test="calType = '0'">
1273             <!-- no direct selecting of folders or folder aliases: we only want users to select the
1274                  underlying calendar aliases -->
1275             <img src="{$resourcesRoot}/resources/catIcon.gif" width="13" height="13" alt="folder" class="folderForAliasTree" border="0"/>
1276             <xsl:value-of select="name"/>
1277           </xsl:when>
1278           <xsl:otherwise>
1279             <xsl:variable name="virtualPath">/user<xsl:for-each select="ancestor-or-self::calendar/name">/<xsl:value-of select="."/></xsl:for-each></xsl:variable>
1280             <input type="checkbox" name="alias" onclick="toggleBedeworkXProperty('X-BEDEWORK-SUBMIT-ALIAS','{$virtualPath}',this.checked)">
1281               <xsl:attribute name="value"><xsl:value-of select="$virtualPath"/></xsl:attribute>
1282               <xsl:if test="$virtualPath = /bedework/formElements/form/xproperties//X-BEDEWORK-SUBMIT-ALIAS/values/text"><xsl:attribute name="checked"><xsl:value-of select="checked"/></xsl:attribute></xsl:if>
1283             </input>
1284             <xsl:choose>
1285               <xsl:when test="$virtualPath = /bedework/formElements/form/xproperties//X-BEDEWORK-SUBMIT-ALIAS/values/text">
1286                 <strong><xsl:value-of select="name"/></strong>
1287               </xsl:when>
1288               <xsl:otherwise>
1289                 <xsl:value-of select="name"/>
1290               </xsl:otherwise>
1291             </xsl:choose>
1292           </xsl:otherwise>
1293         </xsl:choose>
1294       </xsl:if>
1295
1296       <xsl:if test="calendar">
1297         <ul>
1298           <xsl:apply-templates select="calendar" mode="showEventFormAliases"/>
1299         </ul>
1300       </xsl:if>
1301     </li>
1302   </xsl:template>
1303
1304   <xsl:template match="val" mode="weekMonthYearNumbers">
1305     <xsl:if test="position() != 1 and position() = last()"> and </xsl:if>
1306     <xsl:value-of select="."/><xsl:choose>
1307       <xsl:when test="substring(., string-length(.)-1, 2) = '11' or
1308                       substring(., string-length(.)-1, 2) = '12' or
1309                       substring(., string-length(.)-1, 2) = '13'">th</xsl:when>
1310       <xsl:when test="substring(., string-length(.), 1) = '1'">st</xsl:when>
1311       <xsl:when test="substring(., string-length(.), 1) = '2'">nd</xsl:when>
1312       <xsl:when test="substring(., string-length(.), 1) = '3'">rd</xsl:when>
1313       <xsl:otherwise>th</xsl:otherwise>
1314     </xsl:choose>
1315     <xsl:if test="position() != last()">, </xsl:if>
1316   </xsl:template>
1317
1318   <xsl:template name="byDayChkBoxList">
1319     <xsl:param name="name"/>
1320     <xsl:for-each select="/bedework/shortdaynames/val">
1321       <xsl:variable name="pos" select="position()"/>
1322       <input type="checkbox">
1323         <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute>
1324         <xsl:attribute name="name"><xsl:value-of select="$name"/></xsl:attribute>
1325       </input>
1326       <xsl:value-of select="."/>
1327     </xsl:for-each>
1328   </xsl:template>
1329
1330   <xsl:template name="buildCheckboxList">
1331     <xsl:param name="current"/>
1332     <xsl:param name="end"/>
1333     <xsl:param name="name"/>
1334     <xsl:param name="splitter">10</xsl:param>
1335     <span class="chkBoxListItem">
1336       <input type="checkbox">
1337         <xsl:attribute name="name"><xsl:value-of select="$name"/></xsl:attribute>
1338         <xsl:attribute name="value"><xsl:value-of select="$current"/></xsl:attribute>
1339       </input>
1340       <xsl:value-of select="$current"/>
1341     </span>
1342     <xsl:if test="$current mod $splitter = 0"><br/></xsl:if>
1343     <xsl:if test="$current = $end"><br/></xsl:if>
1344     <xsl:if test="$current &lt; $end">
1345       <xsl:call-template name="buildCheckboxList">
1346         <xsl:with-param name="current"><xsl:value-of select="$current + 1"/></xsl:with-param>
1347         <xsl:with-param name="end"><xsl:value-of select="$end"/></xsl:with-param>
1348         <xsl:with-param name="name"><xsl:value-of select="$name"/></xsl:with-param>
1349       </xsl:call-template>
1350     </xsl:if>
1351   </xsl:template>
1352
1353   <xsl:template name="recurrenceDayPosOptions">
1354     <option value="0">none</option>
1355     <option value="1">the first</option>
1356     <option value="2">the second</option>
1357     <option value="3">the third</option>
1358     <option value="4">the fourth</option>
1359     <option value="5">the fifth</option>
1360     <option value="-1">the last</option>
1361     <option value="">every</option>
1362   </xsl:template>
1363
1364   <xsl:template name="buildRecurFields">
1365     <xsl:param name="current"/>
1366     <xsl:param name="total"/>
1367     <xsl:param name="name"/>
1368     <div class="invisible">
1369       <xsl:attribute name="id"><xsl:value-of select="$name"/>RecurFields<xsl:value-of select="$current"/></xsl:attribute>
1370       and
1371       <select width="12em">
1372         <xsl:attribute name="name">by<xsl:value-of select="$name"/>posPos<xsl:value-of select="$current"/></xsl:attribute>
1373         <xsl:if test="$current != $total">
1374           <xsl:attribute name="onchange">changeClass('<xsl:value-of select="$name"/>RecurFields<xsl:value-of select="$current+1"/>','shown')</xsl:attribute>
1375         </xsl:if>
1376         <xsl:call-template name="recurrenceDayPosOptions"/>
1377       </select>
1378       <xsl:call-template name="byDayChkBoxList"/>
1379     </div>
1380     <xsl:if test="$current &lt; $total">
1381       <xsl:call-template name="buildRecurFields">
1382         <xsl:with-param name="current"><xsl:value-of select="$current+1"/></xsl:with-param>
1383         <xsl:with-param name="total"><xsl:value-of select="$total"/></xsl:with-param>
1384         <xsl:with-param name="name"><xsl:value-of select="$name"/></xsl:with-param>
1385       </xsl:call-template>
1386     </xsl:if>
1387   </xsl:template>
1388
1389   <xsl:template name="buildNumberOptions">
1390     <xsl:param name="current"/>
1391     <xsl:param name="total"/>
1392     <option value="{$current}"><xsl:value-of select="$current"/></option>
1393     <xsl:if test="$current &lt; $total">
1394       <xsl:call-template name="buildNumberOptions">
1395         <xsl:with-param name="current"><xsl:value-of select="$current+1"/></xsl:with-param>
1396         <xsl:with-param name="total"><xsl:value-of select="$total"/></xsl:with-param>
1397       </xsl:call-template>
1398     </xsl:if>
1399   </xsl:template>
1400
1401   <xsl:template name="clock">
1402     <div id="bwClock">
1403       <!-- Bedework 24-Hour Clock time selection widget
1404            used with resources/bwClock.js and resources/bwClock.css -->
1405       <xsl:variable name="hour24" select="/bedework/hour24"/><!-- true or false -->
1406       <div id="bwClockClock">
1407         <img id="clockMap" src="{$resourcesRoot}/resources/clockMap.gif" width="368" height="368" border="0" alt="bwClock" usemap="#bwClockMap" />
1408       </div>
1409       <div id="bwClockCover">
1410         &#160;
1411         <!-- this is a special effect div used simply to cover the pixelated edge
1412              where the clock meets the clock box title -->
1413       </div>
1414       <div id="bwClockBox">
1415         <h2>
1416           Bedework 24-Hour Clock
1417         </h2>
1418         <div id="bwClockDateTypeIndicator">
1419           type
1420         </div>
1421         <div id="bwClockTime">
1422           select time
1423         </div>
1424         <div id="bwClockSwitch">
1425           switch
1426         </div>
1427         <div id="bwClockCloseText">
1428           close
1429         </div>
1430         <div id="bwClockCloseButton">
1431           <a href="javascript:bwClockClose();">X</a>
1432         </div>
1433       </div>
1434       <map name="bwClockMap" id="bwClockMap">
1435         <area shape="rect" alt="close clock" title="close clock" coords="160,167, 200,200" href="javascript:bwClockClose()"/>
1436         <area shape="poly" alt="minute 00:55" title="minute 00:55" coords="156,164, 169,155, 156,107, 123,128" href="javascript:bwClockUpdateDateTimeForm('minute','55')" />
1437         <area shape="poly" alt="minute 00:50" title="minute 00:50" coords="150,175, 156,164, 123,128, 103,161" href="javascript:bwClockUpdateDateTimeForm('minute','50')" />
1438         <area shape="poly" alt="minute 00:45" title="minute 00:45" coords="150,191, 150,175, 103,161, 103,206" href="javascript:bwClockUpdateDateTimeForm('minute','45')" />
1439         <area shape="poly" alt="minute 00:40" title="minute 00:40" coords="158,208, 150,191, 105,206, 123,237" href="javascript:bwClockUpdateDateTimeForm('minute','40')" />
1440         <area shape="poly" alt="minute 00:35" title="minute 00:35" coords="171,218, 158,208, 123,238, 158,261" href="javascript:bwClockUpdateDateTimeForm('minute','35')" />
1441         <area shape="poly" alt="minute 00:30" title="minute 00:30" coords="193,218, 172,218, 158,263, 209,263" href="javascript:bwClockUpdateDateTimeForm('minute','30')" />
1442         <area shape="poly" alt="minute 00:25" title="minute 00:25" coords="209,210, 193,218, 209,261, 241,240" href="javascript:bwClockUpdateDateTimeForm('minute','25')" />
1443         <area shape="poly" alt="minute 00:20" title="minute 00:20" coords="216,196, 209,210, 241,240, 261,206" href="javascript:bwClockUpdateDateTimeForm('minute','20')" />
1444         <area shape="poly" alt="minute 00:15" title="minute 00:15" coords="216,178, 216,196, 261,206, 261,159" href="javascript:bwClockUpdateDateTimeForm('minute','15')" />
1445         <area shape="poly" alt="minute 00:10" title="minute 00:10" coords="209,164, 216,178, 261,159, 240,126" href="javascript:bwClockUpdateDateTimeForm('minute','10')" />
1446         <area shape="poly" alt="minute 00:05" title="minute 00:05" coords="196,155, 209,164, 238,126, 206,107" href="javascript:bwClockUpdateDateTimeForm('minute','5')" />
1447         <area shape="poly" alt="minute 00:00" title="minute 00:00" coords="169,155, 196,155, 206,105, 156,105" href="javascript:bwClockUpdateDateTimeForm('minute','0')" />
1448         <area shape="poly" alt="11 PM, 2300 hour" title="11 PM, 2300 hour" coords="150,102, 172,96, 158,1, 114,14" href="javascript:bwClockUpdateDateTimeForm('hour','23',{$hour24})" />
1449         <area shape="poly" alt="10 PM, 2200 hour" title="10 PM, 2200 hour" coords="131,114, 150,102, 114,14, 74,36" href="javascript:bwClockUpdateDateTimeForm('hour','22',{$hour24})" />
1450         <area shape="poly" alt="9 PM, 2100 hour" title="9 PM, 2100 hour" coords="111,132, 131,114, 74,36, 40,69" href="javascript:bwClockUpdateDateTimeForm('hour','21',{$hour24})" />
1451         <area shape="poly" alt="8 PM, 2000 hour" title="8 PM, 2000 hour" coords="101,149, 111,132, 40,69, 15,113" href="javascript:bwClockUpdateDateTimeForm('hour','20',{$hour24})" />
1452         <area shape="poly" alt="7 PM, 1900 hour" title="7 PM, 1900 hour" coords="95,170, 101,149, 15,113, 1,159" href="javascript:bwClockUpdateDateTimeForm('hour','19',{$hour24})" />
1453         <area shape="poly" alt="6 PM, 1800 hour" title="6 PM, 1800 hour" coords="95,196, 95,170, 0,159, 0,204" href="javascript:bwClockUpdateDateTimeForm('hour','18',{$hour24})" />
1454         <area shape="poly" alt="5 PM, 1700 hour" title="5 PM, 1700 hour" coords="103,225, 95,196, 1,205, 16,256" href="javascript:bwClockUpdateDateTimeForm('hour','17',{$hour24})" />
1455         <area shape="poly" alt="4 PM, 1600 hour" title="4 PM, 1600 hour" coords="116,245, 103,225, 16,256, 41,298" href="javascript:bwClockUpdateDateTimeForm('hour','16',{$hour24})" />
1456         <area shape="poly" alt="3 PM, 1500 hour" title="3 PM, 1500 hour" coords="134,259, 117,245, 41,298, 76,332" href="javascript:bwClockUpdateDateTimeForm('hour','15',{$hour24})" />
1457         <area shape="poly" alt="2 PM, 1400 hour" title="2 PM, 1400 hour" coords="150,268, 134,259, 76,333, 121,355" href="javascript:bwClockUpdateDateTimeForm('hour','14',{$hour24})" />
1458         <area shape="poly" alt="1 PM, 1300 hour" title="1 PM, 1300 hour" coords="169,273, 150,268, 120,356, 165,365" href="javascript:bwClockUpdateDateTimeForm('hour','13',{$hour24})" />
1459         <area shape="poly" alt="Noon, 1200 hour" title="Noon, 1200 hour" coords="193,273, 169,273, 165,365, 210,364" href="javascript:bwClockUpdateDateTimeForm('hour','12',{$hour24})" />
1460         <area shape="poly" alt="11 AM, 1100 hour" title="11 AM, 1100 hour" coords="214,270, 193,273, 210,363, 252,352" href="javascript:bwClockUpdateDateTimeForm('hour','11',{$hour24})" />
1461         <area shape="poly" alt="10 AM, 1000 hour" title="10 AM, 1000 hour" coords="232,259, 214,270, 252,352, 291,330" href="javascript:bwClockUpdateDateTimeForm('hour','10',{$hour24})" />
1462         <area shape="poly" alt="9 AM, 0900 hour" title="9 AM, 0900 hour" coords="251,240, 232,258, 291,330, 323,301" href="javascript:bwClockUpdateDateTimeForm('hour','9',{$hour24})" />
1463         <area shape="poly" alt="8 AM, 0800 hour" title="8 AM, 0800 hour" coords="263,219, 251,239, 323,301, 349,261" href="javascript:bwClockUpdateDateTimeForm('hour','8',{$hour24})" />
1464         <area shape="poly" alt="7 AM, 0700 hour" title="7 AM, 0700 hour" coords="269,194, 263,219, 349,261, 363,212" href="javascript:bwClockUpdateDateTimeForm('hour','7',{$hour24})" />
1465         <area shape="poly" alt="6 AM, 0600 hour" title="6 AM, 0600 hour" coords="269,172, 269,193, 363,212, 363,155" href="javascript:bwClockUpdateDateTimeForm('hour','6',{$hour24})" />
1466         <area shape="poly" alt="5 AM, 0500 hour" title="5 AM, 0500 hour" coords="263,150, 269,172, 363,155, 351,109" href="javascript:bwClockUpdateDateTimeForm('hour','5',{$hour24})" />
1467         <area shape="poly" alt="4 AM, 0400 hour" title="4 AM, 0400 hour" coords="251,130, 263,150, 351,109, 325,68" href="javascript:bwClockUpdateDateTimeForm('hour','4',{$hour24})" />
1468         <area shape="poly" alt="3 AM, 0300 hour" title="3 AM, 0300 hour" coords="234,112, 251,130, 325,67, 295,37" href="javascript:bwClockUpdateDateTimeForm('hour','3',{$hour24})" />
1469         <area shape="poly" alt="2 AM, 0200 hour" title="2 AM, 0200 hour" coords="221,102, 234,112, 295,37, 247,11" href="javascript:bwClockUpdateDateTimeForm('hour','2',{$hour24})" />
1470         <area shape="poly" alt="1 AM, 0100 hour" title="1 AM, 0100 hour" coords="196,96, 221,102, 247,10, 209,-1, 201,61, 206,64, 205,74, 199,75" href="javascript:bwClockUpdateDateTimeForm('hour','1',{$hour24})" />
1471         <area shape="poly" alt="Midnight, 0000 hour" title="Midnight, 0000 hour" coords="172,96, 169,74, 161,73, 161,65, 168,63, 158,-1, 209,-1, 201,61, 200,62, 206,64, 205,74, 198,75, 196,96, 183,95" href="javascript:bwClockUpdateDateTimeForm('hour','0',{$hour24})" />
1472       </map>
1473     </div>
1474   </xsl:template>
1475
1476   <!--++++++++++++++++++ Events ++++++++++++++++++++-->
1477   <xsl:template name="eventList">
1478     <h1>Pending Events</h1>
1479     <p>
1480       The events below are waiting to be published by a
1481       calendar administrator.  You may edit or delete the
1482       events until they have been accepted.  Once your
1483       event is published, you will no longer see it in your list.
1484     </p>
1485     <xsl:call-template name="eventListCommon"/>
1486   </xsl:template>
1487
1488   <xsl:template name="eventListCommon">
1489     <table id="commonListTable">
1490       <tr>
1491         <th>Title</th>
1492         <th>Claimed By</th>
1493         <th>Start</th>
1494         <th>End</th>
1495         <th>Topical Areas</th>
1496         <th>Description</th>
1497       </tr>
1498
1499       <xsl:for-each select="/bedework/events/event">
1500         <xsl:variable name="calPath" select="calendar/encodedPath"/>
1501         <xsl:variable name="guid" select="guid"/>
1502         <xsl:variable name="recurrenceId" select="recurrenceId"/>
1503         <tr>
1504           <td>
1505             <a href="{$editEvent}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
1506               <xsl:choose>
1507                 <xsl:when test="summary != ''">
1508                   <xsl:value-of select="summary"/>
1509                 </xsl:when>
1510                 <xsl:otherwise>
1511                   <em>no title</em>
1512                 </xsl:otherwise>
1513               </xsl:choose>
1514             </a>
1515           </td>
1516           <xsl:choose>
1517             <xsl:when test="xproperties/X-BEDEWORK-SUBMISSION-CLAIMANT">
1518               <td>
1519                 <xsl:value-of select="xproperties/X-BEDEWORK-SUBMISSION-CLAIMANT/values/text"/>
1520                 <xsl:text> </xsl:text>
1521                 (<xsl:value-of select="xproperties/X-BEDEWORK-SUBMISSION-CLAIMANT/parameters/X-BEDEWORK-SUBMISSION-CLAIMANT-USER"/>)
1522               </td>
1523             </xsl:when>
1524             <xsl:otherwise>
1525               <td class="unclaimed">unclaimed</td>
1526             </xsl:otherwise>
1527           </xsl:choose>
1528           <td class="date">
1529             <xsl:value-of select="start/shortdate"/>
1530             <xsl:text> </xsl:text>
1531             <xsl:value-of select="start/time"/>
1532           </td>
1533           <td class="date">
1534             <xsl:value-of select="end/shortdate"/>
1535             <xsl:text> </xsl:text>
1536             <xsl:value-of select="end/time"/>
1537           </td>
1538           <td>
1539             <xsl:for-each select="xproperties/X-BEDEWORK-SUBMIT-ALIAS">
1540               <xsl:call-template name="substring-afterLastInstanceOf">
1541                 <xsl:with-param name="string" select="values/text"/>
1542                 <xsl:with-param name="char">/</xsl:with-param>
1543               </xsl:call-template><br/>
1544             </xsl:for-each>
1545           </td>
1546           <td>
1547             <xsl:value-of select="description"/>
1548             <xsl:if test="recurring = 'true' or recurrenceId != ''">
1549               <div class="recurrenceEditLinks">
1550                 Recurring event.
1551                 Edit:
1552                 <a href="{$editEvent}&amp;calPath={$calPath}&amp;guid={$guid}">
1553                   master
1554                 </a> |
1555                 <a href="{$editEvent}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
1556                   instance
1557                 </a>
1558               </div>
1559             </xsl:if>
1560           </td>
1561         </tr>
1562       </xsl:for-each>
1563     </table>
1564   </xsl:template>
1565
1566   <!--==== UPLOAD ====-->
1567   <xsl:template name="upload">
1568   <!-- The name "eventForm" is referenced by several javascript functions. Do not
1569     change it without modifying bedework.js -->
1570     <form name="eventForm" method="post" action="{$upload}" id="standardForm"  enctype="multipart/form-data">
1571       <h2>Upload iCAL File</h2>
1572       <table class="common" cellspacing="0">
1573         <tr>
1574           <td class="fieldname">
1575             Filename:
1576           </td>
1577           <td align="left">
1578             <input type="file" name="uploadFile" size="60" />
1579           </td>
1580         </tr>
1581         <tr>
1582           <td class="fieldname padMeTop">
1583             Into calendar:
1584           </td>
1585           <td align="left" class="padMeTop">
1586             <input type="hidden" name="newCalPath" id="bwNewCalPathField" value=""/>
1587             <span id="bwEventCalDisplay">
1588               <em>default calendar</em>
1589             </span>
1590           </td>
1591         </tr>
1592         <tr>
1593           <td class="fieldname padMeTop">
1594             Effects free/busy:
1595           </td>
1596           <td align="left" class="padMeTop">
1597             <input type="radio" value="" name="transparency" checked="checked"/> accept event's settings<br/>
1598             <input type="radio" value="OPAQUE" name="transparency"/> yes <span class="note">(opaque: event status affects your free/busy)</span><br/>
1599             <input type="radio" value="TRANSPARENT" name="transparency"/> no <span class="note">(transparent: event status does not affect your free/busy)</span><br/>
1600           </td>
1601         </tr>
1602         <tr>
1603           <td class="fieldname padMeTop">
1604             Status:
1605           </td>
1606           <td align="left" class="padMeTop">
1607             <input type="radio" value="" name="status" checked="checked"/> accept event's status<br/>
1608             <input type="radio" value="CONFIRMED" name="status"/> confirmed<br/>
1609             <input type="radio" value="TENTATIVE" name="status"/> tentative<br/>
1610             <input type="radio" value="CANCELLED" name="status"/> canceled<br/>
1611           </td>
1612         </tr>
1613       </table>
1614       <table border="0" id="submitTable">
1615         <tr>
1616           <td>
1617             <input name="submit" type="submit" value="Continue"/>
1618             <input name="cancelled" type="submit" value="cancel"/>
1619           </td>
1620         </tr>
1621       </table>
1622     </form>
1623   </xsl:template>
1624
1625   <!--==== UTILITY TEMPLATES ====-->
1626
1627   <!-- time formatter (should be extended as needed) -->
1628   <xsl:template name="timeFormatter">
1629     <xsl:param name="timeString"/><!-- required -->
1630     <xsl:param name="showMinutes">yes</xsl:param>
1631     <xsl:param name="showAmPm">yes</xsl:param>
1632     <xsl:param name="hour24">no</xsl:param>
1633     <xsl:variable name="hour" select="number(substring($timeString,1,2))"/>
1634     <xsl:variable name="minutes" select="substring($timeString,3,2)"/>
1635     <xsl:variable name="AmPm">
1636       <xsl:choose>
1637         <xsl:when test="$hour &lt; 12">AM</xsl:when>
1638         <xsl:otherwise>PM</xsl:otherwise>
1639       </xsl:choose>
1640     </xsl:variable>
1641     <xsl:choose>
1642       <xsl:when test="hour24 = 'yes'">
1643         <xsl:value-of select="$hour"/><!--
1644      --><xsl:if test="$showMinutes = 'yes'">:<xsl:value-of select="$minutes"/></xsl:if>
1645       </xsl:when>
1646       <xsl:otherwise>
1647         <xsl:choose>
1648           <xsl:when test="$hour = 0">12</xsl:when>
1649           <xsl:when test="$hour &lt; 13"><xsl:value-of select="$hour"/></xsl:when>
1650           <xsl:otherwise><xsl:value-of select="$hour - 12"/></xsl:otherwise>
1651         </xsl:choose><!--
1652      --><xsl:if test="$showMinutes = 'yes'">:<xsl:value-of select="$minutes"/></xsl:if>
1653         <xsl:if test="$showAmPm = 'yes'">
1654           <xsl:text> </xsl:text>
1655           <xsl:value-of select="$AmPm"/>
1656         </xsl:if>
1657       </xsl:otherwise>
1658     </xsl:choose>
1659   </xsl:template>
1660
1661   <!--==== FOOTER ====-->
1662   <xsl:template name="footer">
1663     <div id="footer">
1664       Based on the <a href="http://www.bedework.org/">Bedework Calendar System</a>
1665     </div>
1666     <div id="subfoot">
1667       <a href="http://www.bedework.org/">Bedework Website</a> |
1668       <a href="?noxslt=yes">show XML</a> |
1669       <a href="?refreshXslt=yes">refresh XSLT</a>
1670     </div>
1671   </xsl:template>
1672
1673 </xsl:stylesheet>
Note: See TracBrowser for help on using the browser.