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

Revision 2057 (checked in by johnsa, 4 years ago)

UI: updating html default namespace

  • 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');</xsl:attribute>
114           </xsl:when>
115           <xsl:when test="/bedework/page = 'editEvent'">
116             <xsl:attribute name="onload">initRXDates();initXProperties();</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 content="text/html;charset=utf-8" http-equiv="Content-Type" />
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">
173             <xsl:comment>
174             $.datepicker.setDefaults({
175               constrainInput: true,
176               dateFormat: "yy-mm-dd",
177               showOn: "both",
178               buttonImage: "<xsl:value-of select='$resourcesRoot'/>/resources/calIcon.gif",
179               buttonImageOnly: true,
180               gotoCurrent: true,
181               duration: ""
182             });
183             </xsl:comment>
184           </script>
185         </xsl:otherwise>
186       </xsl:choose>
187       <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkEventForm.js">&#160;</script>
188       <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkXProperties.js">&#160;</script>
189     </xsl:if>
190     <script type="text/javascript">
191       <xsl:comment>
192       function focusElement(id) {
193       // focuses element by id
194         document.getElementById(id).focus();
195       }
196       function initRXDates() {
197         // return string values to be loaded into javascript for rdates
198         <xsl:for-each select="/bedework/formElements/form/rdates/rdate">
199           bwRdates.update('<xsl:value-of select="date"/>','<xsl:value-of select="time"/>',false,false,false,'<xsl:value-of select="tzid"/>');
200         </xsl:for-each>
201         // return string values to be loaded into javascript for exdates
202         <xsl:for-each select="/bedework/formElements/form/exdates/rdate">
203           bwExdates.update('<xsl:value-of select="date"/>','<xsl:value-of select="time"/>',false,false,false,'<xsl:value-of select="tzid"/>');
204         </xsl:for-each>
205       }
206       function initXProperties() {
207         <xsl:for-each select="/bedework/formElements/form/xproperties/node()[text()]">
208           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>');
209         </xsl:for-each>
210       }
211       </xsl:comment>
212     </script>
213   </xsl:template>
214
215   <!--==== HEADER TEMPLATES and NAVIGATION  ====-->
216
217   <xsl:template name="header">
218     <div id="header">
219       <a href="/bedework/">
220         <img id="logo"
221             alt="logo"
222             src="{$resourcesRoot}/resources/bedeworkAdminLogo.gif"
223             width="217"
224             height="40"
225             border="0"/>
226       </a>
227       <!-- set the page heading: -->
228       <h1>
229         Bedework Public Event Submission
230       </h1>
231     </div>
232     <div id="statusBar">
233       logged in as
234           <xsl:text> </xsl:text>
235           <strong><xsl:value-of select="/bedework/userid"/></strong>
236           <xsl:text> </xsl:text>
237           <span class="logout"><a href="{$setup}&amp;logout=true">logout</a></span>
238     </div>
239   </xsl:template>
240
241   <xsl:template name="messagesAndErrors">
242     <xsl:if test="/bedework/message">
243       <ul id="messages">
244         <xsl:for-each select="/bedework/message">
245           <li><xsl:apply-templates select="."/></li>
246         </xsl:for-each>
247       </ul>
248     </xsl:if>
249     <xsl:if test="/bedework/error">
250       <ul id="errors">
251         <xsl:for-each select="/bedework/error">
252           <li><xsl:apply-templates select="."/></li>
253         </xsl:for-each>
254       </ul>
255     </xsl:if>
256   </xsl:template>
257
258   <!--==== MENUTABS ====-->
259   <xsl:template name="menuTabs">
260     <ul id="menuTabs">
261       <xsl:choose>
262         <xsl:when test="/bedework/page='home'">
263           <li class="selected">Overview</li>
264           <li><a href="{$initEvent}">Add Event</a></li>
265           <li><a href="{$initPendingEvents}&amp;calPath={$submissionsRootEncoded}&amp;listAllEvents=true">My Pending Events</a></li>
266         </xsl:when>
267         <xsl:when test="/bedework/page='eventList'">
268           <li><a href="{$setup}">Overview</a></li>
269           <li><a href="{$initEvent}">Add Event</a></li>
270           <li class="selected">My Pending Events</li>
271         </xsl:when>
272         <xsl:otherwise>
273           <li><a href="{$setup}">Overview</a></li>
274           <li class="selected">Add Event</li>
275           <li><a href="{$initPendingEvents}&amp;calPath={$submissionsRootEncoded}&amp;listAllEvents=true">My Pending Events</a></li>
276         </xsl:otherwise>
277       </xsl:choose>
278     </ul>
279   </xsl:template>
280
281   <!--==== HOME ====-->
282   <xsl:template name="home">
283     <div class="navButtons navBox">
284       <a href="{$initEvent}">start
285         <img alt="previous"
286           src="{$resourcesRoot}/resources/arrowRight.gif"
287           width="13"
288           height="13"
289           border="0"/>
290       </a>
291     </div>
292     <h1>Entering Events</h1>
293     <ol id="introduction">
294       <li>
295         Before submitting a public event, <a href="/cal">see if it has already been
296         entered</a>. It is possible that an event may be created under a
297         different title than you'd expect.
298       </li>
299       <li>
300         Make your titles descriptive: rather than
301         "Lecture" use "Music Lecture Series: 'Uses of the
302         Neapolitan Chord'". "Cinema Club" would also be too vague,
303         while "Cinema Club: 'Citizen Kane'" is better. Bear in
304         mind that your event will "share the stage" with other events
305         in the calendar - try to be as clear as possible when
306         thinking of titles. Express not only what the event is, but
307         (briefly) what it's about. Elaborate on the event in the
308         description field, but try not to repeat the same
309         information.  Try to think like a user when suggesting an event:
310         use language that will explain your event to someone who knows
311         absolutely nothing about it.
312       </li>
313       <li>
314         Do not include locations and times in the description
315         field (unless it is to add extra information not already
316         displayed).
317       </li>
318     </ol>
319   </xsl:template>
320
321   <!--==== ADD EVENT ====-->
322   <xsl:template match="formElements" mode="addEvent">
323     <xsl:variable name="submitter">
324       <xsl:choose>
325         <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>
326         <xsl:otherwise><xsl:value-of select="/bedework/userid"/></xsl:otherwise>
327       </xsl:choose>
328     </xsl:variable>
329     <form name="eventForm" method="post" action="{$addEvent}" id="standardForm" onsubmit="setEventFields(this,{$portalFriendly},'{$submitter}');">
330       <xsl:apply-templates select="." mode="eventForm"/>
331     </form>
332   </xsl:template>
333
334   <!--==== EDIT EVENT ====-->
335   <xsl:template match="formElements" mode="editEvent">
336     <xsl:variable name="submitter">
337       <xsl:choose>
338         <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>
339         <xsl:otherwise><xsl:value-of select="/bedework/userid"/></xsl:otherwise>
340       </xsl:choose>
341     </xsl:variable>
342     <form name="eventForm" method="post" action="{$updateEvent}" id="standardForm" onsubmit="setEventFields(this,{$portalFriendly},'{$submitter}');">
343       <xsl:apply-templates select="." mode="eventForm"/>
344     </form>
345   </xsl:template>
346
347
348   <!--==== ADD and EDIT EVENT FORM ====-->
349   <xsl:template match="formElements" mode="eventForm">
350     <xsl:variable name="subscriptionId" select="subscriptionId"/>
351     <xsl:variable name="calPathEncoded" select="form/calendar/encodedPath"/>
352     <xsl:variable name="calPath" select="form/calendar/path"/>
353     <xsl:variable name="guid" select="guid"/>
354     <xsl:variable name="recurrenceId" select="recurrenceId"/>
355     <!-- comment field to hold the user's suggestions:  -->
356     <input type="hidden" name="xbwsubmitcomment" id="bwEventComment" value=""/>
357
358       <!-- event info for edit event -->
359       <xsl:if test="/bedework/creating != 'true'">
360
361         <table class="common" cellspacing="0">
362           <tr>
363             <th colspan="2" class="commonHeader">
364               <div id="eventActions">
365                 <xsl:choose>
366                   <xsl:when test="recurrenceId != ''">
367                     <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/>
368                     Delete:
369                     <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="delete master (recurring event)">all</a>,
370                     <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete instance (recurring event)">instance</a>
371                   </xsl:when>
372                   <xsl:otherwise>
373                     <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete event">
374                       <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/>
375                       Delete
376                       <xsl:if test="form/recurringEntity='true'">
377                         all
378                       </xsl:if>
379                     </a>
380                   </xsl:otherwise>
381                 </xsl:choose>
382               </div>
383               <!-- Display type of event -->
384               <xsl:variable name="entityType">
385                 <xsl:choose>
386                   <xsl:when test="entityType = '2'">Task</xsl:when>
387                   <xsl:when test="scheduleMethod = '2'">Meeting</xsl:when>
388                   <xsl:otherwise>Event</xsl:otherwise>
389                 </xsl:choose>
390               </xsl:variable>
391               <xsl:if test="form/recurringEntity='true' or recurrenceId != ''">
392                 Recurring
393               </xsl:if>
394               <xsl:choose>
395                 <xsl:when test="form">
396                   <!-- just a placeholder: need to add owner to the jsp -->
397                   Personal <xsl:value-of select="$entityType"/>
398                 </xsl:when>
399                 <xsl:when test="public = 'true'">
400                   Public <xsl:value-of select="$entityType"/>
401                 </xsl:when>
402                 <xsl:otherwise>
403                   <xsl:value-of select="$entityType"/> (<xsl:value-of select="calendar/owner"/>)
404                 </xsl:otherwise>
405               </xsl:choose>
406               <xsl:if test="form/recurringEntity='true' and recurrenceId = ''">
407                 <xsl:text> </xsl:text>
408                 <em>(recurrence master)</em>
409               </xsl:if>
410             </th>
411           </tr>
412         </table>
413       </xsl:if>
414
415     <div id="instructions">
416       <div id="bwHelp-Details">
417         <div class="navButtons">
418           <a href="javascript:show('bwEventTab-Location','bwHelp-Location','bwBottomNav-Location');hide('bwEventTab-Details','bwHelp-Details','bwBottomNav-Details');"
419              onclick="return validateStep1();">
420             next
421             <img alt="previous"
422               src="{$resourcesRoot}/resources/arrowRight.gif"
423               width="13"
424               height="13"
425               border="0"/>
426           </a>
427         </div>
428         <strong>Step 1:</strong> Enter Event Details. <em>Optional fields are italicized.</em>
429       </div>
430       <div id="bwHelp-Location" class="invisible">
431         <div class="navButtons">
432           <a href="javascript:show('bwEventTab-Details','bwHelp-Details','bwBottomNav-Details'); hide('bwEventTab-Location','bwHelp-Location','bwBottomNav-Location');">
433             <img alt="previous"
434               src="{$resourcesRoot}/resources/arrowLeft.gif"
435               width="13"
436               height="13"
437               border="0"/>
438           previous</a> |
439           <a href="javascript:show('bwEventTab-Contact','bwHelp-Contact','bwBottomNav-Contact'); hide('bwEventTab-Location','bwHelp-Location','bwBottomNav-Location');"
440              onclick="return validateStep2();">
441             next
442             <img alt="previous"
443               src="{$resourcesRoot}/resources/arrowRight.gif"
444               width="13"
445               height="13"
446               border="0"/>
447           </a>
448         </div>
449         <strong>Step 2:</strong> Select Location.
450       </div>
451       <div id="bwHelp-Contact" class="invisible">
452         <div class="navButtons">
453           <a href="javascript:show('bwEventTab-Location','bwHelp-Location','bwBottomNav-Location'); hide('bwHelp-Contact','bwEventTab-Contact','bwBottomNav-Contact');">
454             <img alt="previous"
455               src="{$resourcesRoot}/resources/arrowLeft.gif"
456               width="13"
457               height="13"
458               border="0"/>
459           previous</a> |
460           <a href="javascript:show('bwEventTab-Categories','bwHelp-Categories','bwBottomNav-Categories'); hide('bwHelp-Contact','bwEventTab-Contact','bwBottomNav-Contact');"
461              onclick="return validateStep3();">
462             next
463             <img alt="previous"
464               src="{$resourcesRoot}/resources/arrowRight.gif"
465               width="13"
466               height="13"
467               border="0"/>
468           </a>
469         </div>
470         <strong>Step 3:</strong> Select Contact.
471       </div>
472       <div id="bwHelp-Categories" class="invisible">
473         <div class="navButtons">
474           <a href="javascript:show('bwEventTab-Contact','bwHelp-Contact','bwBottomNav-Contact'); hide('bwHelp-Categories','bwEventTab-Categories','bwBottomNav-Categories');">
475             <img alt="previous"
476               src="{$resourcesRoot}/resources/arrowLeft.gif"
477               width="13"
478               height="13"
479               border="0"/>
480           previous</a> |
481           <a href="javascript:show('bwHelp-Review','bwEventTab-Review','bwBottomNav-Review'); hide('bwHelp-Categories','bwEventTab-Categories','bwBottomNav-Categories'); ">
482             next
483             <img alt="previous"
484               src="{$resourcesRoot}/resources/arrowRight.gif"
485               width="13"
486               height="13"
487               border="0"/>
488           </a>
489         </div>
490         <strong>Step 4:</strong> Select Categories. <em>Optional.</em>
491       </div>
492       <div id="bwHelp-Review" class="invisible">
493         <div class="navButtons">
494           <a href="javascript:show('bwHelp-Categories','bwEventTab-Categories','bwBottomNav-Categories'); hide('bwHelp-Review','bwEventTab-Review','bwBottomNav-Review'); ">
495             <img alt="previous"
496               src="{$resourcesRoot}/resources/arrowLeft.gif"
497               width="13"
498               height="13"
499               border="0"/>
500           previous</a>
501           <span class="hidden">
502             <!-- this is here just to take up the appropriate space  -->
503             <xsl:text> </xsl:text>| next
504             <img alt="previous"
505               src="{$resourcesRoot}/resources/arrowRight.gif"
506               width="13"
507               height="13"
508               border="0"/>
509           </span>
510         </div>
511         <strong>Step 5:</strong> Add Comments. <em>Optional.</em>
512       </div>
513     </div>
514
515     <div id="eventFormContent">
516       <!-- Basic tab -->
517       <!-- ============== -->
518       <!-- this tab is visible by default -->
519       <div id="bwEventTab-Details">
520         <table cellspacing="0" class="common">
521           <!-- Calendar -->
522           <!-- ======== -->
523           <xsl:variable name="submissionCalendars">
524             <xsl:value-of select="count(/bedework/myCalendars//calendar[calType='1'])"/>
525           </xsl:variable>
526           <tr>
527             <xsl:if test="$submissionCalendars = 1">
528               <xsl:attribute name="class">invisible</xsl:attribute>
529               <!-- hide this row altogether if there is only one calendar; if you want the calendar
530                    path displayed, comment out this xsl:if. -->
531             </xsl:if>
532             <td class="fieldname">
533               Calendar:
534             </td>
535             <td class="fieldval">
536               <xsl:choose>
537                 <xsl:when test="$submissionCalendars = 1">
538                   <!-- there is only 1 writable calendar, just send a hidden field -->
539                   <xsl:variable name="newCalPath"><xsl:value-of select="/bedework/myCalendars//calendar[calType='1']/path"/></xsl:variable>
540                   <input type="hidden" name="newCalPath" value="{$newCalPath}"/>
541                   <span id="bwEventCalDisplay">
542                     <xsl:value-of select="$newCalPath"/>
543                   </span>
544                 </xsl:when>
545                 <xsl:otherwise>
546                   <select name="newCalPath" id="bwNewCalPathField">
547                     <xsl:for-each select="/bedework/myCalendars//calendar[calType='1']">
548                       <option>
549                         <xsl:attribute name="value"><xsl:value-of select="path"/></xsl:attribute>
550                         <xsl:value-of select="substring-after(substring-after(path,/bedework/submissionsRoot/unencoded),'/')"/>
551                       </option>
552                     </xsl:for-each>
553                   </select>
554                 </xsl:otherwise>
555               </xsl:choose>
556             </td>
557           </tr>
558           <!--  Summary (title) of event  -->
559           <!--  ========================= -->
560           <tr>
561             <td class="fieldname">
562               Title:
563             </td>
564             <td class="fieldval">
565               <div id="bwEventTitleNotice" class="invisible">You must include a title.</div> <!-- a holder for validation notes -->
566               <xsl:variable name="title" select="form/title/input/@value"/>
567               <input type="text" name="summary" size="80" value="{$title}" id="bwEventTitle"/>
568             </td>
569           </tr>
570
571           <!--  Date and Time -->
572           <!--  ============= -->
573           <tr>
574             <td class="fieldname">
575               Date &amp; Time:
576             </td>
577             <td class="fieldval">
578               <!-- Set the timefields class for the first load of the page;
579                    subsequent changes will take place using javascript without a
580                    page reload. -->
581               <xsl:variable name="timeFieldsClass">
582                 <xsl:choose>
583                   <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when>
584                   <xsl:otherwise>timeFields</xsl:otherwise>
585                 </xsl:choose>
586               </xsl:variable>
587
588               <!-- date only event: anniversary event - often interpreted as "all day event" -->
589               <xsl:choose>
590                 <xsl:when test="form/allDay/input/@checked='checked'">
591                   <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/>
592                   <input type="hidden" name="eventStartDate.dateOnly" value="true" id="allDayStartDateField"/>
593                   <input type="hidden" name="eventEndDate.dateOnly" value="true" id="allDayEndDateField"/>
594                 </xsl:when>
595                 <xsl:otherwise>
596                   <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/>
597                   <input type="hidden" name="eventStartDate.dateOnly" value="false" id="allDayStartDateField"/>
598                   <input type="hidden" name="eventEndDate.dateOnly" value="false" id="allDayEndDateField"/>
599                 </xsl:otherwise>
600               </xsl:choose>
601               all day
602
603               <!-- HIDE floating event: no timezone (and not UTC)
604               <xsl:choose>
605                 <xsl:when test="form/floating/input/@checked='checked'">
606                   <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="on" checked="checked"/>
607                   <input type="hidden" name="eventStartDate.floating" value="true" id="startFloating"/>
608                   <input type="hidden" name="eventEndDate.floating" value="true" id="endFloating"/>
609                 </xsl:when>
610                 <xsl:otherwise>
611                   <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="off"/>
612                   <input type="hidden" name="eventStartDate.floating" value="false" id="startFloating"/>
613                   <input type="hidden" name="eventEndDate.floating" value="false" id="endFloating"/>
614                 </xsl:otherwise>
615               </xsl:choose>
616               floating -->
617
618               <!-- HIDE store time as coordinated universal time (UTC)
619               <xsl:choose>
620                 <xsl:when test="form/storeUTC/input/@checked='checked'">
621                   <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="on" checked="checked"/>
622                   <input type="hidden" name="eventStartDate.storeUTC" value="true" id="startStoreUTC"/>
623                   <input type="hidden" name="eventEndDate.storeUTC" value="true" id="endStoreUTC"/>
624                 </xsl:when>
625                 <xsl:otherwise>
626                   <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="off"/>
627                   <input type="hidden" name="eventStartDate.storeUTC" value="false" id="startStoreUTC"/>
628                   <input type="hidden" name="eventEndDate.storeUTC" value="false" id="endStoreUTC"/>
629                 </xsl:otherwise>
630               </xsl:choose>
631               store as UTC-->
632
633               <br/>
634               <div class="dateStartEndBox">
635                 <strong>Start:</strong>
636                 <div class="dateFields">
637                   <span class="startDateLabel">Date </span>
638                   <xsl:choose>
639                     <xsl:when test="$portalFriendly = 'true'">
640                       <xsl:copy-of select="/bedework/formElements/form/start/month/*"/>
641                       <xsl:copy-of select="/bedework/formElements/form/start/day/*"/>
642                       <xsl:choose>
643                         <xsl:when test="/bedework/creating = 'true'">
644                           <xsl:copy-of select="/bedework/formElements/form/start/year/*"/>
645                         </xsl:when>
646                         <xsl:otherwise>
647                           <xsl:copy-of select="/bedework/formElements/form/start/yearText/*"/>
648                         </xsl:otherwise>
649                       </xsl:choose>
650                       <script language="JavaScript" type="text/javascript">
651                         <xsl:comment>
652                         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/');
653                         </xsl:comment>
654                       </script>
655                     </xsl:when>
656                     <xsl:otherwise>
657                       <!-- span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetStartDate" iconURL="{$resourcesRoot}/resources/calIcon.gif">
658                       <xsl:attribute name="value"><xsl:value-of select="form/start/rfc3339DateTime"/></xsl:attribute>
659                       <xsl:text> </xsl:text>
660                       </span -->
661                       <input type="text" name="bwEventWidgetStartDate" id="bwEventWidgetStartDate" size="10"/>
662                       <script language="JavaScript" type="text/javascript">
663                         <xsl:comment>
664                         $("#bwEventWidgetStartDate").datepicker({
665                           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"/>)
666                         }).attr("readonly", "readonly");
667                         $("#bwEventWidgetStartDate").val('<xsl:value-of select="substring-before(form/start/rfc3339DateTime,'T')"/>');
668                         //alert($("#bwEventWidgetStartDate").datepicker("getDate"));
669                         </xsl:comment>
670                       </script>
671                       <input type="hidden" name="eventStartDate.year">
672                         <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute>
673                       </input>
674                       <input type="hidden" name="eventStartDate.month">
675                         <xsl:attribute name="value"><xsl:value-of select="form/start/month/select/option[@selected = 'selected']/@value"/></xsl:attribute>
676                       </input>
677                       <input type="hidden" name="eventStartDate.day">
678                         <xsl:attribute name="value"><xsl:value-of select="form/start/day/select/option[@selected = 'selected']/@value"/></xsl:attribute>
679                       </input>
680                     </xsl:otherwise>
681                   </xsl:choose>
682                 </div>
683                 <div class="{$timeFieldsClass}" id="startTimeFields">
684                   <span id="calWidgetStartTimeHider" class="show">
685                     <xsl:copy-of select="form/start/hour/*"/>
686                     <xsl:copy-of select="form/start/minute/*"/>
687                     <xsl:if test="form/start/ampm">
688                       <xsl:copy-of select="form/start/ampm/*"/>
689                     </xsl:if>
690                     <xsl:text> </xsl:text>
691                     <a href="javascript:bwClockLaunch('eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0" alt="bwClock"/></a>
692
693                     <select name="eventStartDate.tzid" id="startTzid" class="timezones">
694                       <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if>
695                       <option value="-1">select timezone...</option>
696                       <xsl:variable name="startTzId" select="form/start/tzid"/>
697                       <xsl:for-each select="/bedework/timezones/timezone">
698                         <option>
699                           <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute>
700                           <xsl:if test="$startTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if>
701                           <xsl:value-of select="name"/>
702                         </option>
703                       </xsl:for-each>
704                     </select>
705                   </span>
706                 </div>
707               </div>
708               <div class="dateStartEndBox">
709                 <strong>
710                   <xsl:choose>
711                     <xsl:when test="form/entityType = '2'">Due:</xsl:when>
712                     <xsl:otherwise>End:</xsl:otherwise>
713                   </xsl:choose>
714                 </strong>
715                 <xsl:choose>
716                   <xsl:when test="form/end/type='E'">
717                     <input type="radio" name="eventEndType" value="E" checked="checked" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/>
718                   </xsl:when>
719                   <xsl:otherwise>
720                     <input type="radio" name="eventEndType" value="E" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/>
721                   </xsl:otherwise>
722                 </xsl:choose>
723                 Date
724                 <xsl:variable name="endDateTimeClass">
725                   <xsl:choose>
726                     <xsl:when test="form/end/type='E'">shown</xsl:when>
727                     <xsl:otherwise>invisible</xsl:otherwise>
728                   </xsl:choose>
729                 </xsl:variable>
730                 <div class="{$endDateTimeClass}" id="endDateTime">
731                   <div class="dateFields">
732                     <xsl:choose>
733                       <xsl:when test="$portalFriendly = 'true'">
734                         <xsl:copy-of select="/bedework/formElements/form/end/dateTime/month/*"/>
735                         <xsl:copy-of select="/bedework/formElements/form/end/dateTime/day/*"/>
736                         <xsl:choose>
737                           <xsl:when test="/bedework/creating = 'true'">
738                             <xsl:copy-of select="/bedework/formElements/form/end/dateTime/year/*"/>
739                           </xsl:when>
740                           <xsl:otherwise>
741                             <xsl:copy-of select="/bedework/formElements/form/end/dateTime/yearText/*"/>
742                           </xsl:otherwise>
743                         </xsl:choose>
744                         <script language="JavaScript" type="text/javascript">
745                         <xsl:comment>
746                           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/');
747                         </xsl:comment>
748                         </script>
749                       </xsl:when>
750                       <xsl:otherwise>
751                         <!-- span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetEndDate" iconURL="{$resourcesRoot}/resources/calIcon.gif">
752                           <xsl:attribute name="value"><xsl:value-of select="form/end/rfc3339DateTime"/></xsl:attribute>
753                           <xsl:text> </xsl:text>
754                         </span-->
755                         <input type="text" name="bwEventWidgetEndDate" id="bwEventWidgetEndDate" size="10"/>
756                         <script language="JavaScript" type="text/javascript">
757                           <xsl:comment>
758                           $("#bwEventWidgetEndDate").datepicker({
759                             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"/>)
760                           }).attr("readonly", "readonly");
761                           $("#bwEventWidgetEndDate").val('<xsl:value-of select="substring-before(form/end/rfc3339DateTime,'T')"/>');
762                           </xsl:comment>
763                         </script>
764                         <input type="hidden" name="eventEndDate.year">
765                           <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/yearText/input/@value"/></xsl:attribute>
766                         </input>
767                         <input type="hidden" name="eventEndDate.month">
768                           <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/month/select/option[@selected = 'selected']/@value"/></xsl:attribute>
769                         </input>
770                         <input type="hidden" name="eventEndDate.day">
771                           <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/day/select/option[@selected = 'selected']/@value"/></xsl:attribute>
772                         </input>
773                       </xsl:otherwise>
774                     </xsl:choose>
775                   </div>
776                   <div class="{$timeFieldsClass}" id="endTimeFields">
777                     <span id="calWidgetEndTimeHider" class="show">
778                       <xsl:copy-of select="form/end/dateTime/hour/*"/>
779                       <xsl:copy-of select="form/end/dateTime/minute/*"/>
780                       <xsl:if test="form/end/dateTime/ampm">
781                         <xsl:copy-of select="form/end/dateTime/ampm/*"/>
782                       </xsl:if>
783                       <xsl:text> </xsl:text>
784                       <a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0" alt="bwClock"/></a>
785
786                       <select name="eventEndDate.tzid" id="endTzid" class="timezones">
787                         <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if>
788                         <option value="-1">select timezone...</option>
789                         <xsl:variable name="endTzId" select="form/end/dateTime/tzid"/>
790                         <xsl:for-each select="/bedework/timezones/timezone">
791                           <option>
792                             <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute>
793                               <xsl:if test="$endTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if>
794                             <xsl:value-of select="name"/>
795                           </option>
796                         </xsl:for-each>
797                       </select>
798                     </span>
799                   </div>
800                 </div><br/>
801                 <div id="clock" class="invisible">
802                   <xsl:call-template name="clock"/>
803                 </div>
804                 <div class="dateFields">
805                   <xsl:choose>
806                     <xsl:when test="form/end/type='D'">
807                       <input type="radio" name="eventEndType" value="D" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/>
808                     </xsl:when>
809                     <xsl:otherwise>
810                       <input type="radio" name="eventEndType" value="D" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/>
811                     </xsl:otherwise>
812                   </xsl:choose>
813                   Duration
814                   <xsl:variable name="endDurationClass">
815                     <xsl:choose>
816                       <xsl:when test="form/end/type='D'">shown</xsl:when>
817                       <xsl:otherwise>invisible</xsl:otherwise>
818                     </xsl:choose>
819                   </xsl:variable>
820                   <xsl:variable name="durationHrMinClass">
821                     <xsl:choose>
822                       <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when>
823                       <xsl:otherwise>shown</xsl:otherwise>
824                     </xsl:choose>
825                   </xsl:variable>
826                   <div class="{$endDurationClass}" id="endDuration">
827                     <xsl:choose>
828                       <xsl:when test="form/end/duration/weeks/input/@value = '0'">
829                       <!-- we are using day, hour, minute format -->
830                       <!-- must send either no week value or week value of 0 (zero) -->
831                         <div class="durationBox">
832                           <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')" checked="checked"/>
833                           <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/>
834                           <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays"/>days
835                           <span id="durationHrMin" class="{$durationHrMinClass}">
836                             <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/>
837                             <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours"/>hours
838                             <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/>
839                             <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes"/>minutes
840                           </span>
841                         </div>
842                         <span class="durationSpacerText">or</span>
843                         <div class="durationBox">
844                           <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/>
845                           <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/>
846                           <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="disabled"/>weeks
847                         </div>
848                       </xsl:when>
849                       <xsl:otherwise>
850                         <!-- we are using week format -->
851                         <div class="durationBox">
852                           <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/>
853                           <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/>
854                           <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="disabled"/>days
855                           <span id="durationHrMin" class="{$durationHrMinClass}">
856                             <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/>
857                             <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="disabled"/>hours
858                             <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/>
859                             <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="disabled"/>minutes
860                           </span>
861                         </div>
862                         <span class="durationSpacerText">or</span>
863                         <div class="durationBox">
864                           <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')" checked="checked"/>
865                           <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/>
866                           <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks"/>weeks
867                         </div>
868                       </xsl:otherwise>
869                     </xsl:choose>
870                   </div>
871                 </div><br/>
872                 <div class="dateFields" id="noDuration">
873                   <xsl:choose>
874                     <xsl:when test="form/end/type='N'">
875                       <input type="radio" name="eventEndType" value="N" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/>
876                     </xsl:when>
877                     <xsl:otherwise>
878                       <input type="radio" name="eventEndType" value="N" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/>
879                     </xsl:otherwise>
880                   </xsl:choose>
881                   This
882                   <xsl:choose>
883                     <xsl:when test="form/entityType = '2'">task</xsl:when>
884                     <xsl:otherwise>event</xsl:otherwise>
885                   </xsl:choose>
886                   has no duration / end date
887                 </div>
888               </div>
889             </td>
890           </tr>
891
892           <!--  Description  -->
893           <tr>
894             <td class="fieldname">Description:</td>
895             <td class="fieldval">
896               <div id="bwEventDescNotice" class="invisible">You must include a description.</div> <!-- a holder for validation notes -->
897               <xsl:choose>
898                 <xsl:when test="normalize-space(form/desc/textarea) = ''">
899                   <textarea name="description" cols="60" rows="4" id="bwEventDesc">
900                     <xsl:text> </xsl:text>
901                   </textarea>
902                   <!-- keep this space to avoid browser
903                   rendering errors when the text area is empty -->
904                 </xsl:when>
905                 <xsl:otherwise>
906                   <textarea name="description" cols="60" rows="4" id="bwEventDesc">
907                     <xsl:value-of select="form/desc/textarea"/>
908                   </textarea>
909                 </xsl:otherwise>
910               </xsl:choose>
911             </td>
912           </tr>
913           <!--  Status  -->
914           <tr>
915             <td class="fieldname">
916               Status:
917             </td>
918             <td class="fieldval">
919               <input type="radio" name="eventStatus" value="CONFIRMED">
920                 <xsl:if test="form/status = 'CONFIRMED' or /bedework/creating = 'true' or form/status = ''"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
921               </input>
922               confirmed
923               <input type="radio" name="eventStatus" value="TENTATIVE">
924                 <xsl:if test="form/status = 'TENTATIVE'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
925               </input>
926               tentative
927               <input type="radio" name="eventStatus" value="CANCELLED">
928                 <xsl:if test="form/status = 'CANCELLED'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
929               </input>
930               cancelled
931             </td>
932           </tr>
933           <!-- Cost -->
934           <tr>
935             <td class="fieldname"><em>Cost:</em></td>
936             <td class="fieldval">
937               <input type="text" name="event.cost" size="30" value="">
938                 <xsl:attribute name="value"><xsl:value-of select="form/cost/input/@value"/></xsl:attribute>
939               </input>
940               <span class="note"> optional: if any, and place to purchase tickets</span>
941             </td>
942           </tr>
943           <!--  Link (url associated with event)  -->
944           <tr>
945             <td class="fieldname"><em>Event URL:</em></td>
946             <td class="fieldval">
947               <input type="text" name="event.link" size="30" value="">
948                 <xsl:attribute name="value"><xsl:value-of select="form/link/input/@value"/></xsl:attribute>
949               </input>
950               <span class="note"> optional: for more information about the event</span>
951             </td>
952           </tr>
953           <!-- Image Url -->
954           <tr>
955             <td class="fieldname"><em>Image URL:</em></td>
956             <td class="fieldval">
957               <input type="text" name="xBwImageHolder" size="30" value="">
958                 <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-IMAGE']/values/text"/></xsl:attribute>
959               </input>
960               <xsl:text> </xsl:text>
961               <span class="note"> optional: to include an image with the event description</span>
962             </td>
963           </tr>
964         </table>
965       </div>
966
967       <!-- Location tab -->
968       <!-- ============== -->
969       <div id="bwEventTab-Location" class="invisible">
970         <div id="bwLocationUidNotice" class="invisible">You must either select a location or suggest one below.</div>
971         <div class="mainForm">
972           <span id="eventFormLocationList">
973             <select name="locationUid" class="bigSelect" id="bwLocationUid">
974               <option value="">select an existing location...</option>
975               <xsl:copy-of select="form/location/locationmenu/select/*"/>
976             </select>
977           </span>
978         </div>
979         <p class="subFormMessage">
980           Didn't find the location?  Suggest a new one:
981         </p>
982         <div class="subForm">
983           <p>
984             <label for="commentLocationAddress">Address: </label>
985             <input type="text" name="commentLocationAddress" id="bwCommentLocationAddress">
986               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/values/text"/></xsl:attribute>
987             </input>
988           </p>
989           <p>
990             <label for="commentLocationSubaddress"><em>Sub-address:</em> </label>
991             <input type="text" name="commentLocationSubaddress" id="commentLocationSubaddress">
992               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/parameters/node()[name()='X-BEDEWORK-PARAM-SUBADDRESS']"/></xsl:attribute>
993             </input>
994             <span class="note"> optional</span>
995           </p>
996           <p>
997             <label for="commentLocationURL"><em>URL:</em> </label>
998             <input type="text" name="commentLocationURL" id="commentLocationURL">
999               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/parameters/node()[name()='X-BEDEWORK-PARAM-URL']"/></xsl:attribute>
1000             </input>
1001             <span class="note"> optional</span>
1002           </p>
1003         </div>
1004       </div>
1005
1006       <!-- Contact tab -->
1007       <!-- ============== -->
1008       <div id="bwEventTab-Contact" class="invisible">
1009         <div id="bwContactUidNotice" class="invisible">You must either select a contact or suggest one below.</div>
1010         <div class="mainForm">
1011           <select name="contactUid" id="bwContactUid" class="bigSelect">
1012             <option value="">
1013               select an existing contact...
1014             </option>
1015             <xsl:copy-of select="form/contact/all/select/*"/>
1016           </select>
1017         </div>
1018         <p class="subFormMessage">
1019           Didn't find the contact you need?  Suggest a new one:
1020         </p>
1021         <div class="subForm">
1022           <p>
1023             <label for="commentContactName">Organization Name: </label>
1024             <input type="text" name="commentContactName" id="bwCommentContactName" size="40">
1025               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/values/text"/></xsl:attribute>
1026             </input>
1027             <span class="note"> Please limit contacts to organizations, not individuals.</span>
1028           </p>
1029           <p>
1030             <label for="commentContactPhone"><em>Phone:</em> </label>
1031             <input type="text" name="commentContactPhone">
1032               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-PHONE']"/></xsl:attribute>
1033             </input>
1034             <span class="note"> optional</span>
1035           </p>
1036           <p>
1037             <label for="commentContactURL"><em>URL:</em> </label>
1038             <input type="text" name="commentContactURL">
1039               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-URL']"/></xsl:attribute>
1040             </input>
1041             <span class="note"> optional</span>
1042           </p>
1043           <p>
1044             <label for="commentContactEmail"><em>Email:</em> </label>
1045             <input type="text" name="commentContactEmail">
1046               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-EMAIL']"/></xsl:attribute>
1047             </input>
1048             <span class="note"> optional</span>
1049           </p>
1050         </div>
1051       </div>
1052
1053       <!-- Categories tab -->
1054       <!-- ============== -->
1055       <div id="bwEventTab-Categories" class="invisible">
1056         <xsl:variable name="catCount" select="count(form/categories/all/category)"/>
1057         <xsl:choose>
1058           <xsl:when test="not(form/categories/all/category)">
1059             no categories defined
1060           </xsl:when>
1061           <xsl:otherwise>
1062             <table cellpadding="0" id="allCategoryCheckboxes">
1063               <tr>
1064                 <td>
1065                   <xsl:for-each select="form/categories/all/category[position() &lt;= ceiling($catCount div 2)]">
1066                     <input type="checkbox" name="categoryKey">
1067                       <xsl:attribute name="value"><xsl:value-of select="keyword"/></xsl:attribute>
1068                       <xsl:if test="keyword = ../../current//category/keyword"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
1069                       <xsl:value-of select="keyword"/>
1070                     </input><br/>
1071                   </xsl:for-each>
1072                 </td>
1073                 <td>
1074                   <xsl:for-each select="form/categories/all/category[position() &gt; ceiling($catCount div 2)]">
1075                     <input type="checkbox" name="categoryKey">
1076                       <xsl:attribute name="value"><xsl:value-of select="keyword"/></xsl:attribute>
1077                       <xsl:if test="keyword = ../../current//category/keyword"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
1078                       <xsl:value-of select="keyword"/>
1079                     </input><br/>
1080                   </xsl:for-each>
1081                 </td>
1082               </tr>
1083             </table>
1084           </xsl:otherwise>
1085         </xsl:choose>
1086         <p class="subFormMessage">
1087           Didn't find the category you want?  Suggest a new one:
1088         </p>
1089         <div class="subForm">
1090           <p>
1091             <label for="commentCategories">Category suggestion: </label>
1092             <input type="text" name="commentCategories" size="30">
1093               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-CATEGORIES']/values/text"/></xsl:attribute>
1094             </input>
1095           </p>
1096         </div>
1097       </div>
1098
1099       <!--   Review tab   -->
1100       <!-- ============== -->
1101       <div id="bwEventTab-Review" class="invisible">
1102         <!--  <table id="bwEventSubmitReview" class="common">
1103           <tr>
1104             <th colspan="2">Event Details</th>
1105           </tr>-->
1106           <!-- the form elements will be inserted here -->
1107         <!-- </table>-->
1108         <div id="bwCommentNotes">
1109           Please supply any final notes or instructions regarding your event:<br/>
1110           <!-- note: don't remove the #160 from the textarea or browsers will see it as a closed tag when empty -->
1111           <textarea name="commentNotes" cols="60" rows="4"><!--
1112            --><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/values/text"/>&#160;<!--
1113            --></textarea>
1114         </div>
1115         <div class="eventSubmitButtons">
1116           <input name="submit" class="submit" type="submit" value="submit for approval"/>
1117           <input name="cancelled" type="submit" value="cancel"/>
1118         </div>
1119       </div>
1120     </div>
1121
1122     <div id="bwBottomNav">
1123       <div id="bwBottomNav-Details">
1124         <div class="navButtons">
1125           <a href="javascript:show('bwEventTab-Location','bwHelp-Location','bwBottomNav-Location'); hide('bwEventTab-Details','bwHelp-Details','bwBottomNav-Details');">
1126             next
1127             <img alt="previous"
1128               src="{$resourcesRoot}/resources/arrowRight.gif"
1129               width="13"
1130               height="13"
1131               border="0"/>
1132           </a>
1133         </div>
1134       </div>
1135       <div id="bwBottomNav-Location" class="invisible">
1136         <div class="navButtons">
1137           <a href="javascript:show('bwEventTab-Details','bwHelp-Details','bwBottomNav-Details'); hide('bwEventTab-Location','bwHelp-Location','bwBottomNav-Location');">
1138             <img alt="previous"
1139               src="{$resourcesRoot}/resources/arrowLeft.gif"
1140               width="13"
1141               height="13"
1142               border="0"/>
1143           previous</a> |
1144           <a href="javascript:show('bwEventTab-Contact','bwHelp-Contact','bwBottomNav-Contact'); hide('bwEventTab-Location','bwHelp-Location','bwBottomNav-Location');">
1145             next
1146             <img alt="previous"
1147               src="{$resourcesRoot}/resources/arrowRight.gif"
1148               width="13"
1149               height="13"
1150               border="0"/>
1151           </a>
1152         </div>
1153       </div>
1154       <div id="bwBottomNav-Contact" class="invisible">
1155         <div class="navButtons">
1156           <a href="javascript:show('bwEventTab-Location','bwHelp-Location','bwBottomNav-Location'); hide('bwHelp-Contact','bwEventTab-Contact','bwBottomNav-Contact');">
1157             <img alt="previous"
1158               src="{$resourcesRoot}/resources/arrowLeft.gif"
1159               width="13"
1160               height="13"
1161               border="0"/>
1162           previous</a> |
1163           <a href="javascript:show('bwEventTab-Categories','bwHelp-Categories','bwBottomNav-Categories'); hide('bwHelp-Contact','bwEventTab-Contact','bwBottomNav-Contact');">
1164             next
1165             <img alt="previous"
1166               src="{$resourcesRoot}/resources/arrowRight.gif"
1167               width="13"
1168               height="13"
1169               border="0"/>
1170           </a>
1171         </div>
1172       </div>
1173       <div id="bwBottomNav-Categories" class="invisible">
1174         <div class="navButtons">
1175           <a href="javascript:show('bwEventTab-Contact','bwHelp-Contact','bwBottomNav-Contact'); hide('bwHelp-Categories','bwEventTab-Categories','bwBottomNav-Categories');">
1176             <img alt="previous"
1177               src="{$resourcesRoot}/resources/arrowLeft.gif"
1178               width="13"
1179               height="13"
1180               border="0"/>
1181           previous</a> |
1182           <a href="javascript:show('bwHelp-Review','bwEventTab-Review','bwBottomNav-Review'); hide('bwHelp-Categories','bwEventTab-Categories','bwBottomNav-Categories');">
1183             <!-- displayReview('standardForm','bwEventSubmitReview',1) -->
1184             next
1185             <img alt="previous"
1186               src="{$resourcesRoot}/resources/arrowRight.gif"
1187               width="13"
1188               height="13"
1189               border="0"/>
1190           </a>
1191         </div>
1192       </div>
1193       <div id="bwBottomNav-Review" class="invisible">
1194         <div class="navButtons">
1195           <a href="javascript:show('bwHelp-Categories','bwEventTab-Categories','bwBottomNav-Categories'); hide('bwHelp-Review','bwEventTab-Review','bwBottomNav-Review'); ">
1196             <img alt="previous"
1197               src="{$resourcesRoot}/resources/arrowLeft.gif"
1198               width="13"
1199               height="13"
1200               border="0"/>
1201           previous</a>
1202           <span class="hidden">
1203             <xsl:text> </xsl:text>| next
1204             <img alt="previous"
1205               src="{$resourcesRoot}/resources/arrowRight.gif"
1206               width="13"
1207               height="13"
1208               border="0"/>
1209           </span>
1210         </div>
1211       </div>
1212     </div>
1213   </xsl:template>
1214
1215   <xsl:template match="val" mode="weekMonthYearNumbers">
1216     <xsl:if test="position() != 1 and position() = last()"> and </xsl:if>
1217     <xsl:value-of select="."/><xsl:choose>
1218       <xsl:when test="substring(., string-length(.)-1, 2) = '11' or
1219                       substring(., string-length(.)-1, 2) = '12' or
1220                       substring(., string-length(.)-1, 2) = '13'">th</xsl:when>
1221       <xsl:when test="substring(., string-length(.), 1) = '1'">st</xsl:when>
1222       <xsl:when test="substring(., string-length(.), 1) = '2'">nd</xsl:when>
1223       <xsl:when test="substring(., string-length(.), 1) = '3'">rd</xsl:when>
1224       <xsl:otherwise>th</xsl:otherwise>
1225     </xsl:choose>
1226     <xsl:if test="position() != last()">, </xsl:if>
1227   </xsl:template>
1228
1229   <xsl:template name="byDayChkBoxList">
1230     <xsl:param name="name"/>
1231     <xsl:for-each select="/bedework/shortdaynames/val">
1232       <xsl:variable name="pos" select="position()"/>
1233       <input type="checkbox">
1234         <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute>
1235         <xsl:attribute name="name"><xsl:value-of select="$name"/></xsl:attribute>
1236       </input>
1237       <xsl:value-of select="."/>
1238     </xsl:for-each>
1239   </xsl:template>
1240
1241   <xsl:template name="buildCheckboxList">
1242     <xsl:param name="current"/>
1243     <xsl:param name="end"/>
1244     <xsl:param name="name"/>
1245     <xsl:param name="splitter">10</xsl:param>
1246     <span class="chkBoxListItem">
1247       <input type="checkbox">
1248         <xsl:attribute name="name"><xsl:value-of select="$name"/></xsl:attribute>
1249         <xsl:attribute name="value"><xsl:value-of select="$current"/></xsl:attribute>
1250       </input>
1251       <xsl:value-of select="$current"/>
1252     </span>
1253     <xsl:if test="$current mod $splitter = 0"><br/></xsl:if>
1254     <xsl:if test="$current = $end"><br/></xsl:if>
1255     <xsl:if test="$current &lt; $end">
1256       <xsl:call-template name="buildCheckboxList">
1257         <xsl:with-param name="current"><xsl:value-of select="$current + 1"/></xsl:with-param>
1258         <xsl:with-param name="end"><xsl:value-of select="$end"/></xsl:with-param>
1259         <xsl:with-param name="name"><xsl:value-of select="$name"/></xsl:with-param>
1260       </xsl:call-template>
1261     </xsl:if>
1262   </xsl:template>
1263
1264   <xsl:template name="recurrenceDayPosOptions">
1265     <option value="0">none</option>
1266     <option value="1">the first</option>
1267     <option value="2">the second</option>
1268     <option value="3">the third</option>
1269     <option value="4">the fourth</option>
1270     <option value="5">the fifth</option>
1271     <option value="-1">the last</option>
1272     <option value="">every</option>
1273   </xsl:template>
1274
1275   <xsl:template name="buildRecurFields">
1276     <xsl:param name="current"/>
1277     <xsl:param name="total"/>
1278     <xsl:param name="name"/>
1279     <div class="invisible">
1280       <xsl:attribute name="id"><xsl:value-of select="$name"/>RecurFields<xsl:value-of select="$current"/></xsl:attribute>
1281       and
1282       <select width="12em">
1283         <xsl:attribute name="name">by<xsl:value-of select="$name"/>posPos<xsl:value-of select="$current"/></xsl:attribute>
1284         <xsl:if test="$current != $total">
1285           <xsl:attribute name="onchange">changeClass('<xsl:value-of select="$name"/>RecurFields<xsl:value-of select="$current+1"/>','shown')</xsl:attribute>
1286         </xsl:if>
1287         <xsl:call-template name="recurrenceDayPosOptions"/>
1288       </select>
1289       <xsl:call-template name="byDayChkBoxList"/>
1290     </div>
1291     <xsl:if test="$current &lt; $total">
1292       <xsl:call-template name="buildRecurFields">
1293         <xsl:with-param name="current"><xsl:value-of select="$current+1"/></xsl:with-param>
1294         <xsl:with-param name="total"><xsl:value-of select="$total"/></xsl:with-param>
1295         <xsl:with-param name="name"><xsl:value-of select="$name"/></xsl:with-param>
1296       </xsl:call-template>
1297     </xsl:if>
1298   </xsl:template>
1299
1300   <xsl:template name="buildNumberOptions">
1301     <xsl:param name="current"/>
1302     <xsl:param name="total"/>
1303     <option value="{$current}"><xsl:value-of select="$current"/></option>
1304     <xsl:if test="$current &lt; $total">
1305       <xsl:call-template name="buildNumberOptions">
1306         <xsl:with-param name="current"><xsl:value-of select="$current+1"/></xsl:with-param>
1307         <xsl:with-param name="total"><xsl:value-of select="$total"/></xsl:with-param>
1308       </xsl:call-template>
1309     </xsl:if>
1310   </xsl:template>
1311
1312   <xsl:template name="clock">
1313     <div id="bwClock">
1314       <!-- Bedework 24-Hour Clock time selection widget
1315            used with resources/bwClock.js and resources/bwClock.css -->
1316       <xsl:variable name="hour24" select="/bedework/hour24"/><!-- true or false -->
1317       <div id="bwClockClock">
1318         <img id="clockMap" src="{$resourcesRoot}/resources/clockMap.gif" width="368" height="368" border="0" alt="bwClock" usemap="#bwClockMap" />
1319       </div>
1320       <div id="bwClockCover">
1321         &#160;
1322         <!-- this is a special effect div used simply to cover the pixelated edge
1323              where the clock meets the clock box title -->
1324       </div>
1325       <div id="bwClockBox">
1326         <h2>
1327           Bedework 24-Hour Clock
1328         </h2>
1329         <div id="bwClockDateTypeIndicator">
1330           type
1331         </div>
1332         <div id="bwClockTime">
1333           select time
1334         </div>
1335         <div id="bwClockSwitch">
1336           switch
1337         </div>
1338         <div id="bwClockCloseText">
1339           close
1340         </div>
1341         <div id="bwClockCloseButton">
1342           <a href="javascript:bwClockClose();">X</a>
1343         </div>
1344       </div>
1345       <map name="bwClockMap" id="bwClockMap">
1346         <area shape="rect" alt="close clock" title="close clock" coords="160,167, 200,200" href="javascript:bwClockClose()"/>
1347         <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')" />
1348         <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')" />
1349         <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')" />
1350         <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')" />
1351         <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')" />
1352         <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')" />
1353         <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')" />
1354         <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')" />
1355         <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')" />
1356         <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')" />
1357         <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')" />
1358         <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')" />
1359         <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})" />
1360         <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})" />
1361         <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})" />
1362         <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})" />
1363         <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})" />
1364         <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})" />
1365         <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})" />
1366         <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})" />
1367         <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})" />
1368         <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})" />
1369         <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})" />
1370         <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})" />
1371         <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})" />
1372         <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})" />
1373         <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})" />
1374         <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})" />
1375         <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})" />
1376         <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})" />
1377         <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})" />
1378         <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})" />
1379         <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})" />
1380         <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})" />
1381         <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})" />
1382         <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})" />
1383       </map>
1384     </div>
1385   </xsl:template>
1386
1387   <!--++++++++++++++++++ Events ++++++++++++++++++++-->
1388   <xsl:template name="eventList">
1389     <h1>Pending Events</h1>
1390     <p>
1391       The events below are waiting to be published by a
1392       calendar administrator.  You may edit or delete the
1393       events until they have been accepted.  Once your
1394       event is picked up, you
1395       will no longer see it in your list.
1396     </p>
1397     <xsl:call-template name="eventListCommon"/>
1398   </xsl:template>
1399
1400   <xsl:template name="eventListCommon">
1401     <table id="commonListTable">
1402       <tr>
1403         <th>Title</th>
1404         <!-- <th>Submitted</th> -->
1405         <th>Start</th>
1406         <th>End</th>
1407         <th>Categories</th>
1408         <th>Description</th>
1409       </tr>
1410
1411       <xsl:for-each select="/bedework/events/event">
1412         <xsl:variable name="subscriptionId" select="subscription/id"/>
1413         <xsl:variable name="calPath" select="calendar/encodedPath"/>
1414         <xsl:variable name="guid" select="guid"/>
1415         <xsl:variable name="recurrenceId" select="recurrenceId"/>
1416         <tr>
1417           <td>
1418             <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
1419               <xsl:choose>
1420                 <xsl:when test="summary != ''">
1421                   <xsl:value-of select="summary"/>
1422                 </xsl:when>
1423                 <xsl:otherwise>
1424                   <em>no title</em>
1425                 </xsl:otherwise>
1426               </xsl:choose>
1427             </a>
1428           </td>
1429           <!-- need to output created date
1430           <td class="date">
1431             <xsl:value-of select="end/longdate"/>
1432           </td> -->
1433           <td class="date">
1434             <xsl:value-of select="start/shortdate"/>
1435             <xsl:text> </xsl:text>
1436             <xsl:value-of select="start/time"/>
1437           </td>
1438           <td class="date">
1439             <xsl:value-of select="end/shortdate"/>
1440             <xsl:text> </xsl:text>
1441             <xsl:value-of select="end/time"/>
1442           </td>
1443           <td>
1444             <xsl:for-each select="categories/category">
1445               <xsl:value-of select="word"/><br/>
1446             </xsl:for-each>
1447           </td>
1448           <td>
1449             <xsl:value-of select="description"/>
1450             <xsl:if test="recurring = 'true' or recurrenceId != ''">
1451               <div class="recurrenceEditLinks">
1452                 Recurring event.
1453                 Edit:
1454                 <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}">
1455                   master
1456                 </a> |
1457                 <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
1458                   instance
1459                 </a>
1460               </div>
1461             </xsl:if>
1462           </td>
1463         </tr>
1464       </xsl:for-each>
1465     </table>
1466   </xsl:template>
1467
1468   <!--==== UPLOAD ====-->
1469   <xsl:template name="upload">
1470   <!-- The name "eventForm" is referenced by several javascript functions. Do not
1471     change it without modifying bedework.js -->
1472     <form name="eventForm" method="post" action="{$upload}" id="standardForm"  enctype="multipart/form-data">
1473       <h2>Upload iCAL File</h2>
1474       <table class="common" cellspacing="0">
1475         <tr>
1476           <td class="fieldname">
1477             Filename:
1478           </td>
1479           <td align="left">
1480             <input type="file" name="uploadFile" size="60" />
1481           </td>
1482         </tr>
1483         <tr>
1484           <td class="fieldname padMeTop">
1485             Into calendar:
1486           </td>
1487           <td align="left" class="padMeTop">
1488             <input type="hidden" name="newCalPath" id="bwNewCalPathField" value=""/>
1489             <span id="bwEventCalDisplay">
1490               <em>default calendar</em>
1491             </span>
1492           </td>
1493         </tr>
1494         <tr>
1495           <td class="fieldname padMeTop">
1496             Effects free/busy:
1497           </td>
1498           <td align="left" class="padMeTop">
1499             <input type="radio" value="" name="transparency" checked="checked"/> accept event's settings<br/>
1500             <input type="radio" value="OPAQUE" name="transparency"/> yes <span class="note">(opaque: event status affects your free/busy)</span><br/>
1501             <input type="radio" value="TRANSPARENT" name="transparency"/> no <span class="note">(transparent: event status does not affect your free/busy)</span><br/>
1502           </td>
1503         </tr>
1504         <tr>
1505           <td class="fieldname padMeTop">
1506             Status:
1507           </td>
1508           <td align="left" class="padMeTop">
1509             <input type="radio" value="" name="status" checked="checked"/> accept event's status<br/>
1510             <input type="radio" value="CONFIRMED" name="status"/> confirmed<br/>
1511             <input type="radio" value="TENTATIVE" name="status"/> tentative<br/>
1512             <input type="radio" value="CANCELLED" name="status"/> cancelled<br/>
1513           </td>
1514         </tr>
1515       </table>
1516       <table border="0" id="submitTable">
1517         <tr>
1518           <td>
1519             <input name="submit" type="submit" value="Continue"/>
1520             <input name="cancelled" type="submit" value="cancel"/>
1521           </td>
1522         </tr>
1523       </table>
1524     </form>
1525   </xsl:template>
1526
1527   <!--==== UTILITY TEMPLATES ====-->
1528
1529   <!-- time formatter (should be extended as needed) -->
1530   <xsl:template name="timeFormatter">
1531     <xsl:param name="timeString"/><!-- required -->
1532     <xsl:param name="showMinutes">yes</xsl:param>
1533     <xsl:param name="showAmPm">yes</xsl:param>
1534     <xsl:param name="hour24">no</xsl:param>
1535     <xsl:variable name="hour" select="number(substring($timeString,1,2))"/>
1536     <xsl:variable name="minutes" select="substring($timeString,3,2)"/>
1537     <xsl:variable name="AmPm">
1538       <xsl:choose>
1539         <xsl:when test="$hour &lt; 12">AM</xsl:when>
1540         <xsl:otherwise>PM</xsl:otherwise>
1541       </xsl:choose>
1542     </xsl:variable>
1543     <xsl:choose>
1544       <xsl:when test="hour24 = 'yes'">
1545         <xsl:value-of select="$hour"/><!--
1546      --><xsl:if test="$showMinutes = 'yes'">:<xsl:value-of select="$minutes"/></xsl:if>
1547       </xsl:when>
1548       <xsl:otherwise>
1549         <xsl:choose>
1550           <xsl:when test="$hour = 0">12</xsl:when>
1551           <xsl:when test="$hour &lt; 13"><xsl:value-of select="$hour"/></xsl:when>
1552           <xsl:otherwise><xsl:value-of select="$hour - 12"/></xsl:otherwise>
1553         </xsl:choose><!--
1554      --><xsl:if test="$showMinutes = 'yes'">:<xsl:value-of select="$minutes"/></xsl:if>
1555         <xsl:if test="$showAmPm = 'yes'">
1556           <xsl:text> </xsl:text>
1557           <xsl:value-of select="$AmPm"/>
1558         </xsl:if>
1559       </xsl:otherwise>
1560     </xsl:choose>
1561   </xsl:template>
1562
1563   <!--==== FOOTER ====-->
1564   <xsl:template name="footer">
1565     <div id="footer">
1566       Based on the <a href="http://www.bedework.org/">Bedework Calendar System</a>
1567     </div>
1568     <div id="subfoot">
1569       <a href="http://www.bedework.org/">Bedework Website</a> |
1570       <a href="?noxslt=yes">show XML</a> |
1571       <a href="?refreshXslt=yes">refresh XSLT</a>
1572     </div>
1573   </xsl:template>
1574
1575 </xsl:stylesheet>
Note: See TracBrowser for help on using the browser.