root/trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/eventForm.xsl

Revision 2892 (checked in by johnsa, 3 years ago)

user client: more refactoring cleanup

Line 
1 <!--
2     Licensed to Jasig under one or more contributor license
3     agreements. See the NOTICE file distributed with this work
4     for additional information regarding copyright ownership.
5     Jasig licenses this file to you under the Apache License,
6     Version 2.0 (the "License"); you may not use this file
7     except in compliance with the License. You may obtain a
8     copy of the License at:
9    
10     http://www.apache.org/licenses/LICENSE-2.0
11    
12     Unless required by applicable law or agreed to in writing,
13     software distributed under the License is distributed on
14     an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15     KIND, either express or implied. See the License for the
16     specific language governing permissions and limitations
17     under the License.
18 -->
19 <xsl:stylesheet
20   version="1.0"
21   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
22   xmlns="http://www.w3.org/1999/xhtml">
23  
24   <!--==== ADD EVENT ====-->
25   <xsl:template match="formElements" mode="addEvent">
26   <!-- The name "eventForm" is referenced by several javascript functions. Do not
27     change it without modifying bedework.js -->
28     <xsl:variable name="submitter">
29       <xsl:choose>
30         <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>
31         <xsl:otherwise><xsl:value-of select="/bedework/userid"/></xsl:otherwise>
32       </xsl:choose>
33     </xsl:variable>
34     <form name="eventForm" method="post" action="{$addEvent}" id="standardForm" onsubmit="setEventFields(this,{$portalFriendly},'{$submitter}')">
35       <h2>
36         <span class="formButtons">
37           <xsl:apply-templates select="form" mode="addEditEventFormButtons" />
38         </span>
39         <xsl:choose>
40           <xsl:when test="form/entityType = '2'"><xsl:copy-of select="$bwStr-AddE-AddTask"/></xsl:when>
41           <xsl:when test="form/scheduleMethod = '2'"><xsl:copy-of select="$bwStr-AddE-AddMeeting"/></xsl:when>
42           <xsl:otherwise><xsl:copy-of select="$bwStr-AddE-AddEvent"/></xsl:otherwise>
43         </xsl:choose>
44       </h2>
45       <xsl:apply-templates select="." mode="eventForm"/>
46     </form>
47   </xsl:template>
48
49   <!--==== EDIT EVENT ====-->
50   <xsl:template match="formElements" mode="editEvent">
51     <!-- The name "eventForm" is referenced by several javascript functions. Do not
52     change it without modifying bedework.js -->
53     <xsl:variable name="submitter">
54       <xsl:choose>
55         <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>
56         <xsl:otherwise><xsl:value-of select="/bedework/userid"/></xsl:otherwise>
57       </xsl:choose>
58     </xsl:variable>
59     <form name="eventForm" method="post" action="{$updateEvent}" id="standardForm" onsubmit="setEventFields(this,{$portalFriendly},'{$submitter}')">
60       <h2>
61         <span class="formButtons">
62           <xsl:apply-templates select="form" mode="addEditEventFormButtons" />
63         </span>
64         <xsl:choose>
65           <xsl:when test="form/entityType = '2'"><xsl:copy-of select="$bwStr-EdtE-EditTask"/></xsl:when>
66           <xsl:when test="form/scheduleMethod = '2'"><xsl:copy-of select="$bwStr-EdtE-EditMeeting"/></xsl:when>
67           <xsl:otherwise><xsl:copy-of select="$bwStr-EdtE-EditEvent"/></xsl:otherwise>
68         </xsl:choose>
69       </h2>
70       <xsl:for-each select="form/xproperties/xproperty">
71         <xsl:variable name="xprop"><xsl:value-of select="@name"/><xsl:value-of select="pars"/>:<xsl:value-of select="value"/></xsl:variable>
72         <input type="hidden" name="xproperty" value="{$xprop}"/>
73       </xsl:for-each>
74       <xsl:apply-templates select="." mode="eventForm"/>
75     </form>
76   </xsl:template>
77
78
79   <!--==== ADD and EDIT EVENT FORM ====-->
80   <xsl:template match="formElements" mode="eventForm">
81     <xsl:variable name="calPathEncoded" select="form/calendar/encodedPath"/>
82     <xsl:variable name="calPath" select="form/calendar/path"/>
83     <xsl:variable name="guid"><xsl:call-template name="url-encode"><xsl:with-param name="str" select="guid"/></xsl:call-template></xsl:variable>
84     <xsl:variable name="recurrenceId" select="recurrenceId"/>
85     <input type="hidden" name="endType" value="date"/>
86
87       <!-- event info for edit event -->
88       <xsl:if test="/bedework/creating != 'true'">
89         <table class="common" cellspacing="0">
90           <tr>
91             <th colspan="2" class="commonHeader">
92               <div id="eventActions">
93                 <xsl:choose>
94                   <xsl:when test="recurrenceId != ''">
95                     <div id="bwDeleteRecurButton" class="bwMenuButton">
96                       <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/>
97                       <xsl:copy-of select="$bwStr-AEEF-Delete"/>
98                       <div id="bwDeleteRecurWidget" class="bwMenuWidget">
99                         <ul>
100                           <li>
101                             <a href="{$delEvent}&amp;calPath={$calPath}&amp;guid={$guid}" title="{$bwStr-AEEF-DeleteMaster}" onclick="return confirm('{$bwStr-AEEF-DeleteAllRecurrences}');">
102                               <xsl:copy-of select="$bwStr-AEEF-All"/>
103                             </a>
104                           </li>
105                           <li>
106                             <a href="{$delEvent}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="${bwStr-AEEF-DeleteThisInstance}" onclick="return confirm('{$bwStr-AEEF-DeleteThisEvent}');">
107                               <xsl:copy-of select="$bwStr-AEEF-Instance"/>
108                             </a>
109                           </li>
110                         </ul>
111                       </div>
112                     </div>
113                   </xsl:when>
114                   <xsl:otherwise>
115                     <a href="{$delEvent}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="{$bwStr-AEEF-DeleteEvent}" class="bwMenuButton" onclick="return confirm('{$bwStr-AEEF-DeleteThisEvent}');">
116                       <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/>
117                        <xsl:copy-of select="$bwStr-AEEF-Delete"/>
118                       <xsl:if test="form/recurringEntity='true'">
119                         <xsl:copy-of select="$bwStr-AEEF-All"/>
120                       </xsl:if>
121                     </a>
122                   </xsl:otherwise>
123                 </xsl:choose>
124                 <xsl:if test="not(form/recurringEntity = 'true' and recurrenceId = '')">
125                   <!-- don't display if a master recurring event (because the master can't be viewed) -->
126                   <a href="{$eventView}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" class="bwMenuButton">
127                     <img src="{$resourcesRoot}/resources/glassFill-icon-viewGray.gif" width="13" height="13" border="0" alt="view"/>
128                      <xsl:copy-of select="$bwStr-AEEF-View"/>
129                   </a>
130                 </xsl:if>
131               </div>
132               <!-- Display type of event -->
133               <xsl:variable name="entityType">
134                 <xsl:choose>
135                   <xsl:when test="entityType = '2'"><xsl:copy-of select="$bwStr-AEEF-TASK"/></xsl:when>
136                   <xsl:when test="scheduleMethod = '2'"><xsl:copy-of select="$bwStr-AEEF-Meeting"/></xsl:when>
137                   <xsl:otherwise><xsl:copy-of select="$bwStr-AEEF-EVENT"/></xsl:otherwise>
138                 </xsl:choose>
139               </xsl:variable>
140               <xsl:if test="form/recurringEntity='true' or recurrenceId != ''">
141                  <xsl:copy-of select="$bwStr-AEEF-Recurring"/>
142               </xsl:if>
143               <xsl:choose>
144                 <xsl:when test="form">
145                   <!-- just a placeholder: need to add owner to the jsp -->
146                    <xsl:text> </xsl:text><xsl:copy-of select="$bwStr-AEEF-Personal"/><xsl:text> </xsl:text><xsl:value-of select="$entityType"/>
147                 </xsl:when>
148                 <xsl:when test="public = 'true'">
149                    <xsl:text> </xsl:text><xsl:copy-of select="$bwStr-AEEF-Public"/><xsl:text> </xsl:text><xsl:value-of select="$entityType"/>
150                 </xsl:when>
151                 <xsl:otherwise>
152                   <xsl:value-of select="$entityType"/>
153                 </xsl:otherwise>
154               </xsl:choose>
155               <xsl:if test="form/recurringEntity='true' and recurrenceId = ''">
156                 <xsl:text> </xsl:text>
157                 <em><xsl:copy-of select="$bwStr-AEEF-RecurrenceMaster"/></em>
158               </xsl:if>
159             </th>
160           </tr>
161         </table>
162       </xsl:if>
163
164       <!-- event form submenu -->
165       <ul id="eventFormTabs" class="submenu">
166         <li class="selected">
167           <a href="javascript:setTab('eventFormTabs',0); show('bwEventTab-Basic'); hide('bwEventTab-Details','bwEventTab-Recurrence','bwEventTab-Access','bwEventTab-Scheduling');">
168             <xsl:copy-of select="$bwStr-AEEF-Basic"/>
169           </a>
170         </li>
171         <li>
172           <a href="javascript:setTab('eventFormTabs',1); show('bwEventTab-Details'); hide('bwEventTab-Basic','bwEventTab-Recurrence','bwEventTab-Access','bwEventTab-Scheduling');">
173             <xsl:copy-of select="$bwStr-AEEF-Details"/>
174           </a>
175         </li>
176         <li>
177           <a href="javascript:setTab('eventFormTabs',2); show('bwEventTab-Recurrence'); hide('bwEventTab-Details','bwEventTab-Basic','bwEventTab-Access','bwEventTab-Scheduling');">
178             <xsl:copy-of select="$bwStr-AEEF-Recurrence"/>
179           </a>
180         </li>
181         <li>
182           <a href="javascript:setTab('eventFormTabs',3); show('bwEventTab-Scheduling'); hide('bwEventTab-Basic','bwEventTab-Details','bwEventTab-Recurrence','bwEventTab-Access');">
183             <xsl:copy-of select="$bwStr-AEEF-Scheduling"/>
184           </a>
185         </li>
186         <!-- Hide from use.  If you wish to enable the access control form for
187          events, uncomment this block.
188         <li>
189           <a href="javascript:setTab('eventFormTabs',4); show('bwEventTab-Access'); hide('bwEventTab-Details','bwEventTab-Basic','bwEventTab-Recurrence','bwEventTab-Scheduling');">
190             access
191           </a>
192         </li>-->
193       </ul>
194
195     <!-- Basic tab -->
196     <!-- ============== -->
197     <!-- this tab is visible by default -->
198     <div id="bwEventTab-Basic">
199       <table cellspacing="0" class="common dottedBorder">
200         <!--  Calendar in which to place event  -->
201         <tr>
202           <td class="fieldname">
203             <xsl:copy-of select="$bwStr-AEEF-Calendar"/><xsl:text> </xsl:text>
204           </td>
205           <td class="fieldval">
206             <!-- the string "user/" should not be hard coded; fix this -->
207             <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/></xsl:variable>
208             <xsl:variable name="writableCalendars">
209               <xsl:value-of select="
210                 count(/bedework/myCalendars//calendar[calType = '1' and
211                        currentAccess/current-user-privilege-set/privilege/write-content]) +
212                 count(/bedework/mySubscriptions//calendar[calType = '1' and
213                        currentAccess/current-user-privilege-set/privilege/write-content and
214                        (not(contains(path,$userPath)))])"/>
215             </xsl:variable>
216             <xsl:choose>
217               <xsl:when test="$writableCalendars = 1">
218                 <!-- there is only 1 writable calendar, so find it by looking down both trees at once -->
219                 <xsl:variable name="newCalPath"><xsl:value-of select="/bedework/myCalendars//calendar[calType = '1' and
220                          currentAccess/current-user-privilege-set/privilege/write-content]/path"/><xsl:value-of select="/bedework/mySubscriptions//calendar[calType = '1' and
221                        currentAccess/current-user-privilege-set/privilege/write-content and
222                        (not(contains(path,$userPath)))]/path"/></xsl:variable>
223
224                 <input type="hidden" name="newCalPath" value="{$newCalPath}"/>
225
226                 <xsl:variable name="userFullPath"><xsl:value-of select="$userPath"/>/</xsl:variable>
227                 <span id="bwEventCalDisplay">
228                   <xsl:choose>
229                     <xsl:when test="contains($newCalPath,$userFullPath)">
230                       <xsl:value-of select="substring-after($newCalPath,$userFullPath)"/>
231                     </xsl:when>
232                     <xsl:otherwise>
233                       <xsl:value-of select="$newCalPath"/>
234                     </xsl:otherwise>
235                   </xsl:choose>
236                 </span>
237               </xsl:when>
238               <xsl:otherwise>
239                 <input type="hidden" name="newCalPath" id="bwNewCalPathField">
240                   <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute>
241                 </input>
242
243                 <xsl:variable name="userFullPath"><xsl:value-of select="$userPath"/>/</xsl:variable>
244                 <span id="bwEventCalDisplay">
245                   <xsl:choose>
246                     <xsl:when test="contains(form/calendar/path,$userFullPath)">
247                       <xsl:value-of select="substring-after(form/calendar/path,$userFullPath)"/>
248                     </xsl:when>
249                     <xsl:otherwise>
250                       <xsl:value-of select="form/calendar/path"/>
251                     </xsl:otherwise>
252                   </xsl:choose>
253                   <xsl:text> </xsl:text>
254                   <!-- this final text element is required to avoid an empty
255                        span element which is improperly rendered in the browser -->
256                 </span>
257
258                 <xsl:call-template name="selectCalForEvent"/>
259
260               </xsl:otherwise>
261             </xsl:choose>
262           </td>
263         </tr>
264         <!--  Summary (title) of event  -->
265         <tr>
266           <td class="fieldname">
267             <xsl:copy-of select="$bwStr-AEEF-Title"/><xsl:text> </xsl:text>
268           </td>
269           <td class="fieldval">
270             <xsl:variable name="title" select="form/title/input/@value"/>
271             <input type="text" name="summary" size="80" value="{$title}" id="bwEventTitle"/>
272           </td>
273         </tr>
274
275         <!--  Date and Time -->
276         <!--  ============= -->
277         <tr>
278           <td class="fieldname">
279             <xsl:copy-of select="$bwStr-AEEF-DateAndTime"/><xsl:text> </xsl:text>
280           </td>
281           <td class="fieldval">
282             <!-- Set the timefields class for the first load of the page;
283                  subsequent changes will take place using javascript without a
284                  page reload. -->
285             <xsl:variable name="timeFieldsClass">
286               <xsl:choose>
287                 <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when>
288                 <xsl:otherwise>timeFields</xsl:otherwise>
289               </xsl:choose>
290             </xsl:variable>
291
292             <!-- date only event: anniversary event - often interpreted as "all day event" -->
293             <xsl:choose>
294               <xsl:when test="form/allDay/input/@checked='checked'">
295                 <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/>
296                 <input type="hidden" name="eventStartDate.dateOnly" value="true" id="allDayStartDateField"/>
297                 <input type="hidden" name="eventEndDate.dateOnly" value="true" id="allDayEndDateField"/>
298               </xsl:when>
299               <xsl:otherwise>
300                 <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/>
301                 <input type="hidden" name="eventStartDate.dateOnly" value="false" id="allDayStartDateField"/>
302                 <input type="hidden" name="eventEndDate.dateOnly" value="false" id="allDayEndDateField"/>
303               </xsl:otherwise>
304             </xsl:choose>
305             <xsl:copy-of select="$bwStr-AEEF-AllDay"/>
306
307             <!-- floating event: no timezone (and not UTC) -->
308             <xsl:choose>
309               <xsl:when test="form/floating/input/@checked='checked'">
310                 <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="on" checked="checked"/>
311                 <input type="hidden" name="eventStartDate.floating" value="true" id="startFloating"/>
312                 <input type="hidden" name="eventEndDate.floating" value="true" id="endFloating"/>
313               </xsl:when>
314               <xsl:otherwise>
315                 <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="off"/>
316                 <input type="hidden" name="eventStartDate.floating" value="false" id="startFloating"/>
317                 <input type="hidden" name="eventEndDate.floating" value="false" id="endFloating"/>
318               </xsl:otherwise>
319             </xsl:choose>
320             <xsl:copy-of select="$bwStr-AEEF-Floating"/>
321
322             <!-- store time as coordinated universal time (UTC) -->
323             <xsl:choose>
324               <xsl:when test="form/storeUTC/input/@checked='checked'">
325                 <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="on" checked="checked"/>
326                 <input type="hidden" name="eventStartDate.storeUTC" value="true" id="startStoreUTC"/>
327                 <input type="hidden" name="eventEndDate.storeUTC" value="true" id="endStoreUTC"/>
328               </xsl:when>
329               <xsl:otherwise>
330                 <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="off"/>
331                 <input type="hidden" name="eventStartDate.storeUTC" value="false" id="startStoreUTC"/>
332                 <input type="hidden" name="eventEndDate.storeUTC" value="false" id="endStoreUTC"/>
333               </xsl:otherwise>
334             </xsl:choose>
335             <xsl:copy-of select="$bwStr-AEEF-StoreAsUTC"/>
336
337             <br/>
338             <div class="dateStartEndBox">
339               <strong><xsl:copy-of select="$bwStr-AEEF-Start"/></strong><xsl:text> </xsl:text>
340               <div class="dateFields">
341                 <span class="startDateLabel"><xsl:copy-of select="$bwStr-AEEF-Date"/><xsl:text> </xsl:text></span>
342                 <xsl:choose>
343                   <xsl:when test="$portalFriendly = 'true'">
344                     <xsl:copy-of select="/bedework/formElements/form/start/month/*"/>
345                     <xsl:copy-of select="/bedework/formElements/form/start/day/*"/>
346                     <xsl:choose>
347                       <xsl:when test="/bedework/creating = 'true'">
348                         <xsl:copy-of select="/bedework/formElements/form/start/year/*"/>
349                       </xsl:when>
350                       <xsl:otherwise>
351                         <xsl:copy-of select="/bedework/formElements/form/start/yearText/*"/>
352                       </xsl:otherwise>
353                     </xsl:choose>
354                     <script type="text/javascript">
355                       <xsl:comment>
356                       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/');
357                       </xsl:comment>
358                     </script>
359                   </xsl:when>
360                   <xsl:otherwise>
361                     <input type="text" name="bwEventWidgetStartDate" id="bwEventWidgetStartDate" size="10"/>
362                     <script type="text/javascript">
363                       <xsl:comment>
364                       /*$("#bwEventWidgetStartDate").datepicker({
365                         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"/>)
366                       }).attr("readonly", "readonly");
367                       $("#bwEventWidgetStartDate").val('<xsl:value-of select="substring-before(form/start/rfc3339DateTime,'T')"/>');*/
368                       </xsl:comment>
369                     </script>
370                     <input type="hidden" name="eventStartDate.year">
371                       <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute>
372                     </input>
373                     <input type="hidden" name="eventStartDate.month">
374                       <xsl:attribute name="value"><xsl:value-of select="form/start/month/select/option[@selected = 'selected']/@value"/></xsl:attribute>
375                     </input>
376                     <input type="hidden" name="eventStartDate.day">
377                       <xsl:attribute name="value"><xsl:value-of select="form/start/day/select/option[@selected = 'selected']/@value"/></xsl:attribute>
378                     </input>
379                   </xsl:otherwise>
380                 </xsl:choose>
381               </div>
382               <div class="{$timeFieldsClass}" id="startTimeFields">
383                 <span id="calWidgetStartTimeHider" class="show">
384                   <xsl:copy-of select="form/start/hour/*"/>
385                   <xsl:copy-of select="form/start/minute/*"/>
386                   <xsl:if test="form/start/ampm">
387                     <xsl:copy-of select="form/start/ampm/*"/>
388                   </xsl:if>
389                   <xsl:text> </xsl:text>
390                   <a href="javascript:bwClockLaunch('eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0" alt="bwClock"/></a>
391
392                   <select name="eventStartDate.tzid" id="startTzid" class="timezones">
393                     <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if>
394                     <option value="-1"><xsl:copy-of select="$bwStr-AEEF-SelectTimezone"/></option>
395                     <!--  deprecated: now calling timezone server.  See bedeworkEventForm.js -->
396                     <!--
397                     <xsl:variable name="startTzId" select="form/start/tzid"/>
398                     <xsl:for-each select="/bedework/timezones/timezone">
399                       <option>
400                         <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute>
401                         <xsl:if test="$startTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if>
402                         <xsl:value-of select="name"/>
403                       </option>
404                     </xsl:for-each>
405                     -->
406                   </select>
407                 </span>
408               </div>
409             </div>
410             <div class="dateStartEndBox">
411               <strong>
412                 <xsl:choose>
413                   <xsl:when test="form/entityType = '2'"><xsl:copy-of select="$bwStr-AEEF-Due"/><xsl:text> </xsl:text></xsl:when>
414                   <xsl:otherwise><xsl:copy-of select="$bwStr-AEEF-End"/><xsl:text> </xsl:text></xsl:otherwise>
415                 </xsl:choose>
416               </strong>
417               <xsl:choose>
418                 <xsl:when test="form/end/type='E'">
419                   <input type="radio" name="eventEndType" value="E" checked="checked" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/>
420                 </xsl:when>
421                 <xsl:otherwise>
422                   <input type="radio" name="eventEndType" value="E" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/>
423                 </xsl:otherwise>
424               </xsl:choose>
425               <xsl:copy-of select="$bwStr-AEEF-Date"/>
426               <xsl:text> </xsl:text>
427               <xsl:variable name="endDateTimeClass">
428                 <xsl:choose>
429                   <xsl:when test="form/end/type='E'">shown</xsl:when>
430                   <xsl:otherwise>invisible</xsl:otherwise>
431                 </xsl:choose>
432               </xsl:variable>
433               <div class="{$endDateTimeClass}" id="endDateTime">
434                 <div class="dateFields">
435                   <xsl:choose>
436                     <xsl:when test="$portalFriendly = 'true'">
437                       <xsl:copy-of select="/bedework/formElements/form/end/dateTime/month/*"/>
438                       <xsl:copy-of select="/bedework/formElements/form/end/dateTime/day/*"/>
439                       <xsl:choose>
440                         <xsl:when test="/bedework/creating = 'true'">
441                           <xsl:copy-of select="/bedework/formElements/form/end/dateTime/year/*"/>
442                         </xsl:when>
443                         <xsl:otherwise>
444                           <xsl:copy-of select="/bedework/formElements/form/end/dateTime/yearText/*"/>
445                         </xsl:otherwise>
446                       </xsl:choose>
447                       <script type="text/javascript">
448                       <xsl:comment>
449                         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/');
450                       </xsl:comment>
451                       </script>
452                     </xsl:when>
453                     <xsl:otherwise>
454                       <!-- span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetEndDate" iconURL="{$resourcesRoot}/resources/calIcon.gif">
455                         <xsl:attribute name="value"><xsl:value-of select="form/end/rfc3339DateTime"/></xsl:attribute>
456                         <xsl:text> </xsl:text>
457                       </span-->
458                       <input type="text" name="bwEventWidgetEndDate" id="bwEventWidgetEndDate" size="10"/>
459                       <script type="text/javascript">
460                         <xsl:comment>
461                         /*$("#bwEventWidgetEndDate").datepicker({
462                           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"/>)
463                         }).attr("readonly", "readonly");
464                         $("#bwEventWidgetEndDate").val('<xsl:value-of select="substring-before(form/end/rfc3339DateTime,'T')"/>');*/
465                         </xsl:comment>
466                       </script>
467                       <input type="hidden" name="eventEndDate.year">
468                         <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/yearText/input/@value"/></xsl:attribute>
469                       </input>
470                       <input type="hidden" name="eventEndDate.month">
471                         <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/month/select/option[@selected = 'selected']/@value"/></xsl:attribute>
472                       </input>
473                       <input type="hidden" name="eventEndDate.day">
474                         <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/day/select/option[@selected = 'selected']/@value"/></xsl:attribute>
475                       </input>
476                     </xsl:otherwise>
477                   </xsl:choose>
478                 </div>
479                 <div class="{$timeFieldsClass}" id="endTimeFields">
480                   <span id="calWidgetEndTimeHider" class="show">
481                     <xsl:copy-of select="form/end/dateTime/hour/*"/>
482                     <xsl:copy-of select="form/end/dateTime/minute/*"/>
483                     <xsl:if test="form/end/dateTime/ampm">
484                       <xsl:copy-of select="form/end/dateTime/ampm/*"/>
485                     </xsl:if>
486                     <xsl:text> </xsl:text>
487                     <a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0" alt="bwClock"/></a>
488
489                     <select name="eventEndDate.tzid" id="endTzid" class="timezones">
490                       <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if>
491                       <option value="-1"><xsl:copy-of select="$bwStr-AEEF-SelectTimezone"/></option>
492                       <!--  deprecated: now calling timezone server.  See bedeworkEventForm.js -->
493                       <!--
494                       <xsl:variable name="endTzId" select="form/end/dateTime/tzid"/>
495                       <xsl:for-each select="/bedework/timezones/timezone">
496                         <option>
497                           <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute>
498                             <xsl:if test="$endTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if>
499                           <xsl:value-of select="name"/>
500                         </option>
501                       </xsl:for-each>
502                       -->
503                     </select>
504                   </span>
505                 </div>
506               </div><br/>
507               <div id="clock" class="invisible">
508                 <xsl:call-template name="clock"/>
509               </div>
510               <div class="dateFields">
511                 <xsl:choose>
512                   <xsl:when test="form/end/type='D'">
513                     <input type="radio" name="eventEndType" value="D" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/>
514                   </xsl:when>
515                   <xsl:otherwise>
516                     <input type="radio" name="eventEndType" value="D" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/>
517                   </xsl:otherwise>
518                 </xsl:choose>
519                 <xsl:copy-of select="$bwStr-AEEF-Duration"/>
520                 <xsl:variable name="endDurationClass">
521                   <xsl:choose>
522                     <xsl:when test="form/end/type='D'">shown</xsl:when>
523                     <xsl:otherwise>invisible</xsl:otherwise>
524                   </xsl:choose>
525                 </xsl:variable>
526                 <xsl:variable name="durationHrMinClass">
527                   <xsl:choose>
528                     <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when>
529                     <xsl:otherwise>shown</xsl:otherwise>
530                   </xsl:choose>
531                 </xsl:variable>
532                 <div class="{$endDurationClass}" id="endDuration">
533                   <xsl:choose>
534                     <xsl:when test="form/end/duration/weeks/input/@value = '0'">
535                     <!-- we are using day, hour, minute format -->
536                     <!-- must send either no week value or week value of 0 (zero) -->
537                       <div class="durationBox">
538                         <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')" checked="checked"/>
539                         <input type="text" name="eventDuration.daysStr" size="2" id="durationDays">
540                           <xsl:attribute name="value">
541                             <xsl:choose>
542                               <xsl:when test="/bedework/creating='true' and form/allDay/input/@checked='checked'">1</xsl:when>
543                               <xsl:when test="/bedework/creating='true' and form/allDay/input/@checked!='checked'">0</xsl:when>
544                               <xsl:otherwise><xsl:value-of select="form/end/duration/days/input/@value"/></xsl:otherwise>
545                             </xsl:choose>
546                           </xsl:attribute>
547                         </input>
548                         <xsl:copy-of select="$bwStr-AEEF-Days"/>
549                         <xsl:text> </xsl:text>
550                         <span id="durationHrMin" class="{$durationHrMinClass}">
551                           <input type="text" name="eventDuration.hoursStr" size="2" id="durationHours">
552                             <xsl:attribute name="value">
553                               <xsl:choose>
554                                 <xsl:when test="/bedework/creating='true'">1</xsl:when>
555                                 <xsl:otherwise><xsl:value-of select="form/end/duration/hours/input/@value"/></xsl:otherwise>
556                               </xsl:choose>
557                             </xsl:attribute>
558                           </input>
559                           <xsl:copy-of select="$bwStr-AEEF-Hours"/>
560                           <xsl:text> </xsl:text>
561                           <input type="text" name="eventDuration.minutesStr" size="2" id="durationMinutes">
562                             <xsl:attribute name="value">
563                               <xsl:choose>
564                                 <xsl:when test="/bedework/creating='true'">0</xsl:when>
565                                 <xsl:otherwise><xsl:value-of select="form/end/duration/minutes/input/@value"/></xsl:otherwise>
566                               </xsl:choose>
567                             </xsl:attribute>
568                           </input>
569                           <xsl:copy-of select="$bwStr-AEEF-Minutes"/>
570                         </span>
571                       </div>
572                       <span class="durationSpacerText"><xsl:copy-of select="$bwStr-AEEF-Or"/></span>
573                       <div class="durationBox">
574                         <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/>
575                         <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/>
576                         <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="disabled"/><xsl:copy-of select="$bwStr-AEEF-Weeks"/>
577                       </div>
578                     </xsl:when>
579                     <xsl:otherwise>
580                       <!-- we are using week format -->
581                       <div class="durationBox">
582                         <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/>
583                         <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/>
584                         <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="disabled"/><xsl:copy-of select="$bwStr-AEEF-Days"/>
585                         <span id="durationHrMin" class="{$durationHrMinClass}">
586                           <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/>
587                           <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="disabled"/><xsl:copy-of select="$bwStr-AEEF-Hours"/>
588                           <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/>
589                           <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="disabled"/><xsl:copy-of select="$bwStr-AEEF-Minutes"/>
590                         </span>
591                       </div>
592                       <span class="durationSpacerText"><xsl:copy-of select="$bwStr-AEEF-Or"/></span>
593                       <div class="durationBox">
594                         <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')" checked="checked"/>
595                         <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/>
596                         <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks"/><xsl:copy-of select="$bwStr-AEEF-Weeks"/>
597                       </div>
598                     </xsl:otherwise>
599                   </xsl:choose>
600                 </div>
601               </div><br/>
602               <div class="dateFields" id="noDuration">
603                 <xsl:choose>
604                   <xsl:when test="form/end/type='N'">
605                     <input type="radio" name="eventEndType" value="N" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/>
606                   </xsl:when>
607                   <xsl:otherwise>
608                     <input type="radio" name="eventEndType" value="N" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/>
609                   </xsl:otherwise>
610                 </xsl:choose>
611                 <xsl:copy-of select="$bwStr-AEEF-This"/><xsl:text> </xsl:text>
612                 <xsl:choose>
613                   <xsl:when test="form/entityType = '2'"><xsl:copy-of select="$bwStr-AEEF-Task"/><xsl:text> </xsl:text></xsl:when>
614                   <xsl:otherwise><xsl:copy-of select="$bwStr-AEEF-Event"/><xsl:text> </xsl:text></xsl:otherwise>
615                 </xsl:choose>
616                 <xsl:copy-of select="$bwStr-AEEF-HasNoDurationEndDate"/>
617               </div>
618             </div>
619           </td>
620         </tr>
621
622         <!--  Percent Complete (only for Tasks)  -->
623         <xsl:if test="form/entityType = '2'">
624           <tr>
625             <td class="fieldname">
626               <xsl:copy-of select="$bwStr-AEEF-Complete"/><xsl:text> </xsl:text>
627             </td>
628             <td class="fieldval" align="left">
629               <input type="text" name="percentComplete" size="3" maxlength="3">
630                 <xsl:attribute name="value"><xsl:value-of select="form/percentComplete"/></xsl:attribute>
631               </input>%
632             </td>
633           </tr>
634         </xsl:if>
635
636         <!--  Transparency  -->
637         <tr>
638           <td class="fieldname padMeTop">
639             <xsl:copy-of select="$bwStr-AEEF-AffectsFreeBusy"/><xsl:text> </xsl:text>
640           </td>
641           <td align="left" class="padMeTop">
642             <input type="radio" value="OPAQUE" name="transparency">
643               <xsl:if test="form/transparency = 'OPAQUE'">
644                 <xsl:attribute name="checked">checked</xsl:attribute>
645               </xsl:if>
646             </input>
647             <xsl:copy-of select="$bwStr-AEEF-Yes"/><xsl:text> </xsl:text><span class="note"><xsl:copy-of select="$bwStr-AEEF-Opaque"/></span><br/>
648
649             <input type="radio" value="TRANSPARENT" name="transparency">
650               <xsl:if test="form/transparency = 'TRANSPARENT'">
651                 <xsl:attribute name="checked">checked</xsl:attribute>
652               </xsl:if>
653             </input>
654             <xsl:copy-of select="$bwStr-AEEF-No"/><xsl:text> </xsl:text><span class="note"><xsl:copy-of select="$bwStr-AEEF-Transparent"/></span><br/>
655           </td>
656         </tr>
657
658         <!--  Category  -->
659         <tr>
660           <td class="fieldname">
661             <xsl:copy-of select="$bwStr-AEEF-Categories"/><xsl:text> </xsl:text>
662           </td>
663           <td class="fieldval" align="left">
664             <xsl:variable name="catCount" select="count(form/categories/all/category)"/>
665             <xsl:choose>
666               <xsl:when test="not(form/categories/all/category)">
667                 <xsl:copy-of select="$bwStr-AEEF-NoCategoriesDefined"/>
668                 <span class="note">(<a href="{$category-initAdd}"><xsl:copy-of select="$bwStr-AEEF-AddCategory"/></a>)</span>
669               </xsl:when>
670               <xsl:otherwise>
671                 <table cellpadding="0" id="allCategoryCheckboxes">
672                   <tr>
673                     <td>
674                       <xsl:for-each select="form/categories/all/category[position() &lt;= ceiling($catCount div 2)]">
675                         <input type="checkbox" name="catUid"/>
676                           <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute>
677                           <xsl:if test="uid = form/categories/current//category/uid"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
678                           <xsl:value-of select="value"/>
679                         <br/>
680                       </xsl:for-each>
681                     </td>
682                     <td>
683                       <xsl:for-each select="form/categories/all/category[position() &gt; ceiling($catCount div 2)]">
684                         <input type="checkbox" name="catUid"/>
685                           <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute>
686                           <xsl:if test="uid = form/categories/current//category/uid"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
687                           <xsl:value-of select="value"/>
688                         <br/>
689                       </xsl:for-each>
690                     </td>
691                   </tr>
692                 </table>
693               </xsl:otherwise>
694             </xsl:choose>
695           </td>
696         </tr>
697       </table>
698     </div>
699
700
701     <!-- Details tab -->
702     <!-- ============== -->
703     <div id="bwEventTab-Details" class="invisible">
704       <table cellspacing="0" class="common dottedBorder">
705         <!--  Location  -->
706         <tr>
707           <td class="fieldname"><xsl:copy-of select="$bwStr-AEEF-Location"/></td>
708           <td class="fieldval" align="left">
709             <span class="std-text"><xsl:copy-of select="$bwStr-AEEF-Choose"/><xsl:text> </xsl:text></span>
710             <span id="eventFormLocationList">
711               <!--
712               <xsl:choose>
713                 <xsl:when test="/bedework/creating = 'true'">
714                   <select name="locationUid">
715                     <option value="-1">select...</option>
716                     <xsl:copy-of select="form/location/locationmenu/select/*"/>
717                   </select>
718                 </xsl:when>
719                 <xsl:otherwise>
720                   <select name="eventLocationUid">
721                     <option value="-1">select...</option>
722                     <xsl:copy-of select="form/location/locationmenu/select/*"/>
723                   </select>
724                 </xsl:otherwise>
725               </xsl:choose>
726               -->
727               <select name="locationUid">
728                 <option value=""><xsl:copy-of select="$bwStr-AEEF-Select"/></option>
729                 <xsl:copy-of select="form/location/locationmenu/select/*"/>
730               </select>
731             </span>
732             <span class="std-text"><xsl:text> </xsl:text><xsl:copy-of select="$bwStr-AEEF-OrAddNew"/><xsl:text> </xsl:text></span>
733             <input type="text" name="locationAddress.value" value="" />
734           </td>
735         </tr>
736         <!--  Link (url associated with event)  -->
737         <tr>
738           <td class="fieldname"><xsl:copy-of select="$bwStr-AEEF-EventLink"/><xsl:text> </xsl:text></td>
739           <td class="fieldval">
740             <xsl:variable name="link" select="form/link/input/@value"/>
741             <input type="text" name="eventLink" size="80" value="{$link}"/>
742           </td>
743         </tr>
744         <!--  Description  -->
745         <tr>
746           <td class="fieldname"><xsl:copy-of select="$bwStr-AEEF-Description"/><xsl:text> </xsl:text></td>
747           <td class="fieldval">
748             <xsl:choose>
749               <xsl:when test="normalize-space(form/desc/textarea) = ''">
750                 <textarea name="description" cols="60" rows="4">
751                   <xsl:text> </xsl:text>
752                 </textarea>
753                 <!-- keep this space to avoid browser
754                 rendering errors when the text area is empty -->
755               </xsl:when>
756               <xsl:otherwise>
757                 <textarea name="description" cols="60" rows="4">
758                   <xsl:value-of select="form/desc/textarea"/>
759                 </textarea>
760               </xsl:otherwise>
761             </xsl:choose>
762           </td>
763         </tr>
764         <!--<tr>
765           <td class="fieldname">
766             Type:
767           </td>
768           <td class="fieldval">
769             <input type="radio" name="schedule" size="80" value="none" checked="checked">
770               <xsl:if test="form/scheduleMethod = '0'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
771               my event
772             </input>
773             <input type="radio" name="schedule" size="80" value="request">
774               <xsl:if test="form/scheduleMethod = '2'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
775               meeting request
776             </input>
777             <input type="radio" name="schedule" size="80" value="publish">
778               <xsl:if test="form/scheduleMethod = '1'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
779               published event
780             </input>
781             <xsl:if test="/bedework/creating = 'false' and form/scheduleMethod = '2'">
782               <br/><input type="checkbox" name="schedule" value="reconfirm "/> ask attendees to reconfirm
783             </xsl:if>
784           </td>
785         </tr>-->
786         <!--  Recipients and Attendees  -->
787         <!--
788         <tr>
789           <td class="fieldname">
790             Recipients &amp;<br/> Attendees:
791           </td>
792           <td class="fieldval posrelative">
793             <input type="button" value="Manage recipients and attendees" onclick="launchSizedWindow('{$event-showAttendeesForEvent}','500','400')" class="small"/>
794           </td>
795         </tr>-->
796         <!--  Status  -->
797         <tr>
798           <td class="fieldname">
799             <xsl:copy-of select="$bwStr-AEEF-Status"/><xsl:text> </xsl:text>
800           </td>
801           <td class="fieldval">
802             <input type="radio" name="eventStatus" value="CONFIRMED">
803               <xsl:if test="form/status = 'CONFIRMED' or /bedework/creating = 'true' or form/status = ''"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
804             </input>
805             <xsl:copy-of select="$bwStr-AEEF-Confirmed"/>
806             <input type="radio" name="eventStatus" value="TENTATIVE">
807               <xsl:if test="form/status = 'TENTATIVE'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
808             </input>
809             <xsl:copy-of select="$bwStr-AEEF-Tentative"/>
810             <input type="radio" name="eventStatus" value="CANCELLED">
811               <xsl:if test="form/status = 'CANCELLED'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
812             </input>
813             <xsl:copy-of select="$bwStr-AEEF-Canceled"/>
814           </td>
815         </tr>
816         <!--  Transparency  -->
817         <xsl:if test="entityType != '2'"><!-- no transparency for Tasks -->
818           <tr>
819             <td class="fieldname">
820               <xsl:copy-of select="$bwStr-AEEF-AffectsFreeBusy"/>
821             </td>
822             <td class="fieldval">
823               <xsl:choose>
824                 <xsl:when test="form/transparency = 'TRANSPARENT'">
825                   <input type="radio" name="transparency" value="OPAQUE"/><xsl:copy-of select="$bwStr-AEEF-Yes"/> <span class="note"><xsl:copy-of select="$bwStr-AEEF-Opaque"/></span><br/>
826                   <input type="radio" name="transparency" value="TRANSPARENT" checked="checked"/><xsl:copy-of select="$bwStr-AEEF-No"/><xsl:text> </xsl:text><span class="note"><xsl:copy-of select="$bwStr-AEEF-Transparent"/></span>
827                 </xsl:when>
828                 <xsl:otherwise>
829                   <input type="radio" name="transparency" value="OPAQUE" checked="checked"/><xsl:copy-of select="$bwStr-AEEF-Yes"/> <span class="note"><xsl:copy-of select="$bwStr-AEEF-Opaque"/></span><br/>
830                   <input type="radio" name="transparency" value="TRANSPARENT"/><xsl:copy-of select="$bwStr-AEEF-No"/> <span class="note"><xsl:copy-of select="$bwStr-AEEF-Transparent"/></span>
831                 </xsl:otherwise>
832               </xsl:choose>
833             </td>
834           </tr>
835         </xsl:if>
836       </table>
837     </div>
838
839
840     <!-- Recurrence tab -->
841     <!-- ============== -->
842     <div id="bwEventTab-Recurrence" class="invisible">
843       <xsl:choose>
844         <xsl:when test="recurrenceId != ''">
845           <!-- recurrence instances can not themselves recur,
846                so provide access to master event -->
847           <em><xsl:copy-of select="$bwStr-AEEF-ThisEventRecurrenceInstance"/></em><br/>
848           <a href="{$editEvent}&amp;calPath={$calPath}&amp;guid={$guid}" title="{$bwStr-AEEF-EditMaster}"><xsl:copy-of select="$bwStr-AEEF-EditMasterEvent"/></a>
849         </xsl:when>
850         <xsl:otherwise>
851           <!-- has recurrenceId, so is master -->
852
853           <div id="recurringSwitch">
854             <!-- set or remove "recurring" and show or hide all recurrence fields: -->
855             <input type="radio" name="recurring" value="true" onclick="swapRecurrence(this)">
856               <xsl:if test="form/recurringEntity = 'true'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
857             </input> <xsl:copy-of select="$bwStr-AEEF-EventRecurs"/>
858             <input type="radio" name="recurring" value="false" onclick="swapRecurrence(this)">
859               <xsl:if test="form/recurringEntity = 'false'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
860             </input> <xsl:copy-of select="$bwStr-AEEF-EventDoesNotRecur"/>
861           </div>
862
863           <!-- wrapper for all recurrence fields (rrules and rdates): -->
864           <div id="recurrenceFields" class="invisible">
865             <xsl:if test="form/recurringEntity = 'true'"><xsl:attribute name="class">visible</xsl:attribute></xsl:if>
866
867             <h4><xsl:copy-of select="$bwStr-AEEF-RecurrenceRules"/></h4>
868             <!-- show or hide rrules fields when editing: -->
869             <xsl:if test="form/recurrence">
870               <input type="checkbox" name="rrulesFlag" onclick="swapRrules(this)" value="on"/>
871               <span id="rrulesSwitch">
872                 <xsl:copy-of select="$bwStr-AEEF-ChangeRecurrenceRules"/>
873               </span>
874             </xsl:if>
875             <span id="rrulesUiSwitch">
876               <xsl:if test="form/recurrence">
877                 <xsl:attribute name="class">invisible</xsl:attribute>
878               </xsl:if>
879               <input type="checkbox" name="rrulesUiSwitch" value="advanced" onchange="swapVisible(this,'advancedRrules')"/>
880               <xsl:copy-of select="$bwStr-AEEF-ShowAdvancedRecurrenceRules"/>
881             </span>
882
883             <xsl:if test="form/recurrence">
884               <!-- Output descriptive recurrence rules information.  Probably not
885                    complete yet. Replace all strings so can be
886                    more easily internationalized. -->
887               <div id="recurrenceInfo">
888                 <xsl:copy-of select="$bwStr-AEEF-EVERY"/><xsl:text> </xsl:text>
889                 <xsl:choose>
890                   <xsl:when test="form/recurrence/interval &gt; 1">
891                     <xsl:value-of select="form/recurrence/interval"/>
892                   </xsl:when>
893                 </xsl:choose>
894                 <xsl:text> </xsl:text>
895                 <xsl:choose>
896                   <xsl:when test="form/recurrence/freq = 'HOURLY'"><xsl:copy-of select="$bwStr-AEEF-Hour"/></xsl:when>
897                   <xsl:when test="form/recurrence/freq = 'DAILY'"><xsl:copy-of select="$bwStr-AEEF-Day"/></xsl:when>
898                   <xsl:when test="form/recurrence/freq = 'WEEKLY'"><xsl:copy-of select="$bwStr-AEEF-Week"/></xsl:when>
899                   <xsl:when test="form/recurrence/freq = 'MONTHLY'"><xsl:copy-of select="$bwStr-AEEF-Month"/></xsl:when>
900                   <xsl:when test="form/recurrence/freq = 'YEARLY'"><xsl:copy-of select="$bwStr-AEEF-Year"/></xsl:when>
901                 </xsl:choose>
902                 <xsl:text> </xsl:text>
903
904                 <xsl:if test="form/recurrence/byday">
905                   <xsl:for-each select="form/recurrence/byday/pos">
906                     <xsl:if test="position() != 1"> <xsl:copy-of select="$bwStr-AEEF-And"/> </xsl:if>
907                     <xsl:copy-of select="$bwStr-AEEF-On"/>
908                     <xsl:choose>
909                       <xsl:when test="@val='1'">
910                         <xsl:copy-of select="$bwStr-AEEF-TheFirst"/>
911                       </xsl:when>
912                       <xsl:when test="@val='2'">
913                         <xsl:copy-of select="$bwStr-AEEF-TheSecond"/>
914                       </xsl:when>
915                       <xsl:when test="@val='3'">
916                         <xsl:copy-of select="$bwStr-AEEF-TheThird"/>
917                       </xsl:when>
918                       <xsl:when test="@val='4'">
919                         <xsl:copy-of select="$bwStr-AEEF-TheFourth"/>
920                       </xsl:when>
921                       <xsl:when test="@val='5'">
922                         <xsl:copy-of select="$bwStr-AEEF-TheFifth"/>
923                       </xsl:when>
924                       <xsl:when test="@val='-1'">
925                         <xsl:copy-of select="$bwStr-AEEF-TheLast"/>
926                       </xsl:when>
927                       <!-- don't output "every" -->
928                       <!--<xsl:otherwise>
929                         every
930                       </xsl:otherwise>-->
931                     </xsl:choose>
932                     <xsl:for-each select="day">
933                       <xsl:if test="position() != 1 and position() = last()"> <xsl:copy-of select="$bwStr-AEEF-And"/> </xsl:if>
934                       <xsl:variable name="dayVal" select="."/>
935                       <xsl:variable name="dayPos">
936                         <xsl:for-each select="/bedework/recurdayvals/val">
937                           <xsl:if test="node() = $dayVal"><xsl:value-of select="position()"/></xsl:if>
938                         </xsl:for-each>
939                       </xsl:variable>
940                       <xsl:value-of select="/bedework/shortdaynames/val[position() = $dayPos]"/>
941                       <xsl:if test="position() != last()">, </xsl:if>
942                     </xsl:for-each>
943                   </xsl:for-each>
944                 </xsl:if>
945
946                 <xsl:if test="form/recurrence/bymonth">
947                   <xsl:copy-of select="$bwStr-AEEF-In"/>
948                   <xsl:for-each select="form/recurrence/bymonth/val">
949                     <xsl:if test="position() != 1 and position() = last()"> <xsl:copy-of select="$bwStr-AEEF-And"/> </xsl:if>
950                     <xsl:variable name="monthNum" select="number(.)"/>
951                     <xsl:value-of select="/bedework/monthlabels/val[position() = $monthNum]"/>
952                     <xsl:if test="position() != last()">, </xsl:if>
953                   </xsl:for-each>
954                 </xsl:if>
955
956                 <xsl:if test="form/recurrence/bymonthday">
957                   <xsl:copy-of select="$bwStr-AEEF-OnThe"/>
958                   <xsl:apply-templates select="form/recurrence/bymonthday/val" mode="weekMonthYearNumbers"/>
959                   <xsl:copy-of select="$bwStr-AEEF-DayOfTheMonth"/>
960                 </xsl:if>
961
962                 <xsl:if test="form/recurrence/byyearday">
963                   <xsl:copy-of select="$bwStr-AEEF-OnThe"/>
964                   <xsl:apply-templates select="form/recurrence/byyearday/val" mode="weekMonthYearNumbers"/>
965                   <xsl:copy-of select="$bwStr-AEEF-DayOfTheYear"/>
966                 </xsl:if>
967
968                 <xsl:if test="form/recurrence/byweekno">
969                   <xsl:copy-of select="$bwStr-AEEF-InThe"/>
970                   <xsl:apply-templates select="form/recurrence/byweekno/val" mode="weekMonthYearNumbers"/>
971                   <xsl:copy-of select="$bwStr-AEEF-WeekOfTheYear"/>
972                 </xsl:if>
973
974                 <xsl:copy-of select="$bwStr-AEEF-Repeating"/>
975                 <xsl:choose>
976                   <xsl:when test="form/recurrence/count = '-1'"><xsl:text> </xsl:text><xsl:copy-of select="$bwStr-AEEF-Forever"/></xsl:when>
977                   <xsl:when test="form/recurrence/until">
978                     <xsl:copy-of select="$bwStr-AEEF-Until"/> <xsl:value-of select="substring(form/recurrence/until,1,4)"/>-<xsl:value-of select="substring(form/recurrence/until,5,2)"/>-<xsl:value-of select="substring(form/recurrence/until,7,2)"/>
979                   </xsl:when>
980                   <xsl:otherwise>
981                     <xsl:value-of select="form/recurrence/count"/>
982                     <xsl:copy-of select="$bwStr-AEEF-Time"/>
983                   </xsl:otherwise>
984                 </xsl:choose>
985               </div>
986             </xsl:if>
987
988             <!-- set these dynamically when form is submitted -->
989             <input type="hidden" name="interval" value=""/>
990             <input type="hidden" name="count" value=""/>
991             <input type="hidden" name="until" value=""/>
992             <input type="hidden" name="byday" value=""/>
993             <input type="hidden" name="bymonthday" value=""/>
994             <input type="hidden" name="bymonth" value=""/>
995             <input type="hidden" name="byweekno" value=""/>
996             <input type="hidden" name="byyearday" value=""/>
997             <input type="hidden" name="wkst" value=""/>
998             <input type="hidden" name="setpos" value=""/>
999
1000             <!-- wrapper for rrules: -->
1001             <table id="rrulesTable" cellspacing="0">
1002               <xsl:if test="form/recurrence">
1003                 <xsl:attribute name="class">invisible</xsl:attribute>
1004               </xsl:if>
1005               <tr>
1006                 <td id="recurrenceFrequency" rowspan="2">
1007                   <em><xsl:copy-of select="$bwStr-AEEF-Frequency"/></em><br/>
1008                   <input type="radio" name="freq" value="NONE" onclick="showRrules(this.value)" checked="checked"/><xsl:copy-of select="$bwStr-AEEF-None"/><br/>
1009                   <!--<input type="radio" name="freq" value="HOURLY" onclick="showRrules(this.value)"/>hourly<br/>-->
1010                   <input type="radio" name="freq" value="DAILY" onclick="showRrules(this.value)"/><xsl:copy-of select="$bwStr-AEEF-Daily"/><br/>
1011                   <input type="radio" name="freq" value="WEEKLY" onclick="showRrules(this.value)"/><xsl:copy-of select="$bwStr-AEEF-Weekly"/><br/>
1012                   <input type="radio" name="freq" value="MONTHLY" onclick="showRrules(this.value)"/><xsl:copy-of select="$bwStr-AEEF-Monthly"/><br/>
1013                   <input type="radio" name="freq" value="YEARLY" onclick="showRrules(this.value)"/><xsl:copy-of select="$bwStr-AEEF-Yearly"/>
1014                 </td>
1015                 <!-- recurrence count, until, forever -->
1016                 <td id="recurrenceUntil">
1017                   <div id="noneRecurrenceRules">
1018                     <xsl:copy-of select="$bwStr-AEEF-NoRecurrenceRules"/>
1019                   </div>
1020                   <div id="recurrenceUntilRules" class="invisible">
1021                     <em><xsl:copy-of select="$bwStr-AEEF-Repeat"/></em>
1022                     <p>
1023                       <input type="radio" name="recurCountUntil" value="forever">
1024                         <xsl:if test="not(form/recurring) or form/recurring/count = '-1'">
1025                           <xsl:attribute name="checked">checked</xsl:attribute>
1026                         </xsl:if>
1027                       </input>
1028                       <xsl:copy-of select="$bwStr-AEEF-Forever"/>
1029                       <input type="radio" name="recurCountUntil" value="count" id="recurCount">
1030                         <xsl:if test="form/recurring/count != '-1'">
1031                           <xsl:attribute name="checked">checked</xsl:attribute>
1032                         </xsl:if>
1033                       </input>
1034                       <input type="text" value="1" size="2" name="countHolder"  onfocus="selectRecurCountUntil('recurCount')">
1035                         <xsl:if test="form/recurring/count and form/recurring/count != '-1'">
1036                           <xsl:attribute name="value"><xsl:value-of select="form/recurring/count"/></xsl:attribute>
1037                         </xsl:if>
1038                       </input>
1039                       <xsl:copy-of select="$bwStr-AEEF-Time"/>
1040                       <input type="radio" name="recurCountUntil" value="until" id="recurUntil">
1041                         <xsl:if test="form/recurring/until">
1042                           <xsl:attribute name="checked">checked</xsl:attribute>
1043                         </xsl:if>
1044                       </input>
1045                       <xsl:copy-of select="$bwStr-AEEF-Until"/>
1046                       <span id="untilHolder">
1047                         <!-- span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetUntilDate" iconURL="{$resourcesRoot}/resources/calIcon.gif">
1048                           <xsl:attribute name="value"><xsl:value-of select="form/start/rfc3339DateTime"/></xsl:attribute>
1049                           <xsl:text> </xsl:text>
1050                         </span -->
1051                         <input type="hidden" name="bwEventUntilDate" id="bwEventUntilDate" size="10"/>
1052                         <input type="text" name="bwEventWidgetUntilDate" id="bwEventWidgetUntilDate" size="10" onfocus="selectRecurCountUntil('recurUntil')"/>
1053                         <script type="text/javascript">
1054                           <xsl:comment>
1055                           /*$("#bwEventWidgetUntilDate").datepicker({
1056                             <xsl:choose>
1057                               <xsl:when test="form/recurrence/until">
1058                                 defaultDate: new Date(<xsl:value-of select="substring(form/recurrence/until,1,4)"/>, <xsl:value-of select="number(substring(form/recurrence/until,5,2)) - 1"/>, <xsl:value-of select="substring(form/recurrence/until,7,2)"/>),
1059                               </xsl:when>
1060                               <xsl:otherwise>
1061                                 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"/>),
1062                               </xsl:otherwise>
1063                             </xsl:choose>
1064                             altField: "#bwEventUntilDate",
1065                             altFormat: "yymmdd"
1066                           }).attr("readonly", "readonly");
1067                           $("#bwEventWidgetUntilDate").val('<xsl:value-of select="substring-before(form/start/rfc3339DateTime,'T')"/>');*/
1068                           </xsl:comment>
1069                         </script>
1070                       </span>
1071                     </p>
1072                   </div>
1073                 </td>
1074               </tr>
1075               <tr>
1076                 <td id="advancedRrules" class="invisible">
1077                   <!-- hourly -->
1078                   <div id="hourlyRecurrenceRules" class="invisible">
1079                     <p>
1080                       <em><xsl:copy-of select="$bwStr-AEEF-Interval"/></em>
1081                       <xsl:copy-of select="$bwStr-AEEF-Every"/>
1082                       <input type="text" name="hourlyInterval" size="2" value="1">
1083                         <xsl:if test="form/recurrence/interval">
1084                           <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute>
1085                         </xsl:if>
1086                       </input>
1087                       <xsl:copy-of select="$bwStr-AEEF-Hour"/>
1088                     </p>
1089                   </div>
1090                   <!-- daily -->
1091                   <div id="dailyRecurrenceRules" class="invisible">
1092                     <p>
1093                       <em><xsl:copy-of select="$bwStr-AEEF-Interval"/></em>
1094                       <xsl:copy-of select="$bwStr-AEEF-Every"/>
1095                       <input type="text" name="dailyInterval" size="2" value="1">
1096                         <xsl:if test="form/recurrence/interval">
1097                           <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute>
1098                         </xsl:if>
1099                       </input>
1100                       <xsl:copy-of select="$bwStr-AEEF-Day"/>
1101                     </p>
1102                     <div>
1103                       <input type="checkbox" name="swapDayMonthCheckBoxList" value="" onclick="swapVisible(this,'dayMonthCheckBoxList')"/>
1104                       <xsl:copy-of select="$bwStr-AEEF-InTheseMonths"/>
1105                       <div id="dayMonthCheckBoxList" class="invisible">
1106                         <xsl:for-each select="/bedework/monthlabels/val">
1107                           <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable>
1108                           <span class="chkBoxListItem">
1109                             <input type="checkbox" name="dayMonths">
1110                               <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute>
1111                             </input>
1112                             <xsl:value-of select="."/>
1113                           </span>
1114                           <xsl:if test="$pos mod 6 = 0"><br/></xsl:if>
1115                         </xsl:for-each>
1116                       </div>
1117                     </div>
1118                     <!--<p>
1119                       <input type="checkbox" name="swapDaySetPos" value="" onclick="swapVisible(this,'daySetPos')"/>
1120                       limit to:
1121                       <div id="daySetPos" class="invisible">
1122                       </div>
1123                     </p>-->
1124                   </div>
1125                   <!-- weekly -->
1126                   <div id="weeklyRecurrenceRules" class="invisible">
1127                     <p>
1128                       <em><xsl:copy-of select="$bwStr-AEEF-Interval"/><xsl:text> </xsl:text></em>
1129                       <xsl:copy-of select="$bwStr-AEEF-Every"/>
1130                       <input type="text" name="weeklyInterval" size="2" value="1">
1131                         <xsl:if test="form/recurrence/interval">
1132                           <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute>
1133                         </xsl:if>
1134                       </input>
1135                       <xsl:copy-of select="$bwStr-AEEF-WeekOn"/>
1136                     </p>
1137                     <div id="weekRecurFields">
1138                       <xsl:call-template name="byDayChkBoxList">
1139                         <xsl:with-param name="name">byDayWeek</xsl:with-param>
1140                       </xsl:call-template>
1141                     </div>
1142                     <p class="weekRecurLinks">
1143                       <a href="javascript:recurSelectWeekdays('weekRecurFields')"><xsl:copy-of select="$bwStr-AEEF-SelectWeekdays"/></a> |
1144                       <a href="javascript:recurSelectWeekends('weekRecurFields')"><xsl:copy-of select="$bwStr-AEEF-SelectWeekends"/></a>
1145                     </p>
1146                     <p>
1147                       <xsl:copy-of select="$bwStr-AEEF-WeekStart"/>
1148                       <select name="weekWkst">
1149                         <xsl:for-each select="/bedework/shortdaynames/val">
1150                           <xsl:variable name="pos" select="position()"/>
1151                           <option>
1152                             <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute>
1153                             <xsl:value-of select="."/>
1154                           </option>
1155                         </xsl:for-each>
1156                       </select>
1157                     </p>
1158                   </div>
1159                   <!-- monthly -->
1160                   <div id="monthlyRecurrenceRules" class="invisible">
1161                     <p>
1162                       <em><xsl:copy-of select="$bwStr-AEEF-Interval"/></em>
1163                       <xsl:copy-of select="$bwStr-AEEF-Every"/>
1164                       <input type="text" name="monthlyInterval" size="2" value="1">
1165                         <xsl:if test="form/recurrence/interval">
1166                           <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute>
1167                         </xsl:if>
1168                       </input>
1169                       <xsl:copy-of select="$bwStr-AEEF-Month"/>
1170                     </p>
1171                     <div id="monthRecurFields">
1172                       <div id="monthRecurFields1">
1173                         <xsl:copy-of select="$bwStr-AEEF-On"/>
1174                         <select name="bymonthposPos1" size="7" onchange="changeClass('monthRecurFields2','shown')">
1175                           <xsl:call-template name="recurrenceDayPosOptions"/>
1176                         </select>
1177                         <xsl:call-template name="byDayChkBoxList"/>
1178                       </div>
1179                       <xsl:call-template name="buildRecurFields">
1180                         <xsl:with-param name="current">2</xsl:with-param>
1181                         <xsl:with-param name="total">10</xsl:with-param>
1182                         <xsl:with-param name="name">month</xsl:with-param>
1183                       </xsl:call-template>
1184                     </div>
1185                     <div>
1186                       <input type="checkbox" name="swapMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'monthDaysCheckBoxList')"/>
1187                       <xsl:copy-of select="$bwStr-AEEF-OnTheseDays"/><br/>
1188                       <div id="monthDaysCheckBoxList" class="invisible">
1189                         <xsl:call-template name="buildCheckboxList">
1190                           <xsl:with-param name="current">1</xsl:with-param>
1191                           <xsl:with-param name="end">31</xsl:with-param>
1192                           <xsl:with-param name="name">monthDayBoxes</xsl:with-param>
1193                         </xsl:call-template>
1194                       </div>
1195                     </div>
1196                   </div>
1197                   <!-- yearly -->
1198                   <div id="yearlyRecurrenceRules" class="invisible">
1199                     <p>
1200                       <em><xsl:copy-of select="$bwStr-AEEF-Interval"/><xsl:text> </xsl:text></em>
1201                       <xsl:copy-of select="$bwStr-AEEF-Every"/>
1202                       <input type="text" name="yearlyInterval" size="2" value="1">
1203                         <xsl:if test="form/recurrence/interval">
1204                           <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute>
1205                         </xsl:if>
1206                       </input>
1207                       <xsl:copy-of select="$bwStr-AEEF-Year"/>
1208                     </p>
1209                     <div id="yearRecurFields">
1210                       <div id="yearRecurFields1">
1211                         <xsl:copy-of select="$bwStr-AEEF-On"/>
1212                         <select name="byyearposPos1" size="7" onchange="changeClass('yearRecurFields2','shown')">
1213                           <xsl:call-template name="recurrenceDayPosOptions"/>
1214                         </select>
1215                         <xsl:call-template name="byDayChkBoxList"/>
1216                       </div>
1217                       <xsl:call-template name="buildRecurFields">
1218                         <xsl:with-param name="current">2</xsl:with-param>
1219                         <xsl:with-param name="total">10</xsl:with-param>
1220                         <xsl:with-param name="name">year</xsl:with-param>
1221                       </xsl:call-template>
1222                     </div>
1223                     <div>
1224                       <input type="checkbox" name="swapYearMonthCheckBoxList" value="" onclick="swapVisible(this,'yearMonthCheckBoxList')"/>
1225                       <xsl:copy-of select="$bwStr-AEEF-InTheseMonths"/>
1226                       <div id="yearMonthCheckBoxList" class="invisible">
1227                         <xsl:for-each select="/bedework/monthlabels/val">
1228                           <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable>
1229                           <span class="chkBoxListItem">
1230                             <input type="checkbox" name="yearMonths">
1231                               <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute>
1232                             </input>
1233                             <xsl:value-of select="."/>
1234                           </span>
1235                           <xsl:if test="$pos mod 6 = 0"><br/></xsl:if>
1236                         </xsl:for-each>
1237                       </div>
1238                     </div>
1239                     <div>
1240                       <input type="checkbox" name="swapYearMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'yearMonthDaysCheckBoxList')"/>
1241                       <xsl:copy-of select="$bwStr-AEEF-OnTheseDaysOfTheMonth"/><br/>
1242                       <div id="yearMonthDaysCheckBoxList" class="invisible">
1243                         <xsl:call-template name="buildCheckboxList">
1244                           <xsl:with-param name="current">1</xsl:with-param>
1245                           <xsl:with-param name="end">31</xsl:with-param>
1246                           <xsl:with-param name="name">yearMonthDayBoxes</xsl:with-param>
1247                         </xsl:call-template>
1248                       </div>
1249                     </div>
1250                     <div>
1251                       <input type="checkbox" name="swapYearWeeksCheckBoxList" value="" onclick="swapVisible(this,'yearWeeksCheckBoxList')"/>
1252                       <xsl:copy-of select="$bwStr-AEEF-InTheseWeeksOfTheYear"/><br/>
1253                       <div id="yearWeeksCheckBoxList" class="invisible">
1254                         <xsl:call-template name="buildCheckboxList">
1255                           <xsl:with-param name="current">1</xsl:with-param>
1256                           <xsl:with-param name="end">53</xsl:with-param>
1257                           <xsl:with-param name="name">yearWeekBoxes</xsl:with-param>
1258                         </xsl:call-template>
1259                       </div>
1260                     </div>
1261                     <div>
1262                       <input type="checkbox" name="swapYearDaysCheckBoxList" value="" onclick="swapVisible(this,'yearDaysCheckBoxList')"/>
1263                       <xsl:copy-of select="$bwStr-AEEF-OnTheseDaysOfTheYear"/><br/>
1264                       <div id="yearDaysCheckBoxList" class="invisible">
1265                         <xsl:call-template name="buildCheckboxList">
1266                           <xsl:with-param name="current">1</xsl:with-param>
1267                           <xsl:with-param name="end">366</xsl:with-param>
1268                           <xsl:with-param name="name">yearDayBoxes</xsl:with-param>
1269                         </xsl:call-template>
1270                       </div>
1271                     </div>
1272                     <p>
1273                       <xsl:copy-of select="$bwStr-AEEF-WeekStart"/>
1274                       <select name="yearWkst">
1275                         <xsl:for-each select="/bedework/shortdaynames/val">
1276                           <xsl:variable name="pos" select="position()"/>
1277                           <option>
1278                             <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute>
1279                             <xsl:value-of select="."/>
1280                           </option>
1281                         </xsl:for-each>
1282                       </select>
1283                     </p>
1284                   </div>
1285                 </td>
1286               </tr>
1287             </table>
1288
1289             <h4>
1290               <xsl:copy-of select="$bwStr-AEEF-RecurrenceAndExceptionDates"/>
1291             </h4>
1292             <div id="raContent">
1293               <div class="dateStartEndBox" id="rdatesFormFields">
1294                 <!--
1295                 <input type="checkbox" name="dateOnly" id="rdateDateOnly" onclick="swapRdateAllDay(this)" value="true"/>
1296                 all day
1297                 <input type="checkbox" name="floating" id="rdateFloating" onclick="swapRdateFloatingTime(this)" value="true"/>
1298                 floating
1299                 <input type="checkbox" name="storeUTC" id="rdateStoreUTC" onclick="swapRdateStoreUTC(this)" value="true"/>
1300                 store as UTC<br/>-->
1301                 <div class="dateFields">
1302                   <!-- input name="eventRdate.date"
1303                          dojoType="dropdowndatepicker"
1304                          formatLength="medium"
1305                          value="today"
1306                          saveFormat="yyyyMMdd"
1307                          id="bwEventWidgetRdate"
1308                          iconURL="{$resourcesRoot}/resources/calIcon.gif"/-->
1309                   <input type="text" name="eventRdate.date" id="bwEventWidgetRdate" size="10"/>
1310                   <script type="text/javascript">
1311                     <xsl:comment>
1312                    /* $("#bwEventWidgetRdate").datepicker({
1313                       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"/>),
1314                       dateFormat: "yymmdd"
1315                     }).attr("readonly", "readonly");
1316                     $("#bwEventWidgetRdate").val('<xsl:value-of select="substring-before(form/start/rfc3339DateTime,'T')"/>');*/
1317                     </xsl:comment>
1318                   </script>
1319                 </div>
1320                 <div id="rdateTimeFields" class="timeFields">
1321                  <select name="eventRdate.hour">
1322                     <option value="00">00</option>
1323                     <option value="01">01</option>
1324                     <option value="02">02</option>
1325                     <option value="03">03</option>
1326                     <option value="04">04</option>
1327                     <option value="05">05</option>
1328                     <option value="06">06</option>
1329                     <option value="07">07</option>
1330                     <option value="08">08</option>
1331                     <option value="09">09</option>
1332                     <option value="10">10</option>
1333                     <option value="11">11</option>
1334                     <option value="12" selected="selected">12</option>
1335                     <option value="13">13</option>
1336                     <option value="14">14</option>
1337                     <option value="15">15</option>
1338                     <option value="16">16</option>
1339                     <option value="17">17</option>
1340                     <option value="18">18</option>
1341                     <option value="19">19</option>
1342                     <option value="20">20</option>
1343                     <option value="21">21</option>
1344                     <option value="22">22</option>
1345                     <option value="23">23</option>
1346                   </select>
1347                   <select name="eventRdate.minute">
1348                     <option value="00" selected="selected">00</option>
1349                     <option value="05">05</option>
1350                     <option value="10">10</option>
1351                     <option value="15">15</option>
1352                     <option value="20">20</option>
1353                     <option value="25">25</option>
1354                     <option value="30">30</option>
1355                     <option value="35">35</option>
1356                     <option value="40">40</option>
1357                     <option value="45">45</option>
1358                     <option value="50">50</option>
1359                     <option value="55">55</option>
1360                   </select>
1361                  <xsl:text> </xsl:text>
1362
1363                   <select name="tzid" id="rdateTzid" class="timezones">
1364                     <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if>
1365                     <option value=""><xsl:copy-of select="$bwStr-AEEF-SelectTimezone"/></option>
1366                     <!--  deprecated: now calling timezone server.  See bedeworkEventForm.js -->
1367                     <!--
1368                     <option value="">select timezone...</option>
1369                     <xsl:variable name="rdateTzId" select="/bedework/now/defaultTzid"/>
1370                     <xsl:for-each select="/bedework/timezones/timezone">
1371                       <option>
1372                         <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute>
1373                         <xsl:if test="$rdateTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if>
1374                         <xsl:value-of select="name"/>
1375                       </option>
1376                     </xsl:for-each>
1377                     -->
1378                   </select>
1379                 </div>
1380                 <xsl:text> </xsl:text>
1381                 <!--bwRdates.update() accepts: date, time, allDay, floating, utc, tzid-->
1382                 <input type="button" name="rdate" value="{$bwStr-AEEF-AddRecurance}" onclick="bwRdates.update(this.form['eventRdate.date'].value,this.form['eventRdate.hour'].value + this.form['eventRdate.minute'].value,false,false,false,this.form.tzid.value)"/>
1383                 <!-- input type="button" name="exdate" value="{$bwStr-AEEF-AddException}" onclick="bwExdates.update(this.form['eventRdate.date'].value,this.form['eventRdate.hour'].value + this.form['eventRdate.minute'].value,false,false,false,this.form.tzid.value)"/-->
1384                 <br class="clear"/>
1385                 <input type="hidden" name="rdates" value="" id="bwRdatesField" />
1386                 <!-- if there are no recurrence dates, the following table will show -->
1387                 <table cellspacing="0" class="invisible" id="bwCurrentRdatesNone">
1388                   <tr><th><xsl:copy-of select="$bwStr-AEEF-RecurrenceDates"/></th></tr>
1389                   <tr><td><xsl:copy-of select="$bwStr-AEEF-NoRecurrenceDates"/></td></tr>
1390                 </table>
1391
1392                 <!-- if there are recurrence dates, the following table will show -->
1393                 <table cellspacing="0" class="invisible" id="bwCurrentRdates">
1394                   <tr>
1395                     <th colspan="4"><xsl:copy-of select="$bwStr-AEEF-RecurrenceDates"/></th>
1396                   </tr>
1397                   <tr class="colNames">
1398                     <td><xsl:copy-of select="$bwStr-AEEF-Date"/></td>
1399                     <td><xsl:copy-of select="$bwStr-AEEF-TIME"/></td>
1400                     <td><xsl:copy-of select="$bwStr-AEEF-TZid"/></td>
1401                     <td></td>
1402                   </tr>
1403                 </table>
1404
1405                 <input type="hidden" name="exdates" value="" id="bwExdatesField" />
1406                 <!-- if there are no exception dates, the following table will show -->
1407                 <table cellspacing="0" class="invisible" id="bwCurrentExdatesNone">
1408                   <tr><th><xsl:copy-of select="$bwStr-AEEF-ExceptionDates"/></th></tr>
1409                   <tr><td><xsl:copy-of select="$bwStr-AEEF-NoExceptionDates"/></td></tr>
1410                 </table>
1411
1412                 <!-- if there are exception dates, the following table will show -->
1413                 <table cellspacing="0" class="invisible" id="bwCurrentExdates">
1414                   <tr>
1415                     <th colspan="4"><xsl:copy-of select="$bwStr-AEEF-ExceptionDates"/></th>
1416                   </tr>
1417                   <tr class="colNames">
1418           <td><xsl:copy-of select="$bwStr-AEEF-Date"/></td>
1419                     <td><xsl:copy-of select="$bwStr-AEEF-Time"/></td>
1420                     <td><xsl:copy-of select="$bwStr-AEEF-TZid"/></td>
1421                     <td></td>
1422                   </tr>
1423                 </table>
1424                 <p>
1425                   <xsl:copy-of select="$bwStr-AEEF-ExceptionDatesMayBeCreated"/>
1426                 </p>
1427               </div>
1428             </div>
1429           </div>
1430         </xsl:otherwise>
1431       </xsl:choose>
1432     </div>
1433
1434     <!-- Access tab -->
1435     <!-- ========== -->
1436     <div id="bwEventTab-Access" class="invisible">
1437       <div id="sharingBox">
1438         <h3>Current Access:</h3>
1439         <div id="bwCurrentAccessWidget">&#160;</div>
1440         <script type="text/javascript">
1441           bwAcl.display("bwCurrentAccessWidget");
1442         </script>
1443         <xsl:call-template name="entityAccessForm">
1444           <xsl:with-param name="outputId">bwCurrentAccessWidget</xsl:with-param>
1445         </xsl:call-template>
1446       </div>
1447     </div>
1448
1449     <!-- Scheduling tab -->
1450     <!-- ============== -->
1451     <div id="bwEventTab-Scheduling" class="invisible">
1452       <div id="scheduling">
1453         <xsl:if test="form/attendees/attendee">
1454           <xsl:apply-templates select="form/attendees">
1455             <xsl:with-param name="trash">no</xsl:with-param>
1456           </xsl:apply-templates>
1457         </xsl:if>
1458         <!-- Recipients are deprecated -->
1459         <!--
1460         <xsl:if test="form/recipients/recipient">
1461           <xsl:apply-templates select="form/recipients">
1462             <xsl:with-param name="trash">no</xsl:with-param>
1463           </xsl:apply-templates>
1464         </xsl:if>
1465         -->
1466         <div class="editAttendees">
1467           <xsl:choose>
1468             <xsl:when test="form/organizerSchedulingObject">
1469               <input name="editEventAttendees" type="submit" value="{$bwStr-AEEF-EditAttendees}"/>
1470             </xsl:when>
1471             <xsl:when test="form/attendeeSchedulingObject">
1472               <p>
1473                 <em>
1474                   <a href="{$schedule-changeStatus}&amp;initUpdate=yes">
1475                     <xsl:copy-of select="$bwStr-AEEF-ChangeMyStatus"/>
1476                   </a>
1477                 </em>
1478               </p>
1479             </xsl:when>
1480             <xsl:otherwise>
1481               <xsl:choose>
1482                 <xsl:when test="form/entityType = '2'">
1483                   <input name="makeEventIntoMeeting" type="submit" value="{$bwStr-AEEF-ScheduleThisTask}"/>
1484                 </xsl:when>
1485                 <xsl:otherwise>
1486                   <input name="makeEventIntoMeeting" type="submit" value="{$bwStr-AEEF-MakeIntoMeeting}"/>
1487                 </xsl:otherwise>
1488               </xsl:choose>
1489             </xsl:otherwise>
1490           </xsl:choose>
1491         </div>
1492       </div>
1493     </div>
1494
1495     <div class="eventSubmitButtons">
1496       <xsl:apply-templates select="form" mode="addEditEventFormButtons" />
1497     </div>
1498   </xsl:template>
1499
1500   <xsl:template match="form" mode="addEditEventFormButtons">
1501     <xsl:choose>
1502       <!-- the following test on the organizerSchedulingObject is not good - will need to fix -->
1503       <xsl:when test="scheduleMethod = '2' and organizerSchedulingObject">
1504         <input name="submitAndSend" type="submit" value="{$bwStr-AEEF-SaveAndSendInvites}"/>
1505         <!-- dissalow: at the moment there's no way to send invitations after the first save
1506         <input name="submit" type="submit" value="{$bwStr-AEEF-SaveDraft}"/> -->
1507       </xsl:when>
1508       <xsl:otherwise>
1509         <input name="submit" type="submit" value="{$bwStr-AEEF-Save}"/>
1510       </xsl:otherwise>
1511     </xsl:choose>
1512     <input name="cancelled" type="submit" value="{$bwStr-AEEF-Cancel}"/>
1513   </xsl:template>
1514
1515   <xsl:template match="val" mode="weekMonthYearNumbers">
1516     <xsl:if test="position() != 1 and position() = last()"> and </xsl:if>
1517     <xsl:value-of select="."/><xsl:choose>
1518       <xsl:when test="substring(., string-length(.)-1, 2) = '11' or
1519                       substring(., string-length(.)-1, 2) = '12' or
1520                       substring(., string-length(.)-1, 2) = '13'">th</xsl:when>
1521       <xsl:when test="substring(., string-length(.), 1) = '1'">st</xsl:when>
1522       <xsl:when test="substring(., string-length(.), 1) = '2'">nd</xsl:when>
1523       <xsl:when test="substring(., string-length(.), 1) = '3'">rd</xsl:when>
1524       <xsl:otherwise>th</xsl:otherwise>
1525     </xsl:choose>
1526     <xsl:if test="position() != last()">, </xsl:if>
1527   </xsl:template>
1528
1529   <xsl:template name="byDayChkBoxList">
1530     <xsl:param name="name"/>
1531     <xsl:for-each select="/bedework/shortdaynames/val">
1532       <xsl:variable name="pos" select="position()"/>
1533       <input type="checkbox">
1534         <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute>
1535         <xsl:attribute name="name"><xsl:value-of select="$name"/></xsl:attribute>
1536       </input>
1537       <xsl:value-of select="."/>
1538     </xsl:for-each>
1539   </xsl:template>
1540
1541   <xsl:template name="buildCheckboxList">
1542     <xsl:param name="current"/>
1543     <xsl:param name="end"/>
1544     <xsl:param name="name"/>
1545     <xsl:param name="splitter">10</xsl:param>
1546     <span class="chkBoxListItem">
1547       <input type="checkbox">
1548         <xsl:attribute name="name"><xsl:value-of select="$name"/></xsl:attribute>
1549         <xsl:attribute name="value"><xsl:value-of select="$current"/></xsl:attribute>
1550       </input>
1551       <xsl:value-of select="$current"/>
1552     </span>
1553     <xsl:if test="$current mod $splitter = 0"><br/></xsl:if>
1554     <xsl:if test="$current = $end"><br/></xsl:if>
1555     <xsl:if test="$current &lt; $end">
1556       <xsl:call-template name="buildCheckboxList">
1557         <xsl:with-param name="current"><xsl:value-of select="$current + 1"/></xsl:with-param>
1558         <xsl:with-param name="end"><xsl:value-of select="$end"/></xsl:with-param>
1559         <xsl:with-param name="name"><xsl:value-of select="$name"/></xsl:with-param>
1560       </xsl:call-template>
1561     </xsl:if>
1562   </xsl:template>
1563
1564   <xsl:template name="recurrenceDayPosOptions">
1565     <option value="0"><xsl:copy-of select="$bwStr-RCPO-None"/></option>
1566     <option value="1"><xsl:copy-of select="$bwStr-RCPO-TheFirst"/></option>
1567     <option value="2"><xsl:copy-of select="$bwStr-RCPO-TheSecond"/></option>
1568     <option value="3"><xsl:copy-of select="$bwStr-RCPO-TheThird"/></option>
1569     <option value="4"><xsl:copy-of select="$bwStr-RCPO-TheFourth"/></option>
1570     <option value="5"><xsl:copy-of select="$bwStr-RCPO-TheFifth"/></option>
1571     <option value="-1"><xsl:copy-of select="$bwStr-RCPO-TheLast"/></option>
1572     <option value=""><xsl:copy-of select="$bwStr-RCPO-Every"/></option>
1573   </xsl:template>
1574
1575   <xsl:template name="buildRecurFields">
1576     <xsl:param name="current"/>
1577     <xsl:param name="total"/>
1578     <xsl:param name="name"/>
1579     <div class="invisible">
1580       <xsl:attribute name="id"><xsl:value-of select="$name"/>RecurFields<xsl:value-of select="$current"/></xsl:attribute>
1581       <xsl:copy-of select="$bwStr-BuRF-And"/>
1582       <select size="12">
1583         <xsl:attribute name="name">by<xsl:value-of select="$name"/>posPos<xsl:value-of select="$current"/></xsl:attribute>
1584         <xsl:if test="$current != $total">
1585           <xsl:attribute name="onchange">changeClass('<xsl:value-of select="$name"/>RecurFields<xsl:value-of select="$current+1"/>','shown')</xsl:attribute>
1586         </xsl:if>
1587         <xsl:call-template name="recurrenceDayPosOptions"/>
1588       </select>
1589       <xsl:call-template name="byDayChkBoxList"/>
1590     </div>
1591     <xsl:if test="$current &lt; $total">
1592       <xsl:call-template name="buildRecurFields">
1593         <xsl:with-param name="current"><xsl:value-of select="$current+1"/></xsl:with-param>
1594         <xsl:with-param name="total"><xsl:value-of select="$total"/></xsl:with-param>
1595         <xsl:with-param name="name"><xsl:value-of select="$name"/></xsl:with-param>
1596       </xsl:call-template>
1597     </xsl:if>
1598   </xsl:template>
1599
1600   <xsl:template name="buildNumberOptions">
1601     <xsl:param name="current"/>
1602     <xsl:param name="total"/>
1603     <option value="{$current}"><xsl:value-of select="$current"/></option>
1604     <xsl:if test="$current &lt; $total">
1605       <xsl:call-template name="buildNumberOptions">
1606         <xsl:with-param name="current"><xsl:value-of select="$current+1"/></xsl:with-param>
1607         <xsl:with-param name="total"><xsl:value-of select="$total"/></xsl:with-param>
1608       </xsl:call-template>
1609     </xsl:if>
1610   </xsl:template>
1611
1612   <xsl:template name="clock">
1613     <div id="bwClock">
1614       <!-- Bedework 24-Hour Clock time selection widget
1615            used with resources/bwClock.js and resources/bwClock.css -->
1616       <xsl:variable name="hour24" select="/bedework/hour24"/><!-- true or false -->
1617       <div id="bwClockClock">
1618         <img id="clockMap" src="{$resourcesRoot}/resources/clockMap.gif" width="368" height="368" border="0" alt="bwClock" usemap="#bwClockMap" />
1619       </div>
1620       <div id="bwClockCover">
1621         &#160;
1622         <!-- this is a special effect div used simply to cover the pixelated edge
1623              where the clock meets the clock box title -->
1624       </div>
1625       <div id="bwClockBox">
1626         <h2>
1627           <xsl:copy-of select="$bwStr-Cloc-Bedework24HourClock"/>
1628         </h2>
1629         <div id="bwClockDateTypeIndicator">
1630           <xsl:copy-of select="$bwStr-Cloc-Type"/>
1631         </div>
1632         <div id="bwClockTime">
1633           <xsl:copy-of select="$bwStr-Cloc-SelectTime"/>
1634         </div>
1635         <div id="bwClockSwitch">
1636           <xsl:copy-of select="$bwStr-Cloc-Switch"/>
1637         </div>
1638         <div id="bwClockCloseText">
1639           <xsl:copy-of select="$bwStr-Cloc-Close"/>
1640         </div>
1641         <div id="bwClockCloseButton">
1642           <a href="javascript:bwClockClose();">X</a>
1643         </div>
1644       </div>
1645       <map name="bwClockMap" id="bwClockMap">
1646         <area shape="rect" alt="close clock" title="{$bwStr-Cloc-CloseClock}" coords="160,167, 200,200" href="javascript:bwClockClose()"/>
1647         <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')" />
1648         <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')" />
1649         <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')" />
1650         <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')" />
1651         <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')" />
1652         <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')" />
1653         <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')" />
1654         <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')" />
1655         <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')" />
1656         <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')" />
1657         <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')" />
1658         <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')" />
1659         <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})" />
1660         <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})" />
1661         <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})" />
1662         <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})" />
1663         <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})" />
1664         <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})" />
1665         <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})" />
1666         <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})" />
1667         <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})" />
1668         <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})" />
1669         <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})" />
1670         <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})" />
1671         <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})" />
1672         <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})" />
1673         <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})" />
1674         <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})" />
1675         <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})" />
1676         <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})" />
1677         <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})" />
1678         <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})" />
1679         <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})" />
1680         <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})" />
1681         <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})" />
1682         <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})" />
1683       </map>
1684     </div>
1685   </xsl:template>
1686  
1687 </xsl:stylesheet>
Note: See TracBrowser for help on using the browser.