Changeset 2174

Show
Ignore:
Timestamp:
05/15/09 00:39:15
Author:
johnsa
Message:

admin client: part way through implementing cross-tagging of events

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/webadmin/webapp/resources/default/default/default.xsl

    r2173 r2174  
    11021102    <xsl:variable name="eventTitle" select="form/title/input/@value"/> 
    11031103    <xsl:variable name="eventUrlPrefix"><xsl:value-of select="$publicCal"/>/event/eventView.do?guid=<xsl:value-of select="$guid"/>&amp;recurrenceId=<xsl:value-of select="$recurrenceId"/></xsl:variable> 
     1104    <xsl:variable name="userPath"><xsl:value-of select="/bedework/syspars/userPrincipalRoot"/>/<xsl:value-of select="/bedework/userInfo/user"/></xsl:variable> 
    11041105 
    11051106    <h2>Event Information</h2> 
    11061107 
    1107     <!-- if a submitted event has comments, display them --> 
    1108     <xsl:if test="form/xproperties/node()[name()='X-BEDEWORK-LOCATION' or name()='X-BEDEWORK-CONTACT' or name()='X-BEDEWORK-CATEGORIES' or name()='X-BEDEWORK-SUBMIT-COMMENT']"> 
    1109       <script type="text/javascript"> 
    1110         bwSubmitComment = new bwSubmitComment( 
    1111           '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/values/text"/></xsl:call-template>', 
    1112           '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/parameters/node()[name()='X-BEDEWORK-PARAM-SUBADDRESS']"/></xsl:call-template>', 
    1113           '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/parameters/node()[name()='X-BEDEWORK-PARAM-URL']"/></xsl:call-template>', 
    1114           '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/values/text"/></xsl:call-template>', 
    1115           '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-PHONE']"/></xsl:call-template>', 
    1116           '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-URL']"/></xsl:call-template>', 
    1117           '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-EMAIL']"/></xsl:call-template>', 
    1118           '<xsl:for-each select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-ALIAS']/values/text"><xsl:call-template name="escapeApos"><xsl:with-param name="str"><xsl:call-template name="substring-afterLastInstanceOf"><xsl:with-param name="string" select="."/><xsl:with-param name="char">/</xsl:with-param></xsl:call-template></xsl:with-param></xsl:call-template><br/></xsl:for-each>', 
    1119           '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CATEGORIES']/values/text"/></xsl:call-template>', 
    1120           '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/values/text"/></xsl:call-template>'); 
    1121       </script> 
    1122  
    1123       <div id="bwSubmittedEventCommentBlock"> 
    1124         <div id="bwSubmittedBy"> 
    1125           Submitted by 
    1126           <xsl:variable name="submitterEmail" select="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTER-EMAIL']/values/text"/> 
    1127           <a href="mailto:{$submitterEmail}?subject=[Event%20Submission] {$eventTitle}" title="Email {$submitterEmail}" class="submitter"> 
    1128             <xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTEDBY']/values/text"/> 
    1129           </a><xsl:text> </xsl:text> 
    1130           (<a href="mailto:{$submitterEmail}?subject=[Event%20Submission] {$eventTitle}" title="Email {$submitterEmail}"> 
    1131             <img src="{$resourcesRoot}/resources/email.gif" border="0"/> 
    1132             send message 
    1133           </a>) 
    1134         </div> 
    1135         <h4>Comments from Submitter</h4> 
    1136         <a href="javascript:toggleVisibility('bwSubmittedEventComment','visible');" class="toggle">show/hide</a> 
    1137         <a href="javascript:bwSubmitComment.launch();" class="toggle">pop-up</a> 
    1138         <div id="bwSubmittedEventComment"> 
    1139           <xsl:if test="/bedework/page = 'modEvent'"><xsl:attribute name="class">invisible</xsl:attribute></xsl:if> 
    1140           <xsl:text> </xsl:text> 
    1141         </div> 
    1142       </div> 
    1143       <script type="text/javascript"> 
    1144         bwSubmitComment.display('bwSubmittedEventComment'); 
    1145       </script> 
    1146     </xsl:if> 
    1147  
    1148     <xsl:variable name="submitter"> 
    1149       <xsl:choose> 
    1150         <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> 
    1151         <xsl:otherwise><xsl:value-of select="/bedework/userInfo/currentUser"/> for <xsl:value-of select="/bedework/userInfo/group"/> (<xsl:value-of select="/bedework/userInfo/user"/>)</xsl:otherwise> 
    1152       </xsl:choose> 
    1153     </xsl:variable> 
    1154     <form name="eventForm" method="post" onsubmit="setEventFields(this,{$portalFriendly},'{$submitter}')"> 
    1155       <xsl:choose> 
    1156         <xsl:when test="/bedework/page = 'modEventPending'"> 
    1157           <xsl:attribute name="action"><xsl:value-of select="$event-updatePending"/></xsl:attribute> 
    1158         </xsl:when> 
    1159         <xsl:otherwise> 
    1160           <xsl:attribute name="action"><xsl:value-of select="$event-update"/></xsl:attribute> 
    1161         </xsl:otherwise> 
    1162       </xsl:choose> 
    1163  
    1164       <!-- Set the underlying calendar; if there is more than one publishing calendar, the 
    1165            form below will test for that and allow this value to be changed.  --> 
    1166       <input type="hidden" name="newCalPath" id="newCalPath"> 
    1167         <xsl:choose> 
    1168           <xsl:when test="/bedework/creating='true'"> 
    1169             <xsl:attribute name="value"><xsl:value-of select="form/calendar/all/select/option/@value"/></xsl:attribute> 
    1170           </xsl:when> 
    1171           <xsl:otherwise> 
    1172             <xsl:attribute name="value"><xsl:value-of select="form/calendar/all/select/option[@selected]/@value"/></xsl:attribute> 
    1173           </xsl:otherwise> 
    1174         </xsl:choose> 
    1175       </input> 
    1176  
    1177       <!-- field to hold status of current submission --> 
    1178       <input type="hidden" name="xBwSubmitStatus" id="bwEventSubmitStatus"> 
    1179         <xsl:attribute name="value"> 
     1108    <!-- First branch on ownership; if we do not own the event, we can only tag it. --> 
     1109    <!-- If we are moderating a pending event, we may also edit it. --> 
     1110    <xsl:choose> 
     1111      <xsl:when test="($userPath = creator) or (/bedework/page = 'modEventPending') or (/bedework/userInfo/superUser = 'true')"> 
     1112 
     1113        <!-- the event is owned by this admin's group user --> 
     1114 
     1115        <!-- if a submitted event has comments, display them --> 
     1116        <xsl:if test="form/xproperties/node()[name()='X-BEDEWORK-LOCATION' or name()='X-BEDEWORK-CONTACT' or name()='X-BEDEWORK-CATEGORIES' or name()='X-BEDEWORK-SUBMIT-COMMENT']"> 
     1117          <script type="text/javascript"> 
     1118            bwSubmitComment = new bwSubmitComment( 
     1119              '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/values/text"/></xsl:call-template>', 
     1120              '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/parameters/node()[name()='X-BEDEWORK-PARAM-SUBADDRESS']"/></xsl:call-template>', 
     1121              '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/parameters/node()[name()='X-BEDEWORK-PARAM-URL']"/></xsl:call-template>', 
     1122              '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/values/text"/></xsl:call-template>', 
     1123              '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-PHONE']"/></xsl:call-template>', 
     1124              '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-URL']"/></xsl:call-template>', 
     1125              '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-EMAIL']"/></xsl:call-template>', 
     1126              '<xsl:for-each select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-ALIAS']/values/text"><xsl:call-template name="escapeApos"><xsl:with-param name="str"><xsl:call-template name="substring-afterLastInstanceOf"><xsl:with-param name="string" select="."/><xsl:with-param name="char">/</xsl:with-param></xsl:call-template></xsl:with-param></xsl:call-template><br/></xsl:for-each>', 
     1127              '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CATEGORIES']/values/text"/></xsl:call-template>', 
     1128              '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/values/text"/></xsl:call-template>'); 
     1129          </script> 
     1130 
     1131          <div id="bwSubmittedEventCommentBlock"> 
     1132            <div id="bwSubmittedBy"> 
     1133              Submitted by 
     1134              <xsl:variable name="submitterEmail" select="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTER-EMAIL']/values/text"/> 
     1135              <a href="mailto:{$submitterEmail}?subject=[Event%20Submission] {$eventTitle}" title="Email {$submitterEmail}" class="submitter"> 
     1136                <xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTEDBY']/values/text"/> 
     1137              </a><xsl:text> </xsl:text> 
     1138              (<a href="mailto:{$submitterEmail}?subject=[Event%20Submission] {$eventTitle}" title="Email {$submitterEmail}"> 
     1139                <img src="{$resourcesRoot}/resources/email.gif" border="0"/> 
     1140                send message 
     1141              </a>) 
     1142            </div> 
     1143            <h4>Comments from Submitter</h4> 
     1144            <a href="javascript:toggleVisibility('bwSubmittedEventComment','visible');" class="toggle">show/hide</a> 
     1145            <a href="javascript:bwSubmitComment.launch();" class="toggle">pop-up</a> 
     1146            <div id="bwSubmittedEventComment"> 
     1147              <xsl:if test="/bedework/page = 'modEvent'"><xsl:attribute name="class">invisible</xsl:attribute></xsl:if> 
     1148              <xsl:text> </xsl:text> 
     1149            </div> 
     1150          </div> 
     1151          <script type="text/javascript"> 
     1152            bwSubmitComment.display('bwSubmittedEventComment'); 
     1153          </script> 
     1154        </xsl:if> 
     1155 
     1156        <xsl:variable name="submitter"> 
    11801157          <xsl:choose> 
    1181             <xsl:when test="/bedework/creating = 'true'">1</xsl:when> 
    1182             <xsl:otherwise><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-STATUS']/values/text"/></xsl:otherwise> 
     1158            <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> 
     1159            <xsl:otherwise><xsl:value-of select="/bedework/userInfo/currentUser"/> for <xsl:value-of select="/bedework/userInfo/group"/> (<xsl:value-of select="/bedework/userInfo/user"/>)</xsl:otherwise> 
    11831160          </xsl:choose> 
    1184         </xsl:attribute> 
    1185       </input> 
    1186  
    1187       <!-- Setup email notification fields --> 
    1188       <input type="hidden" id="submitNotification" name="submitNotification" value="false"/> 
    1189       <!-- "from" should be a preference: hard code it for now --> 
    1190       <input type="hidden" id="snfrom" name="snfrom" value="bedework@yoursite.edu"/> 
    1191       <input type="hidden" id="snsubject" name="snsubject" value=""/> 
    1192       <input type="hidden" id="sntext" name="sntext" value=""/> 
    1193  
    1194       <xsl:call-template name="submitEventButtons"> 
    1195         <xsl:with-param name="eventTitle" select="$eventTitle"/> 
    1196         <xsl:with-param name="eventUrlPrefix" select="$eventUrlPrefix"/> 
    1197       </xsl:call-template> 
    1198  
    1199       <table class="eventFormTable"> 
    1200         <tr> 
    1201           <td class="fieldName"> 
    1202             Title: 
    1203           </td> 
    1204           <td> 
    1205             <xsl:copy-of select="form/title/*"/> 
    1206           </td> 
    1207         </tr> 
    1208  
    1209         <xsl:if test="count(form/calendar/all/select/option) &gt; 1 and 
    1210                       not(starts-with(form/calendar/path,$submissionsRootUnencoded))"> 
    1211         <!-- check to see if we have more than one publishing calendar 
    1212              but disallow directly setting for pending events --> 
    1213           <tr> 
    1214             <td class="fieldName"> 
    1215               Calendar: 
    1216             </td> 
    1217             <td> 
    1218               <xsl:if test="form/calendar/preferred/select/option"> 
    1219                 <!-- Display the preferred calendars by default if they exist --> 
    1220                 <select name="bwPreferredCalendars" id="bwPreferredCalendars" onchange="this.form.newCalPath.value = this.value"> 
    1221                   <option value=""> 
    1222                     Select: 
    1223                   </option> 
    1224                   <xsl:for-each select="form/calendar/preferred/select/option"> 
    1225                     <xsl:sort select="." order="ascending"/> 
    1226                     <option> 
    1227                       <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> 
    1228                       <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
    1229                       <xsl:choose> 
    1230                         <xsl:when test="starts-with(node(),/bedework/submissionsRoot/unencoded)"> 
    1231                           submitted events 
    1232                         </xsl:when> 
    1233                         <xsl:otherwise> 
    1234                           <xsl:value-of select="substring-after(node(),'/public/')"/> 
    1235                         </xsl:otherwise> 
    1236                       </xsl:choose> 
    1237                     </option> 
    1238                   </xsl:for-each> 
    1239                 </select> 
    1240               </xsl:if> 
    1241               <!-- hide the listing of all calendars if preferred calendars exist, otherwise show them --> 
    1242               <select name="bwAllCalendars" id="bwAllCalendars" onchange="this.form.newCalPath.value = this.value;"> 
    1243                 <xsl:if test="form/calendar/preferred/select/option"> 
    1244                   <xsl:attribute name="class">invisible</xsl:attribute> 
    1245                 </xsl:if> 
    1246                 <option value=""> 
    1247                   Select: 
    1248                 </option> 
    1249                 <xsl:for-each select="form/calendar/all/select/option"> 
    1250                   <xsl:sort select="." order="ascending"/> 
    1251                   <option> 
    1252                     <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> 
    1253                     <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
    1254                     <xsl:choose> 
    1255                       <xsl:when test="starts-with(node(),/bedework/submissionsRoot/unencoded)"> 
    1256                         submitted events 
    1257                       </xsl:when> 
    1258                       <xsl:otherwise> 
    1259                         <xsl:value-of select="substring-after(node(),'/public/')"/> 
    1260                       </xsl:otherwise> 
    1261                     </xsl:choose> 
    1262                   </option> 
    1263                 </xsl:for-each> 
    1264               </select> 
    1265               <xsl:text> </xsl:text> 
    1266               <!-- allow for toggling between the preferred and all calendars listings if preferred 
    1267                    calendars exist --> 
    1268               <xsl:if test="form/calendar/preferred/select/option"> 
    1269                 <input type="radio" name="toggleCalendarLists" value="preferred" checked="checked" onclick="changeClass('bwPreferredCalendars','shown');changeClass('bwAllCalendars','invisible');this.form.newCalPath.value = this.form.bwPreferredCalendars.value;"/> 
    1270                 preferred 
    1271                 <input type="radio" name="toggleCalendarLists" value="all" onclick="changeClass('bwPreferredCalendars','invisible');changeClass('bwAllCalendars','shown');this.form.newCalPath.value = this.form.bwAllCalendars.value;"/> 
    1272                 all 
    1273               </xsl:if> 
    1274               <br/> 
    1275               <!-- span id="calDescriptionsLink"> 
    1276                 <a href="javascript:launchSimpleWindow('{$calendar-fetchDescriptions}')">calendar descriptions</a> 
    1277               </span--> 
    1278             </td> 
    1279           </tr> 
    1280         </xsl:if> 
    1281  
    1282         <tr> 
    1283           <td class="fieldName"> 
    1284             Date &amp; Time: 
    1285           </td> 
    1286           <td> 
    1287             <!-- Set the timefields class for the first load of the page; 
    1288                  subsequent changes will take place using javascript without a 
    1289                  page reload. --> 
    1290             <xsl:variable name="timeFieldsClass"> 
    1291               <xsl:choose> 
    1292                 <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 
    1293                 <xsl:otherwise>timeFields</xsl:otherwise> 
    1294               </xsl:choose> 
    1295             </xsl:variable> 
     1161        </xsl:variable> 
     1162        <form name="eventForm" method="post" onsubmit="setEventFields(this,{$portalFriendly},'{$submitter}')"> 
     1163          <xsl:choose> 
     1164            <xsl:when test="/bedework/page = 'modEventPending'"> 
     1165              <xsl:attribute name="action"><xsl:value-of select="$event-updatePending"/></xsl:attribute> 
     1166            </xsl:when> 
     1167            <xsl:otherwise> 
     1168              <xsl:attribute name="action"><xsl:value-of select="$event-update"/></xsl:attribute> 
     1169            </xsl:otherwise> 
     1170          </xsl:choose> 
     1171 
     1172          <!-- Set the underlying calendar; if there is more than one publishing calendar, the 
     1173               form below will test for that and allow this value to be changed.  --> 
     1174          <input type="hidden" name="newCalPath" id="newCalPath"> 
    12961175            <xsl:choose> 
    1297               <xsl:when test="form/allDay/input/@checked='checked'"> 
    1298                 <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/> 
    1299                 <input type="hidden" name="eventStartDate.dateOnly" value="on" id="allDayStartDateField"/> 
    1300                 <input type="hidden" name="eventEndDate.dateOnly" value="on" id="allDayEndDateField"/> 
     1176              <xsl:when test="/bedework/creating='true'"> 
     1177                <xsl:attribute name="value"><xsl:value-of select="form/calendar/all/select/option/@value"/></xsl:attribute> 
    13011178              </xsl:when> 
    13021179              <xsl:otherwise> 
    1303                 <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/> 
    1304                 <input type="hidden" name="eventStartDate.dateOnly" value="off" id="allDayStartDateField"/> 
    1305                 <input type="hidden" name="eventEndDate.dateOnly" value="off" id="allDayEndDateField"/> 
     1180                <xsl:attribute name="value"><xsl:value-of select="form/calendar/all/select/option[@selected]/@value"/></xsl:attribute> 
    13061181              </xsl:otherwise> 
    13071182            </xsl:choose> 
    1308             all day 
    1309  
    1310             <!-- floating event: no timezone (and not UTC) --> 
    1311             <xsl:choose> 
    1312               <xsl:when test="form/floating/input/@checked='checked'"> 
    1313                 <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="on" checked="checked"/> 
    1314                 <input type="hidden" name="eventStartDate.floating" value="on" id="startFloating"/> 
    1315                 <input type="hidden" name="eventEndDate.floating" value="on" id="endFloating"/> 
    1316               </xsl:when> 
    1317               <xsl:otherwise> 
    1318                 <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="off"/> 
    1319                 <input type="hidden" name="eventStartDate.floating" value="off" id="startFloating"/> 
    1320                 <input type="hidden" name="eventEndDate.floating" value="off" id="endFloating"/> 
    1321               </xsl:otherwise> 
    1322             </xsl:choose> 
    1323             floating 
    1324  
    1325             <!-- store time as coordinated universal time (UTC) --> 
    1326             <xsl:choose> 
    1327               <xsl:when test="form/storeUTC/input/@checked='checked'"> 
    1328                 <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="on" checked="checked"/> 
    1329                 <input type="hidden" name="eventStartDate.storeUTC" value="on" id="startStoreUTC"/> 
    1330                 <input type="hidden" name="eventEndDate.storeUTC" value="on" id="endStoreUTC"/> 
    1331               </xsl:when> 
    1332               <xsl:otherwise> 
    1333                 <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="off"/> 
    1334                 <input type="hidden" name="eventStartDate.storeUTC" value="off" id="startStoreUTC"/> 
    1335                 <input type="hidden" name="eventEndDate.storeUTC" value="off" id="endStoreUTC"/> 
    1336               </xsl:otherwise> 
    1337             </xsl:choose> 
    1338             store as UTC 
    1339  
    1340             <br/> 
    1341             <div class="dateStartEndBox"> 
    1342               <strong>Start:</strong> 
    1343               <div class="dateFields"> 
    1344                 <span class="startDateLabel">Date </span> 
    1345                 <xsl:choose> 
    1346                   <xsl:when test="$portalFriendly = 'true'"> 
    1347                     <xsl:copy-of select="form/start/month/*"/> 
    1348                     <xsl:copy-of select="form/start/day/*"/> 
    1349                     <xsl:choose> 
    1350                       <xsl:when test="/bedework/creating = 'true'"> 
    1351                         <xsl:copy-of select="form/start/year/*"/> 
    1352                       </xsl:when> 
    1353                       <xsl:otherwise> 
    1354                         <xsl:copy-of select="form/start/yearText/*"/> 
    1355                       </xsl:otherwise> 
    1356                     </xsl:choose> 
    1357                     <script language="JavaScript" type="text/javascript"> 
    1358                       <xsl:comment> 
    1359                       startDateDynCalWidget = new dynCalendar('startDateDynCalWidget', <xsl:value-of select="number(form/start/yearText/input/@value)"/>, <xsl:value-of select="number(form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(form/start/day/select/option[@selected='selected']/@value)"/>, 'startDateCalWidgetCallback',true,'<xsl:value-of select="$resourcesRoot"/>/resources/'); 
    1360                       </xsl:comment> 
    1361                     </script> 
    1362                   </xsl:when> 
    1363                   <xsl:otherwise> 
    1364                     <!-- span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetStartDate" iconURL="{$resourcesRoot}/resources/calIcon.gif"> 
    1365                       <xsl:attribute name="value"><xsl:value-of select="form/start/rfc3339DateTime"/></xsl:attribute> 
    1366                       <xsl:text> </xsl:text> 
    1367                     </span--> 
    1368                     <input type="text" name="bwEventWidgetStartDate" id="bwEventWidgetStartDate" size="10"/> 
    1369                     <script language="JavaScript" type="text/javascript"> 
    1370                       <xsl:comment> 
    1371                       $("#bwEventWidgetStartDate").datepicker({ 
    1372                         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"/>) 
    1373                       }).attr("readonly", "readonly"); 
    1374                       $("#bwEventWidgetStartDate").val('<xsl:value-of select="substring-before(form/start/rfc3339DateTime,'T')"/>'); 
    1375                       //alert($("#bwEventWidgetStartDate").datepicker("getDate")); 
    1376                       </xsl:comment> 
    1377                     </script> 
    1378                     <input type="hidden" name="eventStartDate.year"> 
    1379                       <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute> 
    1380                     </input> 
    1381                     <input type="hidden" name="eventStartDate.month"> 
    1382                       <xsl:attribute name="value"><xsl:value-of select="form/start/month/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
    1383                     </input> 
    1384                     <input type="hidden" name="eventStartDate.day"> 
    1385                       <xsl:attribute name="value"><xsl:value-of select="form/start/day/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
    1386                     </input> 
    1387                   </xsl:otherwise> 
    1388                 </xsl:choose> 
    1389               </div> 
    1390               <div class="{$timeFieldsClass}" id="startTimeFields"> 
    1391                 <span id="calWidgetStartTimeHider" class="show"> 
    1392                   <xsl:copy-of select="form/start/hour/*"/> 
    1393                   <xsl:copy-of select="form/start/minute/*"/> 
    1394                   <xsl:if test="form/start/ampm"> 
    1395                     <xsl:copy-of select="form/start/ampm/*"/> 
     1183          </input> 
     1184 
     1185          <!-- field to hold status of current submission --> 
     1186          <input type="hidden" name="xBwSubmitStatus" id="bwEventSubmitStatus"> 
     1187            <xsl:attribute name="value"> 
     1188              <xsl:choose> 
     1189                <xsl:when test="/bedework/creating = 'true'">1</xsl:when> 
     1190                <xsl:otherwise><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-STATUS']/values/text"/></xsl:otherwise> 
     1191              </xsl:choose> 
     1192            </xsl:attribute> 
     1193          </input> 
     1194 
     1195          <!-- Setup email notification fields --> 
     1196          <input type="hidden" id="submitNotification" name="submitNotification" value="false"/> 
     1197          <!-- "from" should be a preference: hard code it for now --> 
     1198          <input type="hidden" id="snfrom" name="snfrom" value="bedework@yoursite.edu"/> 
     1199          <input type="hidden" id="snsubject" name="snsubject" value=""/> 
     1200          <input type="hidden" id="sntext" name="sntext" value=""/> 
     1201 
     1202          <xsl:call-template name="submitEventButtons"> 
     1203            <xsl:with-param name="eventTitle" select="$eventTitle"/> 
     1204            <xsl:with-param name="eventUrlPrefix" select="$eventUrlPrefix"/> 
     1205          </xsl:call-template> 
     1206 
     1207          <table class="eventFormTable"> 
     1208            <tr> 
     1209              <td class="fieldName"> 
     1210                Title: 
     1211              </td> 
     1212              <td> 
     1213                <xsl:copy-of select="form/title/*"/> 
     1214              </td> 
     1215            </tr> 
     1216 
     1217            <xsl:if test="count(form/calendar/all/select/option) &gt; 1 and 
     1218                          not(starts-with(form/calendar/path,$submissionsRootUnencoded))"> 
     1219            <!-- check to see if we have more than one publishing calendar 
     1220                 but disallow directly setting for pending events --> 
     1221              <tr> 
     1222                <td class="fieldName"> 
     1223                  Calendar: 
     1224                </td> 
     1225                <td> 
     1226                  <xsl:if test="form/calendar/preferred/select/option"> 
     1227                    <!-- Display the preferred calendars by default if they exist --> 
     1228                    <select name="bwPreferredCalendars" id="bwPreferredCalendars" onchange="this.form.newCalPath.value = this.value"> 
     1229                      <option value=""> 
     1230                        Select: 
     1231                      </option> 
     1232                      <xsl:for-each select="form/calendar/preferred/select/option"> 
     1233                        <xsl:sort select="." order="ascending"/> 
     1234                        <option> 
     1235                          <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> 
     1236                          <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
     1237                          <xsl:choose> 
     1238                            <xsl:when test="starts-with(node(),/bedework/submissionsRoot/unencoded)"> 
     1239                              submitted events 
     1240                            </xsl:when> 
     1241                            <xsl:otherwise> 
     1242                              <xsl:value-of select="substring-after(node(),'/public/')"/> 
     1243                            </xsl:otherwise> 
     1244                          </xsl:choose> 
     1245                        </option> 
     1246                      </xsl:for-each> 
     1247                    </select> 
    13961248                  </xsl:if> 
    1397                   <xsl:text> </xsl:text> 
    1398                   <a href="javascript:bwClockLaunch('eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a> 
    1399  
    1400                   <select name="eventStartDate.tzid" id="startTzid" class="timezones"> 
    1401                     <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">true</xsl:attribute></xsl:if> 
    1402                     <option value="-1">select timezone...</option> 
    1403                     <xsl:variable name="startTzId" select="form/start/tzid"/> 
    1404                     <xsl:for-each select="/bedework/timezones/timezone"> 
     1249                  <!-- hide the listing of all calendars if preferred calendars exist, otherwise show them --> 
     1250                  <select name="bwAllCalendars" id="bwAllCalendars" onchange="this.form.newCalPath.value = this.value;"> 
     1251                    <xsl:if test="form/calendar/preferred/select/option"> 
     1252                      <xsl:attribute name="class">invisible</xsl:attribute> 
     1253                    </xsl:if> 
     1254                    <option value=""> 
     1255                      Select: 
     1256                    </option> 
     1257                    <xsl:for-each select="form/calendar/all/select/option"> 
     1258                      <xsl:sort select="." order="ascending"/> 
    14051259                      <option> 
    1406                         <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> 
    1407                         <xsl:if test="$startTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
    1408                         <xsl:value-of select="name"/> 
     1260                        <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> 
     1261                        <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
     1262                        <xsl:choose> 
     1263                          <xsl:when test="starts-with(node(),/bedework/submissionsRoot/unencoded)"> 
     1264                            submitted events 
     1265                          </xsl:when> 
     1266                          <xsl:otherwise> 
     1267                            <xsl:value-of select="substring-after(node(),'/public/')"/> 
     1268                          </xsl:otherwise> 
     1269                        </xsl:choose> 
    14091270                      </option> 
    14101271                    </xsl:for-each> 
    14111272                  </select> 
    1412                 </span> 
    1413               </div> 
    1414             </div> 
    1415             <div class="dateStartEndBox"> 
    1416               <strong>End:</strong> 
    1417               <xsl:choose> 
    1418                 <xsl:when test="form/end/type='E'"> 
    1419                   <input type="radio" name="eventEndType" id="bwEndDateTimeButton" value="E" checked="checked" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    1420                 </xsl:when> 
    1421                 <xsl:otherwise> 
    1422                   <input type="radio" name="eventEndType" id="bwEndDateTimeButton" value="E" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    1423                 </xsl:otherwise> 
    1424               </xsl:choose> 
    1425               Date 
    1426               <xsl:variable name="endDateTimeClass"> 
     1273                  <xsl:text> </xsl:text> 
     1274                  <!-- allow for toggling between the preferred and all calendars listings if preferred 
     1275                       calendars exist --> 
     1276                  <xsl:if test="form/calendar/preferred/select/option"> 
     1277                    <input type="radio" name="toggleCalendarLists" value="preferred" checked="checked" onclick="changeClass('bwPreferredCalendars','shown');changeClass('bwAllCalendars','invisible');this.form.newCalPath.value = this.form.bwPreferredCalendars.value;"/> 
     1278                    preferred 
     1279                    <input type="radio" name="toggleCalendarLists" value="all" onclick="changeClass('bwPreferredCalendars','invisible');changeClass('bwAllCalendars','shown');this.form.newCalPath.value = this.form.bwAllCalendars.value;"/> 
     1280                    all 
     1281                  </xsl:if> 
     1282                  <br/> 
     1283                  <!-- span id="calDescriptionsLink"> 
     1284                    <a href="javascript:launchSimpleWindow('{$calendar-fetchDescriptions}')">calendar descriptions</a> 
     1285                  </span--> 
     1286                </td> 
     1287              </tr> 
     1288            </xsl:if> 
     1289 
     1290            <tr> 
     1291              <td class="fieldName"> 
     1292                Date &amp; Time: 
     1293              </td> 
     1294              <td> 
     1295                <!-- Set the timefields class for the first load of the page; 
     1296                     subsequent changes will take place using javascript without a 
     1297                     page reload. --> 
     1298                <xsl:variable name="timeFieldsClass"> 
     1299                  <xsl:choose> 
     1300                    <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 
     1301                    <xsl:otherwise>timeFields</xsl:otherwise> 
     1302                  </xsl:choose> 
     1303                </xsl:variable> 
    14271304                <xsl:choose> 
    1428                   <xsl:when test="form/end/type='E'">shown</xsl:when> 
    1429                   <xsl:otherwise>invisible</xsl:otherwise> 
     1305                  <xsl:when test="form/allDay/input/@checked='checked'"> 
     1306                    <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/> 
     1307                    <input type="hidden" name="eventStartDate.dateOnly" value="on" id="allDayStartDateField"/> 
     1308                    <input type="hidden" name="eventEndDate.dateOnly" value="on" id="allDayEndDateField"/> 
     1309                  </xsl:when> 
     1310                  <xsl:otherwise> 
     1311                    <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/> 
     1312                    <input type="hidden" name="eventStartDate.dateOnly" value="off" id="allDayStartDateField"/> 
     1313                    <input type="hidden" name="eventEndDate.dateOnly" value="off" id="allDayEndDateField"/> 
     1314                  </xsl:otherwise> 
    14301315                </xsl:choose> 
    1431               </xsl:variable> 
    1432               <div class="{$endDateTimeClass}" id="endDateTime"> 
    1433                 <div class="dateFields"> 
     1316                all day 
     1317 
     1318                <!-- floating event: no timezone (and not UTC) --> 
     1319                <xsl:choose> 
     1320                  <xsl:when test="form/floating/input/@checked='checked'"> 
     1321                    <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="on" checked="checked"/> 
     1322                    <input type="hidden" name="eventStartDate.floating" value="on" id="startFloating"/> 
     1323                    <input type="hidden" name="eventEndDate.floating" value="on" id="endFloating"/> 
     1324                  </xsl:when> 
     1325                  <xsl:otherwise> 
     1326                    <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="off"/> 
     1327                    <input type="hidden" name="eventStartDate.floating" value="off" id="startFloating"/> 
     1328                    <input type="hidden" name="eventEndDate.floating" value="off" id="endFloating"/> 
     1329                  </xsl:otherwise> 
     1330                </xsl:choose> 
     1331                floating 
     1332 
     1333                <!-- store time as coordinated universal time (UTC) --> 
     1334                <xsl:choose> 
     1335                  <xsl:when test="form/storeUTC/input/@checked='checked'"> 
     1336                    <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="on" checked="checked"/> 
     1337                    <input type="hidden" name="eventStartDate.storeUTC" value="on" id="startStoreUTC"/> 
     1338                    <input type="hidden" name="eventEndDate.storeUTC" value="on" id="endStoreUTC"/> 
     1339                  </xsl:when> 
     1340                  <xsl:otherwise> 
     1341                    <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="off"/> 
     1342                    <input type="hidden" name="eventStartDate.storeUTC" value="off" id="startStoreUTC"/> 
     1343                    <input type="hidden" name="eventEndDate.storeUTC" value="off" id="endStoreUTC"/> 
     1344                  </xsl:otherwise> 
     1345                </xsl:choose> 
     1346                store as UTC 
     1347 
     1348                <br/> 
     1349                <div class="dateStartEndBox"> 
     1350                  <strong>Start:</strong> 
     1351                  <div class="dateFields"> 
     1352                    <span class="startDateLabel">Date </span> 
     1353                    <xsl:choose> 
     1354                      <xsl:when test="$portalFriendly = 'true'"> 
     1355                        <xsl:copy-of select="form/start/month/*"/> 
     1356                        <xsl:copy-of select="form/start/day/*"/> 
     1357                        <xsl:choose> 
     1358                          <xsl:when test="/bedework/creating = 'true'"> 
     1359                            <xsl:copy-of select="form/start/year/*"/> 
     1360                          </xsl:when> 
     1361                          <xsl:otherwise> 
     1362                            <xsl:copy-of select="form/start/yearText/*"/> 
     1363                          </xsl:otherwise> 
     1364                        </xsl:choose> 
     1365                        <script language="JavaScript" type="text/javascript"> 
     1366                          <xsl:comment> 
     1367                          startDateDynCalWidget = new dynCalendar('startDateDynCalWidget', <xsl:value-of select="number(form/start/yearText/input/@value)"/>, <xsl:value-of select="number(form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(form/start/day/select/option[@selected='selected']/@value)"/>, 'startDateCalWidgetCallback',true,'<xsl:value-of select="$resourcesRoot"/>/resources/'); 
     1368                          </xsl:comment> 
     1369                        </script> 
     1370                      </xsl:when> 
     1371                      <xsl:otherwise> 
     1372                        <!-- span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetStartDate" iconURL="{$resourcesRoot}/resources/calIcon.gif"> 
     1373                          <xsl:attribute name="value"><xsl:value-of select="form/start/rfc3339DateTime"/></xsl:attribute> 
     1374                          <xsl:text> </xsl:text> 
     1375                        </span--> 
     1376                        <input type="text" name="bwEventWidgetStartDate" id="bwEventWidgetStartDate" size="10"/> 
     1377                        <script language="JavaScript" type="text/javascript"> 
     1378                          <xsl:comment> 
     1379                          $("#bwEventWidgetStartDate").datepicker({ 
     1380                            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"/>) 
     1381                          }).attr("readonly", "readonly"); 
     1382                          $("#bwEventWidgetStartDate").val('<xsl:value-of select="substring-before(form/start/rfc3339DateTime,'T')"/>'); 
     1383                          //alert($("#bwEventWidgetStartDate").datepicker("getDate")); 
     1384                          </xsl:comment> 
     1385                        </script> 
     1386                        <input type="hidden" name="eventStartDate.year"> 
     1387                          <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute> 
     1388                        </input> 
     1389                        <input type="hidden" name="eventStartDate.month"> 
     1390                          <xsl:attribute name="value"><xsl:value-of select="form/start/month/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
     1391                        </input> 
     1392                        <input type="hidden" name="eventStartDate.day"> 
     1393                          <xsl:attribute name="value"><xsl:value-of select="form/start/day/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
     1394                        </input> 
     1395                      </xsl:otherwise> 
     1396                    </xsl:choose> 
     1397                  </div> 
     1398                  <div class="{$timeFieldsClass}" id="startTimeFields"> 
     1399                    <span id="calWidgetStartTimeHider" class="show"> 
     1400                      <xsl:copy-of select="form/start/hour/*"/> 
     1401                      <xsl:copy-of select="form/start/minute/*"/> 
     1402                      <xsl:if test="form/start/ampm"> 
     1403                        <xsl:copy-of select="form/start/ampm/*"/> 
     1404                      </xsl:if> 
     1405                      <xsl:text> </xsl:text> 
     1406                      <a href="javascript:bwClockLaunch('eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a> 
     1407 
     1408                      <select name="eventStartDate.tzid" id="startTzid" class="timezones"> 
     1409                        <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">true</xsl:attribute></xsl:if> 
     1410                        <option value="-1">select timezone...</option> 
     1411                        <xsl:variable name="startTzId" select="form/start/tzid"/> 
     1412                        <xsl:for-each select="/bedework/timezones/timezone"> 
     1413                          <option> 
     1414                            <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> 
     1415                            <xsl:if test="$startTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
     1416                            <xsl:value-of select="name"/> 
     1417                          </option> 
     1418                        </xsl:for-each> 
     1419                      </select> 
     1420                    </span> 
     1421                  </div> 
     1422                </div> 
     1423                <div class="dateStartEndBox"> 
     1424                  <strong>End:</strong> 
    14341425                  <xsl:choose> 
    1435                     <xsl:when test="$portalFriendly = 'true'"> 
    1436                       <xsl:copy-of select="form/end/dateTime/month/*"/> 
    1437                       <xsl:copy-of select="form/end/dateTime/day/*"/> 
     1426                    <xsl:when test="form/end/type='E'"> 
     1427                      <input type="radio" name="eventEndType" id="bwEndDateTimeButton" value="E" checked="checked" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
     1428                    </xsl:when> 
     1429                    <xsl:otherwise> 
     1430                      <input type="radio" name="eventEndType" id="bwEndDateTimeButton" value="E" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
     1431                    </xsl:otherwise> 
     1432                  </xsl:choose> 
     1433                  Date 
     1434                  <xsl:variable name="endDateTimeClass"> 
     1435                    <xsl:choose> 
     1436                      <xsl:when test="form/end/type='E'">shown</xsl:when> 
     1437                      <xsl:otherwise>invisible</xsl:otherwise> 
     1438                    </xsl:choose> 
     1439                  </xsl:variable> 
     1440                  <div class="{$endDateTimeClass}" id="endDateTime"> 
     1441                    <div class="dateFields"> 
    14381442                      <xsl:choose> 
    1439                         <xsl:when test="/bedework/creating = 'true'"> 
    1440                           <xsl:copy-of select="form/end/dateTime/year/*"/> 
     1443                        <xsl:when test="$portalFriendly = 'true'"> 
     1444                          <xsl:copy-of select="form/end/dateTime/month/*"/> 
     1445                          <xsl:copy-of select="form/end/dateTime/day/*"/> 
     1446                          <xsl:choose> 
     1447                            <xsl:when test="/bedework/creating = 'true'"> 
     1448                              <xsl:copy-of select="form/end/dateTime/year/*"/> 
     1449                            </xsl:when> 
     1450                            <xsl:otherwise> 
     1451                              <xsl:copy-of select="form/end/dateTime/yearText/*"/> 
     1452                            </xsl:otherwise> 
     1453                          </xsl:choose> 
     1454                          <script language="JavaScript" type="text/javascript"> 
     1455                            <xsl:comment> 
     1456                            endDateDynCalWidget = new dynCalendar('endDateDynCalWidget', <xsl:value-of select="number(form/start/yearText/input/@value)"/>, <xsl:value-of select="number(form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(form/start/day/select/option[@selected='selected']/@value)"/>, 'endDateCalWidgetCallback',true,'<xsl:value-of select="$resourcesRoot"/>/resources/'); 
     1457                          </xsl:comment> 
     1458                          </script> 
    14411459                        </xsl:when> 
    14421460                        <xsl:otherwise> 
    1443                           <xsl:copy-of select="form/end/dateTime/yearText/*"/> 
    1444                         </xsl:otherwise> 
    1445                       </xsl:choose> 
    1446                       <script language="JavaScript" type="text/javascript"> 
    1447                         <xsl:comment> 
    1448                         endDateDynCalWidget = new dynCalendar('endDateDynCalWidget', <xsl:value-of select="number(form/start/yearText/input/@value)"/>, <xsl:value-of select="number(form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(form/start/day/select/option[@selected='selected']/@value)"/>, 'endDateCalWidgetCallback',true,'<xsl:value-of select="$resourcesRoot"/>/resources/'); 
    1449                       </xsl:comment> 
    1450                       </script> 
    1451                     </xsl:when> 
    1452                     <xsl:otherwise> 
    1453                       <!-- span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetEndDate" iconURL="{$resourcesRoot}/resources/calIcon.gif"> 
    1454                         <xsl:attribute name="value"><xsl:value-of select="form/end/rfc3339DateTime"/></xsl:attribute> 
    1455                         <xsl:text> </xsl:text> 
    1456                       </span--> 
    1457                       <input type="text" name="bwEventWidgetEndDate" id="bwEventWidgetEndDate" size="10"/> 
    1458                       <script language="JavaScript" type="text/javascript"> 
    1459                         <xsl:comment> 
    1460                         $("#bwEventWidgetEndDate").datepicker({ 
    1461                           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"/>) 
    1462                         }).attr("readonly", "readonly"); 
    1463                         $("#bwEventWidgetEndDate").val('<xsl:value-of select="substring-before(form/end/rfc3339DateTime,'T')"/>'); 
    1464                         </xsl:comment> 
    1465                       </script> 
    1466                       <input type="hidden" name="eventEndDate.year"> 
    1467                         <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/yearText/input/@value"/></xsl:attribute> 
    1468                       </input> 
    1469                       <input type="hidden" name="eventEndDate.month"> 
    1470                         <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/month/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
    1471                       </input> 
    1472                       <input type="hidden" name="eventEndDate.day"> 
    1473                         <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/day/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
    1474                       </input> 
    1475                     </xsl:otherwise> 
    1476                   </xsl:choose> 
    1477                 </div> 
    1478                 <div class="{$timeFieldsClass}" id="endTimeFields"> 
    1479                   <span id="calWidgetEndTimeHider" class="show"> 
    1480                     <xsl:copy-of select="form/end/dateTime/hour/*"/> 
    1481                     <xsl:copy-of select="form/end/dateTime/minute/*"/> 
    1482                     <xsl:if test="form/end/dateTime/ampm"> 
    1483                       <xsl:copy-of select="form/end/dateTime/ampm/*"/> 
    1484                     </xsl:if> 
    1485                     <xsl:text> </xsl:text> 
    1486                     <a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a> 
    1487  
    1488                     <select name="eventEndDate.tzid" id="endTzid" class="timezones"> 
    1489                       <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">true</xsl:attribute></xsl:if> 
    1490                       <option value="-1">select timezone...</option> 
    1491                       <xsl:variable name="endTzId" select="form/end/dateTime/tzid"/> 
    1492                       <xsl:for-each select="/bedework/timezones/timezone"> 
    1493                         <option> 
    1494                           <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> 
    1495                           <xsl:if test="$endTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
    1496                           <xsl:value-of select="name"/> 
    1497                         </option> 
    1498                       </xsl:for-each> 
    1499                     </select> 
    1500                   </span> 
    1501                 </div> 
    1502               </div> 
    1503               <br/> 
    1504               <div id="clock" class="invisible"> 
    1505                 <xsl:call-template name="clock"/> 
    1506               </div> 
    1507               <div class="dateFields"> 
    1508                 <xsl:choose> 
    1509                   <xsl:when test="form/end/type='D'"> 
    1510                     <input type="radio" name="eventEndType" value="D" checked="checked" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    1511                   </xsl:when> 
    1512                   <xsl:otherwise> 
    1513                     <input type="radio" name="eventEndType" value="D" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    1514                   </xsl:otherwise> 
    1515                 </xsl:choose> 
    1516                 Duration 
    1517                 <xsl:variable name="endDurationClass"> 
    1518                   <xsl:choose> 
    1519                     <xsl:when test="form/end/type='D'">shown</xsl:when> 
    1520                     <xsl:otherwise>invisible</xsl:otherwise> 
    1521                   </xsl:choose> 
    1522                 </xsl:variable> 
    1523                 <xsl:variable name="durationHrMinClass"> 
    1524                   <xsl:choose> 
    1525                     <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 
    1526                     <xsl:otherwise>shown</xsl:otherwise> 
    1527                   </xsl:choose> 
    1528                 </xsl:variable> 
    1529                 <div class="{$endDurationClass}" id="endDuration"> 
    1530                   <xsl:choose> 
    1531                     <xsl:when test="form/end/duration/weeks/input/@value = '0'"> 
    1532                     <!-- we are using day, hour, minute format --> 
    1533                     <!-- must send either no week value or week value of 0 (zero) --> 
    1534                       <div class="durationBox"> 
    1535                         <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')" checked="checked"/> 
    1536                         <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 
    1537                         <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays"/>days 
    1538                         <span id="durationHrMin" class="{$durationHrMinClass}"> 
    1539                           <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 
    1540                           <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours"/>hours 
    1541                           <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 
    1542                           <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes"/>minutes 
    1543                         </span> 
    1544                       </div> 
    1545                       <span class="durationSpacerText">or</span> 
    1546                       <div class="durationBox"> 
    1547                         <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/> 
    1548                         <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 
    1549                         <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="true"/>weeks 
    1550                       </div> 
    1551                     </xsl:when> 
    1552                     <xsl:otherwise> 
    1553                       <!-- we are using week format --> 
    1554                       <div class="durationBox"> 
    1555                         <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/> 
    1556                         <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 
    1557                         <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="true"/>days 
    1558                         <span id="durationHrMin" class="{$durationHrMinClass}"> 
    1559                           <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 
    1560                           <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="true"/>hours 
    1561                           <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 
    1562                           <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="true"/>minutes 
    1563                         </span> 
    1564                       </div> 
    1565                       <span class="durationSpacerText">or</span> 
    1566                       <div class="durationBox"> 
    1567                         <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')" checked="checked"/> 
    1568                         <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 
    1569                         <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks"/>weeks 
    1570                       </div> 
    1571                     </xsl:otherwise> 
    1572                   </xsl:choose> 
    1573                 </div> 
    1574               </div> 
    1575               <br/> 
    1576               <div class="dateFields" id="noDuration"> 
    1577                 <xsl:choose> 
    1578                   <xsl:when test="form/end/type='N'"> 
    1579                     <input type="radio" name="eventEndType" value="N" checked="checked" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    1580                   </xsl:when> 
    1581                   <xsl:otherwise> 
    1582                     <input type="radio" name="eventEndType" value="N" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    1583                   </xsl:otherwise> 
    1584                 </xsl:choose> 
    1585                 This event has no duration / end date 
    1586               </div> 
    1587             </div> 
    1588           </td> 
    1589         </tr> 
    1590         <!-- Recurrence fields --> 
    1591         <!-- ================= --> 
    1592         <tr> 
    1593           <td class="fieldName"> 
    1594             Recurrence: 
    1595           </td> 
    1596           <td> 
    1597             <xsl:choose> 
    1598               <xsl:when test="recurrenceId != ''"> 
    1599                 <!-- recurrence instances can not themselves recur, 
    1600                      so provide access to master event --> 
    1601                 <em>This event is a recurrence instance.</em><br/> 
    1602                 <a href="{$event-fetchForUpdate}&amp;calPath={$calPath}&amp;guid={$guid}" title="edit master (recurring event)">edit master event</a> 
    1603               </xsl:when> 
    1604               <xsl:otherwise> 
    1605                 <!-- has recurrenceId, so is master --> 
    1606  
    1607                 <div id="recurringSwitch"> 
    1608                   <!-- set or remove "recurring" and show or hide all recurrence fields: --> 
    1609                   <input type="radio" name="recurring" value="true" onclick="swapRecurrence(this)"> 
    1610                     <xsl:if test="form/recurringEntity = 'true'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    1611                   </input> event recurs 
    1612                   <input type="radio" name="recurring" value="false" onclick="swapRecurrence(this)"> 
    1613                     <xsl:if test="form/recurringEntity = 'false'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    1614                   </input> event does not recur 
    1615                 </div> 
    1616  
    1617                 <!-- wrapper for all recurrence fields (rrules and rdates): --> 
    1618                 <div id="recurrenceFields" class="invisible"> 
    1619                   <xsl:if test="form/recurringEntity = 'true'"><xsl:attribute name="class">visible</xsl:attribute></xsl:if> 
    1620  
    1621                   <h4>Recurrence Rules</h4> 
    1622                   <!-- show or hide rrules fields when editing: --> 
    1623                   <xsl:if test="form/recurrence"> 
    1624                     <input type="checkbox" name="rrulesFlag" onclick="swapRrules(this)" value="on"/> 
    1625                     <span id="rrulesSwitch"> 
    1626                       change recurrence rules 
    1627                     </span> 
    1628                   </xsl:if> 
    1629                   <span id="rrulesUiSwitch"> 
    1630                     <xsl:if test="form/recurrence"> 
    1631                       <xsl:attribute name="class">invisible</xsl:attribute> 
    1632                     </xsl:if> 
    1633                     <input type="checkbox" name="rrulesUiSwitch" value="advanced" onchange="swapVisible(this,'advancedRrules')"/> 
    1634                     show advanced recurrence rules 
    1635                   </span> 
    1636  
    1637                   <xsl:if test="form/recurrence"> 
    1638                     <!-- Output descriptive recurrence rules information.  Probably not 
    1639                          complete yet. Replace all strings so can be 
    1640                          more easily internationalized. --> 
    1641                     <div id="recurrenceInfo"> 
    1642                       Every 
    1643                       <xsl:choose> 
    1644                         <xsl:when test="form/recurrence/interval &gt; 1"> 
    1645                           <xsl:value-of select="form/recurrence/interval"/> 
    1646                         </xsl:when> 
    1647                       </xsl:choose> 
    1648                       <xsl:text> </xsl:text> 
    1649                       <xsl:choose> 
    1650                         <xsl:when test="form/recurrence/freq = 'HOURLY'">hour</xsl:when> 
    1651                         <xsl:when test="form/recurrence/freq = 'DAILY'">day</xsl:when> 
    1652                         <xsl:when test="form/recurrence/freq = 'WEEKLY'">week</xsl:when> 
    1653                         <xsl:when test="form/recurrence/freq = 'MONTHLY'">month</xsl:when> 
    1654                         <xsl:when test="form/recurrence/freq = 'YEARLY'">year</xsl:when> 
    1655                       </xsl:choose><xsl:if test="form/recurrence/interval &gt; 1">s</xsl:if> 
    1656                       <xsl:text> </xsl:text> 
    1657  
    1658                       <xsl:if test="form/recurrence/byday"> 
    1659                         <xsl:for-each select="form/recurrence/byday/pos"> 
    1660                           <xsl:if test="position() != 1"> and </xsl:if> 
    1661                           on 
    1662                           <xsl:choose> 
    1663                             <xsl:when test="@val='1'"> 
    1664                               the first 
    1665                             </xsl:when> 
    1666                             <xsl:when test="@val='2'"> 
    1667                               the second 
    1668                             </xsl:when> 
    1669                             <xsl:when test="@val='3'"> 
    1670                               the third 
    1671                             </xsl:when> 
    1672                             <xsl:when test="@val='4'"> 
    1673                               the fourth 
    1674                             </xsl:when> 
    1675                             <xsl:when test="@val='5'"> 
    1676                               the fifth 
    1677                             </xsl:when> 
    1678                             <xsl:when test="@val='-1'"> 
    1679                               the last 
    1680                             </xsl:when> 
    1681                             <!-- don't output "every" --> 
    1682                             <!--<xsl:otherwise> 
    1683                               every 
    1684                             </xsl:otherwise>--> 
    1685                           </xsl:choose> 
    1686                           <xsl:for-each select="day"> 
    1687                             <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 
    1688                             <xsl:variable name="dayVal" select="."/> 
    1689                             <xsl:variable name="dayPos"> 
    1690                               <xsl:for-each select="/bedework/recurdayvals/val"> 
    1691                                 <xsl:if test="node() = $dayVal"><xsl:value-of select="position()"/></xsl:if> 
    1692                               </xsl:for-each> 
    1693                             </xsl:variable> 
    1694                             <xsl:value-of select="/bedework/shortdaynames/val[position() = $dayPos]"/> 
    1695                             <xsl:if test="position() != last()">, </xsl:if> 
    1696                           </xsl:for-each> 
    1697                         </xsl:for-each> 
    1698                       </xsl:if> 
    1699  
    1700                       <xsl:if test="form/recurrence/bymonth"> 
    1701                         in 
    1702                         <xsl:for-each select="form/recurrence/bymonth/val"> 
    1703                           <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 
    1704                           <xsl:variable name="monthNum" select="number(.)"/> 
    1705                           <xsl:value-of select="/bedework/monthlabels/val[position() = $monthNum]"/> 
    1706                           <xsl:if test="position() != last()">, </xsl:if> 
    1707                         </xsl:for-each> 
    1708                       </xsl:if> 
    1709  
    1710                       <xsl:if test="form/recurrence/bymonthday"> 
    1711                         on the 
    1712                         <xsl:apply-templates select="form/recurrence/bymonthday/val" mode="weekMonthYearNumbers"/> 
    1713                         day<xsl:if test="form/recurrence/bymonthday/val[position()=2]">s</xsl:if> of the month 
    1714                       </xsl:if> 
    1715  
    1716                       <xsl:if test="form/recurrence/byyearday"> 
    1717                         on the 
    1718                         <xsl:apply-templates select="form/recurrence/byyearday/val" mode="weekMonthYearNumbers"/> 
    1719                         day<xsl:if test="form/recurrence/byyearday/val[position()=2]">s</xsl:if> of the year 
    1720                       </xsl:if> 
    1721  
    1722                       <xsl:if test="form/recurrence/byweekno"> 
    1723                         in the 
    1724                         <xsl:apply-templates select="form/recurrence/byweekno/val" mode="weekMonthYearNumbers"/> 
    1725                         week<xsl:if test="form/recurrence/byweekno/val[position()=2]">s</xsl:if> of the year 
    1726                       </xsl:if> 
    1727  
    1728                       repeating 
    1729                       <xsl:choose> 
    1730                         <xsl:when test="form/recurrence/count = '-1'">forever</xsl:when> 
    1731                         <xsl:when test="form/recurrence/until"> 
    1732                           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)"/> 
    1733                         </xsl:when> 
    1734                         <xsl:otherwise> 
    1735                           <xsl:value-of select="form/recurrence/count"/> 
    1736                           time<xsl:if test="form/recurrence/count &gt; 1">s</xsl:if> 
     1461                          <!-- span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetEndDate" iconURL="{$resourcesRoot}/resources/calIcon.gif"> 
     1462                            <xsl:attribute name="value"><xsl:value-of select="form/end/rfc3339DateTime"/></xsl:attribute> 
     1463                            <xsl:text> </xsl:text> 
     1464                          </span--> 
     1465                          <input type="text" name="bwEventWidgetEndDate" id="bwEventWidgetEndDate" size="10"/> 
     1466                          <script language="JavaScript" type="text/javascript"> 
     1467                            <xsl:comment> 
     1468                            $("#bwEventWidgetEndDate").datepicker({ 
     1469                              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"/>) 
     1470                            }).attr("readonly", "readonly"); 
     1471                            $("#bwEventWidgetEndDate").val('<xsl:value-of select="substring-before(form/end/rfc3339DateTime,'T')"/>'); 
     1472                            </xsl:comment> 
     1473                          </script> 
     1474                          <input type="hidden" name="eventEndDate.year"> 
     1475                            <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/yearText/input/@value"/></xsl:attribute> 
     1476                          </input> 
     1477                          <input type="hidden" name="eventEndDate.month"> 
     1478                            <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/month/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
     1479                          </input> 
     1480                          <input type="hidden" name="eventEndDate.day"> 
     1481                            <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/day/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
     1482                          </input> 
    17371483                        </xsl:otherwise> 
    17381484                      </xsl:choose> 
    17391485                    </div> 
    1740                   </xsl:if> 
    1741  
    1742                   <!-- set these dynamically when form is submitted --> 
    1743                   <input type="hidden" name="interval" value=""/> 
    1744                   <input type="hidden" name="count" value=""/> 
    1745                   <input type="hidden" name="until" value=""/> 
    1746                   <input type="hidden" name="byday" value=""/> 
    1747                   <input type="hidden" name="bymonthday" value=""/> 
    1748                   <input type="hidden" name="bymonth" value=""/> 
    1749                   <input type="hidden" name="byweekno" value=""/> 
    1750                   <input type="hidden" name="byyearday" value=""/> 
    1751                   <input type="hidden" name="wkst" value=""/> 
    1752                   <input type="hidden" name="setpos" value=""/> 
    1753  
    1754                   <!-- wrapper for rrules: --> 
    1755                   <table id="rrulesTable" cellspacing="0"> 
    1756                   <xsl:if test="form/recurrence"> 
    1757                     <xsl:attribute name="class">invisible</xsl:attribute> 
    1758                   </xsl:if> 
    1759                     <tr> 
    1760                       <td id="recurrenceFrequency" rowspan="2"> 
    1761                         <em>Frequency:</em><br/> 
    1762                         <input type="radio" name="freq" value="NONE" onclick="showRrules(this.value)" checked="checked"/>none<br/> 
    1763                         <!--<input type="radio" name="freq" value="HOURLY" onclick="showRrules(this.value)"/>hourly<br/>--> 
    1764                         <input type="radio" name="freq" value="DAILY" onclick="showRrules(this.value)"/>daily<br/> 
    1765                         <input type="radio" name="freq" value="WEEKLY" onclick="showRrules(this.value)"/>weekly<br/> 
    1766                         <input type="radio" name="freq" value="MONTHLY" onclick="showRrules(this.value)"/>monthly<br/> 
    1767                         <input type="radio" name="freq" value="YEARLY" onclick="showRrules(this.value)"/>yearly 
    1768                       </td> 
    1769                       <!-- recurrence count, until, forever --> 
    1770                       <td id="recurrenceUntil"> 
    1771                         <div id="noneRecurrenceRules"> 
    1772                           no recurrence rules 
    1773                         </div> 
    1774                         <div id="recurrenceUntilRules" class="invisible"> 
    1775                           <em>Repeat:</em> 
    1776                           <p> 
    1777                             <input type="radio" name="recurCountUntil" value="forever"> 
    1778                               <xsl:if test="not(form/recurring) or form/recurring/count = '-1'"> 
    1779                                 <xsl:attribute name="checked">checked</xsl:attribute> 
    1780                               </xsl:if> 
    1781                             </input> 
    1782                             forever 
    1783                             <input type="radio" name="recurCountUntil" value="count" id="recurCount"> 
    1784                               <xsl:if test="form/recurring/count != '-1'"> 
    1785                                 <xsl:attribute name="checked">checked</xsl:attribute> 
    1786                               </xsl:if> 
    1787                             </input> 
    1788                             <input type="text" value="1" size="2" name="countHolder"  onfocus="selectRecurCountUntil('recurCount')"> 
    1789                               <xsl:if test="form/recurring/count and form/recurring/count != '-1'"> 
    1790                                 <xsl:attribute name="value"><xsl:value-of select="form/recurring/count"/></xsl:attribute> 
    1791                               </xsl:if> 
    1792                             </input> 
    1793                             time(s) 
    1794                             <input type="radio" name="recurCountUntil" value="until" id="recurUntil"> 
    1795                               <xsl:if test="form/recurring/until"> 
    1796                                 <xsl:attribute name="checked">checked</xsl:attribute> 
    1797                               </xsl:if> 
    1798                             </input> 
    1799                             until 
    1800                             <span id="untilHolder"> 
    1801                               <!-- span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetUntilDate" iconURL="{$resourcesRoot}/resources/calIcon.gif"> 
    1802                                 <xsl:attribute name="value"><xsl:value-of select="form/start/rfc3339DateTime"/></xsl:attribute> 
    1803                                 <xsl:text> </xsl:text> 
    1804                               </span --> 
    1805                               <input type="hidden" name="bwEventUntilDate" id="bwEventUntilDate" size="10"/> 
    1806                               <input type="text" name="bwEventWidgetUntilDate" id="bwEventWidgetUntilDate" size="10" onfocus="selectRecurCountUntil('recurUntil')"/> 
    1807                               <script language="JavaScript" type="text/javascript"> 
    1808                                 <xsl:comment> 
    1809                                 $("#bwEventWidgetUntilDate").datepicker({ 
    1810                                   <xsl:choose> 
    1811                                     <xsl:when test="form/recurrence/until"> 
    1812                                       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)"/>), 
    1813                                     </xsl:when> 
    1814                                     <xsl:otherwise> 
    1815                                       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"/>), 
    1816                                     </xsl:otherwise> 
    1817                                   </xsl:choose> 
    1818                                   altField: "#bwEventUntilDate", 
    1819                                   altFormat: "yymmdd" 
    1820                                 }).attr("readonly", "readonly"); 
    1821                                 $("#bwEventWidgetUntilDate").val('<xsl:value-of select="substring-before(form/start/rfc3339DateTime,'T')"/>'); 
    1822                                 </xsl:comment> 
    1823                               </script> 
    1824                             </span> 
    1825                           </p> 
    1826                         </div> 
    1827                       </td> 
    1828                     </tr> 
    1829                     <tr> 
    1830                       <td id="advancedRrules" class="invisible"> 
    1831                         <!-- hourly --> 
    1832                         <div id="hourlyRecurrenceRules" class="invisible"> 
    1833                           <p> 
    1834                             <em>Interval:</em> 
    1835                             every 
    1836                             <input type="text" name="hourlyInterval" size="2" value="1"> 
    1837                               <xsl:if test="form/recurrence/interval"> 
    1838                                 <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    1839                               </xsl:if> 
    1840                             </input> 
    1841                             hour(s) 
    1842                           </p> 
    1843                         </div> 
    1844                         <!-- daily --> 
    1845                         <div id="dailyRecurrenceRules" class="invisible"> 
    1846                           <p> 
    1847                             <em>Interval:</em> 
    1848                             every 
    1849                             <input type="text" name="dailyInterval" size="2" value="1"> 
    1850                               <xsl:if test="form/recurrence/interval"> 
    1851                                 <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    1852                               </xsl:if> 
    1853                             </input> 
    1854                             day(s) 
    1855                           </p> 
    1856                           <p> 
    1857                             <input type="checkbox" name="swapDayMonthCheckBoxList" value="" onclick="swapVisible(this,'dayMonthCheckBoxList')"/> 
    1858                             in these months: 
    1859                             <div id="dayMonthCheckBoxList" class="invisible"> 
    1860                               <xsl:for-each select="/bedework/monthlabels/val"> 
    1861                                 <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 
    1862                                 <span class="chkBoxListItem"> 
    1863                                   <input type="checkbox" name="dayMonths"> 
    1864                                     <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute> 
    1865                                   </input> 
    1866                                   <xsl:value-of select="."/> 
    1867                                 </span> 
    1868                                 <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 
    1869                               </xsl:for-each> 
    1870                             </div> 
    1871                           </p> 
    1872                           <!--<p> 
    1873                             <input type="checkbox" name="swapDaySetPos" value="" onclick="swapVisible(this,'daySetPos')"/> 
    1874                             limit to: 
    1875                             <div id="daySetPos" class="invisible"> 
    1876                             </div> 
    1877                           </p>--> 
    1878                         </div> 
    1879                         <!-- weekly --> 
    1880                         <div id="weeklyRecurrenceRules" class="invisible"> 
    1881                           <p> 
    1882                             <em>Interval:</em> 
    1883                             every 
    1884                             <input type="text" name="weeklyInterval" size="2" value="1"> 
    1885                               <xsl:if test="form/recurrence/interval"> 
    1886                                 <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    1887                               </xsl:if> 
    1888                             </input> 
    1889                             week(s) on: 
    1890                           </p> 
    1891                           <p> 
    1892                             <div id="weekRecurFields"> 
    1893                               <xsl:call-template name="byDayChkBoxList"> 
    1894                                 <xsl:with-param name="name">byDayWeek</xsl:with-param> 
    1895                               </xsl:call-template> 
    1896                             </div> 
    1897                           </p> 
    1898                           <p class="weekRecurLinks"> 
    1899                             <a href="javascript:recurSelectWeekdays('weekRecurFields')">select weekdays</a> | 
    1900                             <a href="javascript:recurSelectWeekends('weekRecurFields')">select weekends</a> 
    1901                           </p> 
    1902                           <p> 
    1903                             Week start: 
    1904                             <select name="weekWkst"> 
    1905                               <xsl:for-each select="/bedework/shortdaynames/val"> 
    1906                                 <xsl:variable name="pos" select="position()"/> 
    1907                                 <option> 
    1908                                   <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 
    1909                                   <xsl:value-of select="."/> 
    1910                                 </option> 
    1911                               </xsl:for-each> 
    1912                             </select> 
    1913                           </p> 
    1914                         </div> 
    1915                         <!-- monthly --> 
    1916                         <div id="monthlyRecurrenceRules" class="invisible"> 
    1917                           <p> 
    1918                             <em>Interval:</em> 
    1919                             every 
    1920                             <input type="text" name="monthlyInterval" size="2" value="1"> 
    1921                               <xsl:if test="form/recurrence/interval"> 
    1922                                 <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    1923                               </xsl:if> 
    1924                             </input> 
    1925                             month(s) 
    1926                           </p> 
    1927                           <div id="monthRecurFields"> 
    1928                             <div id="monthRecurFields1"> 
    1929                               on 
    1930                               <select name="bymonthposPos1" width="7em" onchange="changeClass('monthRecurFields2','shown')"> 
    1931                                 <xsl:call-template name="recurrenceDayPosOptions"/> 
    1932                               </select> 
    1933                               <xsl:call-template name="byDayChkBoxList"/> 
    1934                             </div> 
    1935                             <xsl:call-template name="buildRecurFields"> 
    1936                               <xsl:with-param name="current">2</xsl:with-param> 
    1937                               <xsl:with-param name="total">10</xsl:with-param> 
    1938                               <xsl:with-param name="name">month</xsl:with-param> 
    1939                             </xsl:call-template> 
    1940                           </div> 
    1941                           <p> 
    1942                             <input type="checkbox" name="swapMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'monthDaysCheckBoxList')"/> 
    1943                             on these days:<br/> 
    1944                             <div id="monthDaysCheckBoxList" class="invisible"> 
    1945                               <xsl:call-template name="buildCheckboxList"> 
    1946                                 <xsl:with-param name="current">1</xsl:with-param> 
    1947                                 <xsl:with-param name="end">31</xsl:with-param> 
    1948                                 <xsl:with-param name="name">monthDayBoxes</xsl:with-param> 
    1949                               </xsl:call-template> 
    1950                             </div> 
    1951                           </p> 
    1952                         </div> 
    1953                         <!-- yearly --> 
    1954                         <div id="yearlyRecurrenceRules" class="invisible"> 
    1955                           <p> 
    1956                             <em>Interval:</em> 
    1957                             every 
    1958                             <input type="text" name="yearlyInterval" size="2" value="1"> 
    1959                               <xsl:if test="form/recurrence/interval"> 
    1960                                 <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    1961                               </xsl:if> 
    1962                             </input> 
    1963                             years(s) 
    1964                           </p> 
    1965                           <div id="yearRecurFields"> 
    1966                             <div id="yearRecurFields1"> 
    1967                               on 
    1968                               <select name="byyearposPos1" width="7em" onchange="changeClass('yearRecurFields2','shown')"> 
    1969                                 <xsl:call-template name="recurrenceDayPosOptions"/> 
    1970                               </select> 
    1971                               <xsl:call-template name="byDayChkBoxList"/> 
    1972                             </div> 
    1973                             <xsl:call-template name="buildRecurFields"> 
    1974                               <xsl:with-param name="current">2</xsl:with-param> 
    1975                               <xsl:with-param name="total">10</xsl:with-param> 
    1976                               <xsl:with-param name="name">year</xsl:with-param> 
    1977                             </xsl:call-template> 
    1978                           </div> 
    1979                           <p> 
    1980                             <input type="checkbox" name="swapYearMonthCheckBoxList" value="" onclick="swapVisible(this,'yearMonthCheckBoxList')"/> 
    1981                             in these months: 
    1982                             <div id="yearMonthCheckBoxList" class="invisible"> 
    1983                               <xsl:for-each select="/bedework/monthlabels/val"> 
    1984                                 <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 
    1985                                 <span class="chkBoxListItem"> 
    1986                                   <input type="checkbox" name="yearMonths"> 
    1987                                     <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute> 
    1988                                   </input> 
    1989                                   <xsl:value-of select="."/> 
    1990                                 </span> 
    1991                                 <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 
    1992                               </xsl:for-each> 
    1993                             </div> 
    1994                           </p> 
    1995                           <p> 
    1996                             <input type="checkbox" name="swapYearMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'yearMonthDaysCheckBoxList')"/> 
    1997                             on these days of the month:<br/> 
    1998                             <div id="yearMonthDaysCheckBoxList" class="invisible"> 
    1999                               <xsl:call-template name="buildCheckboxList"> 
    2000                                 <xsl:with-param name="current">1</xsl:with-param> 
    2001                                 <xsl:with-param name="end">31</xsl:with-param> 
    2002                                 <xsl:with-param name="name">yearMonthDayBoxes</xsl:with-param> 
    2003                               </xsl:call-template> 
    2004                             </div> 
    2005                           </p> 
    2006                           <p> 
    2007                             <input type="checkbox" name="swapYearWeeksCheckBoxList" value="" onclick="swapVisible(this,'yearWeeksCheckBoxList')"/> 
    2008                             in these weeks of the year:<br/> 
    2009                             <div id="yearWeeksCheckBoxList" class="invisible"> 
    2010                               <xsl:call-template name="buildCheckboxList"> 
    2011                                 <xsl:with-param name="current">1</xsl:with-param> 
    2012                                 <xsl:with-param name="end">53</xsl:with-param> 
    2013                                 <xsl:with-param name="name">yearWeekBoxes</xsl:with-param> 
    2014                               </xsl:call-template> 
    2015                             </div> 
    2016                           </p> 
    2017                           <p> 
    2018                             <input type="checkbox" name="swapYearDaysCheckBoxList" value="" onclick="swapVisible(this,'yearDaysCheckBoxList')"/> 
    2019                             on these days of the year:<br/> 
    2020                             <div id="yearDaysCheckBoxList" class="invisible"> 
    2021                               <xsl:call-template name="buildCheckboxList"> 
    2022                                 <xsl:with-param name="current">1</xsl:with-param> 
    2023                                 <xsl:with-param name="end">366</xsl:with-param> 
    2024                                 <xsl:with-param name="name">yearDayBoxes</xsl:with-param> 
    2025                               </xsl:call-template> 
    2026                             </div> 
    2027                           </p> 
    2028                           <p> 
    2029                             Week start: 
    2030                             <select name="yearWkst"> 
    2031                               <xsl:for-each select="/bedework/shortdaynames/val"> 
    2032                                 <xsl:variable name="pos" select="position()"/> 
    2033                                 <option> 
    2034                                   <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 
    2035                                   <xsl:value-of select="."/> 
    2036                                 </option> 
    2037                               </xsl:for-each> 
    2038                             </select> 
    2039                           </p> 
    2040                         </div> 
    2041                       </td> 
    2042                     </tr> 
    2043                   </table> 
    2044                   <h4> 
    2045                     Recurrence and Exception Dates 
    2046                   </h4> 
    2047                   <div id="raContent"> 
    2048                     <div class="dateStartEndBox" id="rdatesFormFields"> 
    2049                       <!-- 
    2050                       <input type="checkbox" name="dateOnly" id="rdateDateOnly" onclick="swapRdateAllDay(this)" value="true"/> 
    2051                       all day 
    2052                       <input type="checkbox" name="floating" id="rdateFloating" onclick="swapRdateFloatingTime(this)" value="true"/> 
    2053                       floating 
    2054                       store time as coordinated universal time (UTC) 
    2055                       <input type="checkbox" name="storeUTC" id="rdateStoreUTC" onclick="swapRdateStoreUTC(this)" value="true"/> 
    2056                       store as UTC<br/>--> 
    2057                       <div class="dateFields"> 
    2058                         <!-- input name="eventRdate.date" 
    2059                                dojoType="dropdowndatepicker" 
    2060                                formatLength="medium" 
    2061                                value="today" 
    2062                                saveFormat="yyyyMMdd" 
    2063                                id="bwEventWidgeRdate" 
    2064                                iconURL="{$resourcesRoot}/resources/calIcon.gif"/--> 
    2065                         <input type="text" name="eventRdate.date" id="bwEventWidgetRdate" size="10"/> 
    2066                         <script language="JavaScript" type="text/javascript"> 
    2067                           <xsl:comment> 
    2068                           $("#bwEventWidgetRdate").datepicker({ 
    2069                             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"/>), 
    2070                             dateFormat: "yymmdd" 
    2071                           }).attr("readonly", "readonly"); 
    2072                           $("#bwEventWidgetRdate").val('<xsl:value-of select="substring-before(form/start/rfc3339DateTime,'T')"/>'); 
    2073                           </xsl:comment> 
    2074                         </script> 
    2075                       </div> 
    2076                       <div id="rdateTimeFields" class="timeFields"> 
    2077                        <select name="eventRdate.hour"> 
    2078                           <option value="00">00</option> 
    2079                           <option value="01">01</option> 
    2080                           <option value="02">02</option> 
    2081                           <option value="03">03</option> 
    2082                           <option value="04">04</option> 
    2083                           <option value="05">05</option> 
    2084                           <option value="06">06</option> 
    2085                           <option value="07">07</option> 
    2086                           <option value="08">08</option> 
    2087                           <option value="09">09</option> 
    2088                           <option value="10">10</option> 
    2089                           <option value="11">11</option> 
    2090                           <option value="12" selected="selected">12</option> 
    2091                           <option value="13">13</option> 
    2092                           <option value="14">14</option> 
    2093                           <option value="15">15</option> 
    2094                           <option value="16">16</option> 
    2095                           <option value="17">17</option> 
    2096                           <option value="18">18</option> 
    2097                           <option value="19">19</option> 
    2098                           <option value="20">20</option> 
    2099                           <option value="21">21</option> 
    2100                           <option value="22">22</option> 
    2101                           <option value="23">23</option> 
    2102                         </select> 
    2103                         <select name="eventRdate.minute"> 
    2104                           <option value="00" selected="selected">00</option> 
    2105                           <option value="05">05</option> 
    2106                           <option value="10">10</option> 
    2107                           <option value="15">15</option> 
    2108                           <option value="20">20</option> 
    2109                           <option value="25">25</option> 
    2110                           <option value="30">30</option> 
    2111                           <option value="35">35</option> 
    2112                           <option value="40">40</option> 
    2113                           <option value="45">45</option> 
    2114                           <option value="50">50</option> 
    2115                           <option value="55">55</option> 
    2116                         </select> 
    2117                        <xsl:text> </xsl:text> 
    2118  
    2119                         <select name="tzid" id="rdateTzid" class="timezones"> 
    2120                           <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if> 
    2121                           <option value="">select timezone...</option> 
    2122                           <xsl:variable name="rdateTzId" select="/bedework/now/defaultTzid"/> 
     1486                    <div class="{$timeFieldsClass}" id="endTimeFields"> 
     1487                      <span id="calWidgetEndTimeHider" class="show"> 
     1488                        <xsl:copy-of select="form/end/dateTime/hour/*"/> 
     1489                        <xsl:copy-of select="form/end/dateTime/minute/*"/> 
     1490                        <xsl:if test="form/end/dateTime/ampm"> 
     1491                          <xsl:copy-of select="form/end/dateTime/ampm/*"/> 
     1492                        </xsl:if> 
     1493                        <xsl:text> </xsl:text> 
     1494                        <a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a> 
     1495 
     1496                        <select name="eventEndDate.tzid" id="endTzid" class="timezones"> 
     1497                          <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">true</xsl:attribute></xsl:if> 
     1498                          <option value="-1">select timezone...</option> 
     1499                          <xsl:variable name="endTzId" select="form/end/dateTime/tzid"/> 
    21231500                          <xsl:for-each select="/bedework/timezones/timezone"> 
    21241501                            <option> 
    21251502                              <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> 
    2126                               <xsl:if test="$rdateTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
     1503                              <xsl:if test="$endTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
    21271504                              <xsl:value-of select="name"/> 
    21281505                            </option> 
    21291506                          </xsl:for-each> 
    21301507                        </select> 
    2131                       </div> 
    2132                       <xsl:text> </xsl:text> 
    2133                       <!--bwRdates.update() accepts: date, time, allDay, floating, utc, tzid--> 
    2134                       <input type="button" name="rdate" value="add recurrence" 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)"/> 
    2135                       <input type="button" name="exdate" value="add exception" 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)"/> 
    2136  
    2137                       <input type="hidden" name="rdates" value="" id="bwRdatesField" /> 
    2138                       <!-- if there are no recurrence dates, the following table will show --> 
    2139                       <table cellspacing="0" class="invisible" id="bwCurrentRdatesNone"> 
    2140                         <tr><th>Recurrence Dates</th></tr> 
    2141                         <tr><td>No recurrence dates</td></tr> 
    2142                       </table> 
    2143  
    2144                       <!-- if there are recurrence dates, the following table will show --> 
    2145                       <table cellspacing="0" class="invisible" id="bwCurrentRdates"> 
     1508                      </span> 
     1509                    </div> 
     1510                  </div> 
     1511                  <br/> 
     1512                  <div id="clock" class="invisible"> 
     1513                    <xsl:call-template name="clock"/> 
     1514                  </div> 
     1515                  <div class="dateFields"> 
     1516                    <xsl:choose> 
     1517                      <xsl:when test="form/end/type='D'"> 
     1518                        <input type="radio" name="eventEndType" value="D" checked="checked" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
     1519                      </xsl:when> 
     1520                      <xsl:otherwise> 
     1521                        <input type="radio" name="eventEndType" value="D" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
     1522                      </xsl:otherwise> 
     1523                    </xsl:choose> 
     1524                    Duration 
     1525                    <xsl:variable name="endDurationClass"> 
     1526                      <xsl:choose> 
     1527                        <xsl:when test="form/end/type='D'">shown</xsl:when> 
     1528                        <xsl:otherwise>invisible</xsl:otherwise> 
     1529                      </xsl:choose> 
     1530                    </xsl:variable> 
     1531                    <xsl:variable name="durationHrMinClass"> 
     1532                      <xsl:choose> 
     1533                        <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 
     1534                        <xsl:otherwise>shown</xsl:otherwise> 
     1535                      </xsl:choose> 
     1536                    </xsl:variable> 
     1537                    <div class="{$endDurationClass}" id="endDuration"> 
     1538                      <xsl:choose> 
     1539                        <xsl:when test="form/end/duration/weeks/input/@value = '0'"> 
     1540                        <!-- we are using day, hour, minute format --> 
     1541                        <!-- must send either no week value or week value of 0 (zero) --> 
     1542                          <div class="durationBox"> 
     1543                            <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')" checked="checked"/> 
     1544                            <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 
     1545                            <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays"/>days 
     1546                            <span id="durationHrMin" class="{$durationHrMinClass}"> 
     1547                              <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 
     1548                              <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours"/>hours 
     1549                              <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 
     1550                              <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes"/>minutes 
     1551                            </span> 
     1552                          </div> 
     1553                          <span class="durationSpacerText">or</span> 
     1554                          <div class="durationBox"> 
     1555                            <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/> 
     1556                            <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 
     1557                            <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="true"/>weeks 
     1558                          </div> 
     1559                        </xsl:when> 
     1560                        <xsl:otherwise> 
     1561                          <!-- we are using week format --> 
     1562                          <div class="durationBox"> 
     1563                            <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/> 
     1564                            <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 
     1565                            <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="true"/>days 
     1566                            <span id="durationHrMin" class="{$durationHrMinClass}"> 
     1567                              <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 
     1568                              <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="true"/>hours 
     1569                              <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 
     1570                              <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="true"/>minutes 
     1571                            </span> 
     1572                          </div> 
     1573                          <span class="durationSpacerText">or</span> 
     1574                          <div class="durationBox"> 
     1575                            <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')" checked="checked"/> 
     1576                            <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 
     1577                            <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks"/>weeks 
     1578                          </div> 
     1579                        </xsl:otherwise> 
     1580                      </xsl:choose> 
     1581                    </div> 
     1582                  </div> 
     1583                  <br/> 
     1584                  <div class="dateFields" id="noDuration"> 
     1585                    <xsl:choose> 
     1586                      <xsl:when test="form/end/type='N'"> 
     1587                        <input type="radio" name="eventEndType" value="N" checked="checked" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
     1588                      </xsl:when> 
     1589                      <xsl:otherwise> 
     1590                        <input type="radio" name="eventEndType" value="N" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
     1591                      </xsl:otherwise> 
     1592                    </xsl:choose> 
     1593                    This event has no duration / end date 
     1594                  </div> 
     1595                </div> 
     1596              </td> 
     1597            </tr> 
     1598            <!-- Recurrence fields --> 
     1599            <!-- ================= --> 
     1600            <tr> 
     1601              <td class="fieldName"> 
     1602                Recurrence: 
     1603              </td> 
     1604              <td> 
     1605                <xsl:choose> 
     1606                  <xsl:when test="recurrenceId != ''"> 
     1607                    <!-- recurrence instances can not themselves recur, 
     1608                         so provide access to master event --> 
     1609                    <em>This event is a recurrence instance.</em><br/> 
     1610                    <a href="{$event-fetchForUpdate}&amp;calPath={$calPath}&amp;guid={$guid}" title="edit master (recurring event)">edit master event</a> 
     1611                  </xsl:when> 
     1612                  <xsl:otherwise> 
     1613                    <!-- has recurrenceId, so is master --> 
     1614 
     1615                    <div id="recurringSwitch"> 
     1616                      <!-- set or remove "recurring" and show or hide all recurrence fields: --> 
     1617                      <input type="radio" name="recurring" value="true" onclick="swapRecurrence(this)"> 
     1618                        <xsl:if test="form/recurringEntity = 'true'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
     1619                      </input> event recurs 
     1620                      <input type="radio" name="recurring" value="false" onclick="swapRecurrence(this)"> 
     1621                        <xsl:if test="form/recurringEntity = 'false'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
     1622                      </input> event does not recur 
     1623                    </div> 
     1624 
     1625                    <!-- wrapper for all recurrence fields (rrules and rdates): --> 
     1626                    <div id="recurrenceFields" class="invisible"> 
     1627                      <xsl:if test="form/recurringEntity = 'true'"><xsl:attribute name="class">visible</xsl:attribute></xsl:if> 
     1628 
     1629                      <h4>Recurrence Rules</h4> 
     1630                      <!-- show or hide rrules fields when editing: --> 
     1631                      <xsl:if test="form/recurrence"> 
     1632                        <input type="checkbox" name="rrulesFlag" onclick="swapRrules(this)" value="on"/> 
     1633                        <span id="rrulesSwitch"> 
     1634                          change recurrence rules 
     1635                        </span> 
     1636                      </xsl:if> 
     1637                      <span id="rrulesUiSwitch"> 
     1638                        <xsl:if test="form/recurrence"> 
     1639                          <xsl:attribute name="class">invisible</xsl:attribute> 
     1640                        </xsl:if> 
     1641                        <input type="checkbox" name="rrulesUiSwitch" value="advanced" onchange="swapVisible(this,'advancedRrules')"/> 
     1642                        show advanced recurrence rules 
     1643                      </span> 
     1644 
     1645                      <xsl:if test="form/recurrence"> 
     1646                        <!-- Output descriptive recurrence rules information.  Probably not 
     1647                             complete yet. Replace all strings so can be 
     1648                             more easily internationalized. --> 
     1649                        <div id="recurrenceInfo"> 
     1650                          Every 
     1651                          <xsl:choose> 
     1652                            <xsl:when test="form/recurrence/interval &gt; 1"> 
     1653                              <xsl:value-of select="form/recurrence/interval"/> 
     1654                            </xsl:when> 
     1655                          </xsl:choose> 
     1656                          <xsl:text> </xsl:text> 
     1657                          <xsl:choose> 
     1658                            <xsl:when test="form/recurrence/freq = 'HOURLY'">hour</xsl:when> 
     1659                            <xsl:when test="form/recurrence/freq = 'DAILY'">day</xsl:when> 
     1660                            <xsl:when test="form/recurrence/freq = 'WEEKLY'">week</xsl:when> 
     1661                            <xsl:when test="form/recurrence/freq = 'MONTHLY'">month</xsl:when> 
     1662                            <xsl:when test="form/recurrence/freq = 'YEARLY'">year</xsl:when> 
     1663                          </xsl:choose><xsl:if test="form/recurrence/interval &gt; 1">s</xsl:if> 
     1664                          <xsl:text> </xsl:text> 
     1665 
     1666                          <xsl:if test="form/recurrence/byday"> 
     1667                            <xsl:for-each select="form/recurrence/byday/pos"> 
     1668                              <xsl:if test="position() != 1"> and </xsl:if> 
     1669                              on 
     1670                              <xsl:choose> 
     1671                                <xsl:when test="@val='1'"> 
     1672                                  the first 
     1673                                </xsl:when> 
     1674                                <xsl:when test="@val='2'"> 
     1675                                  the second 
     1676                                </xsl:when> 
     1677                                <xsl:when test="@val='3'"> 
     1678                                  the third 
     1679                                </xsl:when> 
     1680                                <xsl:when test="@val='4'"> 
     1681                                  the fourth 
     1682                                </xsl:when> 
     1683                                <xsl:when test="@val='5'"> 
     1684                                  the fifth 
     1685                                </xsl:when> 
     1686                                <xsl:when test="@val='-1'"> 
     1687                                  the last 
     1688                                </xsl:when> 
     1689                                <!-- don't output "every" --> 
     1690                                <!--<xsl:otherwise> 
     1691                                  every 
     1692                                </xsl:otherwise>--> 
     1693                              </xsl:choose> 
     1694                              <xsl:for-each select="day"> 
     1695                                <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 
     1696                                <xsl:variable name="dayVal" select="."/> 
     1697                                <xsl:variable name="dayPos"> 
     1698                                  <xsl:for-each select="/bedework/recurdayvals/val"> 
     1699                                    <xsl:if test="node() = $dayVal"><xsl:value-of select="position()"/></xsl:if> 
     1700                                  </xsl:for-each> 
     1701                                </xsl:variable> 
     1702                                <xsl:value-of select="/bedework/shortdaynames/val[position() = $dayPos]"/> 
     1703                                <xsl:if test="position() != last()">, </xsl:if> 
     1704                              </xsl:for-each> 
     1705                            </xsl:for-each> 
     1706                          </xsl:if> 
     1707 
     1708                          <xsl:if test="form/recurrence/bymonth"> 
     1709                            in 
     1710                            <xsl:for-each select="form/recurrence/bymonth/val"> 
     1711                              <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 
     1712                              <xsl:variable name="monthNum" select="number(.)"/> 
     1713                              <xsl:value-of select="/bedework/monthlabels/val[position() = $monthNum]"/> 
     1714                              <xsl:if test="position() != last()">, </xsl:if> 
     1715                            </xsl:for-each> 
     1716                          </xsl:if> 
     1717 
     1718                          <xsl:if test="form/recurrence/bymonthday"> 
     1719                            on the 
     1720                            <xsl:apply-templates select="form/recurrence/bymonthday/val" mode="weekMonthYearNumbers"/> 
     1721                            day<xsl:if test="form/recurrence/bymonthday/val[position()=2]">s</xsl:if> of the month 
     1722                          </xsl:if> 
     1723 
     1724                          <xsl:if test="form/recurrence/byyearday"> 
     1725                            on the 
     1726                            <xsl:apply-templates select="form/recurrence/byyearday/val" mode="weekMonthYearNumbers"/> 
     1727                            day<xsl:if test="form/recurrence/byyearday/val[position()=2]">s</xsl:if> of the year 
     1728                          </xsl:if> 
     1729 
     1730                          <xsl:if test="form/recurrence/byweekno"> 
     1731                            in the 
     1732                            <xsl:apply-templates select="form/recurrence/byweekno/val" mode="weekMonthYearNumbers"/> 
     1733                            week<xsl:if test="form/recurrence/byweekno/val[position()=2]">s</xsl:if> of the year 
     1734                          </xsl:if> 
     1735 
     1736                          repeating 
     1737                          <xsl:choose> 
     1738                            <xsl:when test="form/recurrence/count = '-1'">forever</xsl:when> 
     1739                            <xsl:when test="form/recurrence/until"> 
     1740                              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)"/> 
     1741                            </xsl:when> 
     1742                            <xsl:otherwise> 
     1743                              <xsl:value-of select="form/recurrence/count"/> 
     1744                              time<xsl:if test="form/recurrence/count &gt; 1">s</xsl:if> 
     1745                            </xsl:otherwise> 
     1746                          </xsl:choose> 
     1747                        </div> 
     1748                      </xsl:if> 
     1749 
     1750                      <!-- set these dynamically when form is submitted --> 
     1751                      <input type="hidden" name="interval" value=""/> 
     1752                      <input type="hidden" name="count" value=""/> 
     1753                      <input type="hidden" name="until" value=""/> 
     1754                      <input type="hidden" name="byday" value=""/> 
     1755                      <input type="hidden" name="bymonthday" value=""/> 
     1756                      <input type="hidden" name="bymonth" value=""/> 
     1757                      <input type="hidden" name="byweekno" value=""/> 
     1758                      <input type="hidden" name="byyearday" value=""/> 
     1759                      <input type="hidden" name="wkst" value=""/> 
     1760                      <input type="hidden" name="setpos" value=""/> 
     1761 
     1762                      <!-- wrapper for rrules: --> 
     1763                      <table id="rrulesTable" cellspacing="0"> 
     1764                      <xsl:if test="form/recurrence"> 
     1765                        <xsl:attribute name="class">invisible</xsl:attribute> 
     1766                      </xsl:if> 
    21461767                        <tr> 
    2147                           <th colspan="4">Recurrence Dates</th> 
     1768                          <td id="recurrenceFrequency" rowspan="2"> 
     1769                            <em>Frequency:</em><br/> 
     1770                            <input type="radio" name="freq" value="NONE" onclick="showRrules(this.value)" checked="checked"/>none<br/> 
     1771                            <!--<input type="radio" name="freq" value="HOURLY" onclick="showRrules(this.value)"/>hourly<br/>--> 
     1772                            <input type="radio" name="freq" value="DAILY" onclick="showRrules(this.value)"/>daily<br/> 
     1773                            <input type="radio" name="freq" value="WEEKLY" onclick="showRrules(this.value)"/>weekly<br/> 
     1774                            <input type="radio" name="freq" value="MONTHLY" onclick="showRrules(this.value)"/>monthly<br/> 
     1775                            <input type="radio" name="freq" value="YEARLY" onclick="showRrules(this.value)"/>yearly 
     1776                          </td> 
     1777                          <!-- recurrence count, until, forever --> 
     1778                          <td id="recurrenceUntil"> 
     1779                            <div id="noneRecurrenceRules"> 
     1780                              no recurrence rules 
     1781                            </div> 
     1782                            <div id="recurrenceUntilRules" class="invisible"> 
     1783                              <em>Repeat:</em> 
     1784                              <p> 
     1785                                <input type="radio" name="recurCountUntil" value="forever"> 
     1786                                  <xsl:if test="not(form/recurring) or form/recurring/count = '-1'"> 
     1787                                    <xsl:attribute name="checked">checked</xsl:attribute> 
     1788                                  </xsl:if> 
     1789                                </input> 
     1790                                forever 
     1791                                <input type="radio" name="recurCountUntil" value="count" id="recurCount"> 
     1792                                  <xsl:if test="form/recurring/count != '-1'"> 
     1793                                    <xsl:attribute name="checked">checked</xsl:attribute> 
     1794                                  </xsl:if> 
     1795                                </input> 
     1796                                <input type="text" value="1" size="2" name="countHolder"  onfocus="selectRecurCountUntil('recurCount')"> 
     1797                                  <xsl:if test="form/recurring/count and form/recurring/count != '-1'"> 
     1798                                    <xsl:attribute name="value"><xsl:value-of select="form/recurring/count"/></xsl:attribute> 
     1799                                  </xsl:if> 
     1800                                </input> 
     1801                                time(s) 
     1802                                <input type="radio" name="recurCountUntil" value="until" id="recurUntil"> 
     1803                                  <xsl:if test="form/recurring/until"> 
     1804                                    <xsl:attribute name="checked">checked</xsl:attribute> 
     1805                                  </xsl:if> 
     1806                                </input> 
     1807                                until 
     1808                                <span id="untilHolder"> 
     1809                                  <!-- span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetUntilDate" iconURL="{$resourcesRoot}/resources/calIcon.gif"> 
     1810                                    <xsl:attribute name="value"><xsl:value-of select="form/start/rfc3339DateTime"/></xsl:attribute> 
     1811                                    <xsl:text> </xsl:text> 
     1812                                  </span --> 
     1813                                  <input type="hidden" name="bwEventUntilDate" id="bwEventUntilDate" size="10"/> 
     1814                                  <input type="text" name="bwEventWidgetUntilDate" id="bwEventWidgetUntilDate" size="10" onfocus="selectRecurCountUntil('recurUntil')"/> 
     1815                                  <script language="JavaScript" type="text/javascript"> 
     1816                                    <xsl:comment> 
     1817                                    $("#bwEventWidgetUntilDate").datepicker({ 
     1818                                      <xsl:choose> 
     1819                                        <xsl:when test="form/recurrence/until"> 
     1820                                          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)"/>), 
     1821                                        </xsl:when> 
     1822                                        <xsl:otherwise> 
     1823                                          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"/>), 
     1824                                        </xsl:otherwise> 
     1825                                      </xsl:choose> 
     1826                                      altField: "#bwEventUntilDate", 
     1827                                      altFormat: "yymmdd" 
     1828                                    }).attr("readonly", "readonly"); 
     1829                                    $("#bwEventWidgetUntilDate").val('<xsl:value-of select="substring-before(form/start/rfc3339DateTime,'T')"/>'); 
     1830                                    </xsl:comment> 
     1831                                  </script> 
     1832                                </span> 
     1833                              </p> 
     1834                            </div> 
     1835                          </td> 
    21481836                        </tr> 
    2149                         <tr class="colNames"> 
    2150                           <td>Date</td> 
    2151                           <td>Time</td> 
    2152                           <td>TZid</td> 
    2153                           <td></td> 
     1837                        <tr> 
     1838                          <td id="advancedRrules" class="invisible"> 
     1839                            <!-- hourly --> 
     1840                            <div id="hourlyRecurrenceRules" class="invisible"> 
     1841                              <p> 
     1842                                <em>Interval:</em> 
     1843                                every 
     1844                                <input type="text" name="hourlyInterval" size="2" value="1"> 
     1845                                  <xsl:if test="form/recurrence/interval"> 
     1846                                    <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
     1847                                  </xsl:if> 
     1848                                </input> 
     1849                                hour(s) 
     1850                              </p> 
     1851                            </div> 
     1852                            <!-- daily --> 
     1853                            <div id="dailyRecurrenceRules" class="invisible"> 
     1854                              <p> 
     1855                                <em>Interval:</em> 
     1856                                every 
     1857                                <input type="text" name="dailyInterval" size="2" value="1"> 
     1858                                  <xsl:if test="form/recurrence/interval"> 
     1859                                    <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
     1860                                  </xsl:if> 
     1861                                </input> 
     1862                                day(s) 
     1863                              </p> 
     1864                              <p> 
     1865                                <input type="checkbox" name="swapDayMonthCheckBoxList" value="" onclick="swapVisible(this,'dayMonthCheckBoxList')"/> 
     1866                                in these months: 
     1867                                <div id="dayMonthCheckBoxList" class="invisible"> 
     1868                                  <xsl:for-each select="/bedework/monthlabels/val"> 
     1869                                    <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 
     1870                                    <span class="chkBoxListItem"> 
     1871                                      <input type="checkbox" name="dayMonths"> 
     1872                                        <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute> 
     1873                                      </input> 
     1874                                      <xsl:value-of select="."/> 
     1875                                    </span> 
     1876                                    <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 
     1877                                  </xsl:for-each> 
     1878                                </div> 
     1879                              </p> 
     1880                              <!--<p> 
     1881                                <input type="checkbox" name="swapDaySetPos" value="" onclick="swapVisible(this,'daySetPos')"/> 
     1882                                limit to: 
     1883                                <div id="daySetPos" class="invisible"> 
     1884                                </div> 
     1885                              </p>--> 
     1886                            </div> 
     1887                            <!-- weekly --> 
     1888                            <div id="weeklyRecurrenceRules" class="invisible"> 
     1889                              <p> 
     1890                                <em>Interval:</em> 
     1891                                every 
     1892                                <input type="text" name="weeklyInterval" size="2" value="1"> 
     1893                                  <xsl:if test="form/recurrence/interval"> 
     1894                                    <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
     1895                                  </xsl:if> 
     1896                                </input> 
     1897                                week(s) on: 
     1898                              </p> 
     1899                              <p> 
     1900                                <div id="weekRecurFields"> 
     1901                                  <xsl:call-template name="byDayChkBoxList"> 
     1902                                    <xsl:with-param name="name">byDayWeek</xsl:with-param> 
     1903                                  </xsl:call-template> 
     1904                                </div> 
     1905                              </p> 
     1906                              <p class="weekRecurLinks"> 
     1907                                <a href="javascript:recurSelectWeekdays('weekRecurFields')">select weekdays</a> | 
     1908                                <a href="javascript:recurSelectWeekends('weekRecurFields')">select weekends</a> 
     1909                              </p> 
     1910                              <p> 
     1911                                Week start: 
     1912                                <select name="weekWkst"> 
     1913                                  <xsl:for-each select="/bedework/shortdaynames/val"> 
     1914                                    <xsl:variable name="pos" select="position()"/> 
     1915                                    <option> 
     1916                                      <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 
     1917                                      <xsl:value-of select="."/> 
     1918                                    </option> 
     1919                                  </xsl:for-each> 
     1920                                </select> 
     1921                              </p> 
     1922                            </div> 
     1923                            <!-- monthly --> 
     1924                            <div id="monthlyRecurrenceRules" class="invisible"> 
     1925                              <p> 
     1926                                <em>Interval:</em> 
     1927                                every 
     1928                                <input type="text" name="monthlyInterval" size="2" value="1"> 
     1929                                  <xsl:if test="form/recurrence/interval"> 
     1930                                    <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
     1931                                  </xsl:if> 
     1932                                </input> 
     1933                                month(s) 
     1934                              </p> 
     1935                              <div id="monthRecurFields"> 
     1936                                <div id="monthRecurFields1"> 
     1937                                  on 
     1938                                  <select name="bymonthposPos1" width="7em" onchange="changeClass('monthRecurFields2','shown')"> 
     1939                                    <xsl:call-template name="recurrenceDayPosOptions"/> 
     1940                                  </select> 
     1941                                  <xsl:call-template name="byDayChkBoxList"/> 
     1942                                </div> 
     1943                                <xsl:call-template name="buildRecurFields"> 
     1944                                  <xsl:with-param name="current">2</xsl:with-param> 
     1945                                  <xsl:with-param name="total">10</xsl:with-param> 
     1946                                  <xsl:with-param name="name">month</xsl:with-param> 
     1947                                </xsl:call-template> 
     1948                              </div> 
     1949                              <p> 
     1950                                <input type="checkbox" name="swapMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'monthDaysCheckBoxList')"/> 
     1951                                on these days:<br/> 
     1952                                <div id="monthDaysCheckBoxList" class="invisible"> 
     1953                                  <xsl:call-template name="buildCheckboxList"> 
     1954                                    <xsl:with-param name="current">1</xsl:with-param> 
     1955                                    <xsl:with-param name="end">31</xsl:with-param> 
     1956                                    <xsl:with-param name="name">monthDayBoxes</xsl:with-param> 
     1957                                  </xsl:call-template> 
     1958                                </div> 
     1959                              </p> 
     1960                            </div> 
     1961                            <!-- yearly --> 
     1962                            <div id="yearlyRecurrenceRules" class="invisible"> 
     1963                              <p> 
     1964                                <em>Interval:</em> 
     1965                                every 
     1966                                <input type="text" name="yearlyInterval" size="2" value="1"> 
     1967                                  <xsl:if test="form/recurrence/interval"> 
     1968                                    <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
     1969                                  </xsl:if> 
     1970                                </input> 
     1971                                years(s) 
     1972                              </p> 
     1973                              <div id="yearRecurFields"> 
     1974                                <div id="yearRecurFields1"> 
     1975                                  on 
     1976                                  <select name="byyearposPos1" width="7em" onchange="changeClass('yearRecurFields2','shown')"> 
     1977                                    <xsl:call-template name="recurrenceDayPosOptions"/> 
     1978                                  </select> 
     1979                                  <xsl:call-template name="byDayChkBoxList"/> 
     1980                                </div> 
     1981                                <xsl:call-template name="buildRecurFields"> 
     1982                                  <xsl:with-param name="current">2</xsl:with-param> 
     1983                                  <xsl:with-param name="total">10</xsl:with-param> 
     1984                                  <xsl:with-param name="name">year</xsl:with-param> 
     1985                                </xsl:call-template> 
     1986                              </div> 
     1987                              <p> 
     1988                                <input type="checkbox" name="swapYearMonthCheckBoxList" value="" onclick="swapVisible(this,'yearMonthCheckBoxList')"/> 
     1989                                in these months: 
     1990                                <div id="yearMonthCheckBoxList" class="invisible"> 
     1991                                  <xsl:for-each select="/bedework/monthlabels/val"> 
     1992                                    <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 
     1993                                    <span class="chkBoxListItem"> 
     1994                                      <input type="checkbox" name="yearMonths"> 
     1995                                        <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute> 
     1996                                      </input> 
     1997                                      <xsl:value-of select="."/> 
     1998                                    </span> 
     1999                                    <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 
     2000                                  </xsl:for-each> 
     2001                                </div> 
     2002                              </p> 
     2003                              <p> 
     2004                                <input type="checkbox" name="swapYearMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'yearMonthDaysCheckBoxList')"/> 
     2005                                on these days of the month:<br/> 
     2006                                <div id="yearMonthDaysCheckBoxList" class="invisible"> 
     2007                                  <xsl:call-template name="buildCheckboxList"> 
     2008                                    <xsl:with-param name="current">1</xsl:with-param> 
     2009                                    <xsl:with-param name="end">31</xsl:with-param> 
     2010                                    <xsl:with-param name="name">yearMonthDayBoxes</xsl:with-param> 
     2011                                  </xsl:call-template> 
     2012                                </div> 
     2013                              </p> 
     2014                              <p> 
     2015                                <input type="checkbox" name="swapYearWeeksCheckBoxList" value="" onclick="swapVisible(this,'yearWeeksCheckBoxList')"/> 
     2016                                in these weeks of the year:<br/> 
     2017                                <div id="yearWeeksCheckBoxList" class="invisible"> 
     2018                                  <xsl:call-template name="buildCheckboxList"> 
     2019                                    <xsl:with-param name="current">1</xsl:with-param> 
     2020                                    <xsl:with-param name="end">53</xsl:with-param> 
     2021                                    <xsl:with-param name="name">yearWeekBoxes</xsl:with-param> 
     2022                                  </xsl:call-template> 
     2023                                </div> 
     2024                              </p> 
     2025                              <p> 
     2026                                <input type="checkbox" name="swapYearDaysCheckBoxList" value="" onclick="swapVisible(this,'yearDaysCheckBoxList')"/> 
     2027                                on these days of the year:<br/> 
     2028                                <div id="yearDaysCheckBoxList" class="invisible"> 
     2029                                  <xsl:call-template name="buildCheckboxList"> 
     2030                                    <xsl:with-param name="current">1</xsl:with-param> 
     2031                                    <xsl:with-param name="end">366</xsl:with-param> 
     2032                                    <xsl:with-param name="name">yearDayBoxes</xsl:with-param> 
     2033                                  </xsl:call-template> 
     2034                                </div> 
     2035                              </p> 
     2036                              <p> 
     2037                                Week start: 
     2038                                <select name="yearWkst"> 
     2039                                  <xsl:for-each select="/bedework/shortdaynames/val"> 
     2040                                    <xsl:variable name="pos" select="position()"/> 
     2041                                    <option> 
     2042                                      <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 
     2043                                      <xsl:value-of select="."/> 
     2044                                    </option> 
     2045                                  </xsl:for-each> 
     2046                                </select> 
     2047                              </p> 
     2048                            </div> 
     2049                          </td> 
    21542050                        </tr> 
    21552051                      </table> 
    2156  
    2157                       <input type="hidden" name="exdates" value="" id="bwExdatesField" /> 
    2158                       <!-- if there are no exception dates, the following table will show --> 
    2159                       <table cellspacing="0" class="invisible" id="bwCurrentExdatesNone"> 
    2160                         <tr><th>Exception Dates</th></tr> 
    2161                         <tr><td>No exception dates</td></tr> 
    2162                       </table> 
    2163  
    2164                       <!-- if there are exception dates, the following table will show --> 
    2165                       <table cellspacing="0" class="invisible" id="bwCurrentExdates"> 
    2166                         <tr> 
    2167                           <th colspan="4">Exception Dates</th> 
    2168                         </tr> 
    2169                         <tr class="colNames"> 
    2170                           <td>Date</td> 
    2171                           <td>Time</td> 
    2172                           <td>TZid</td> 
    2173                           <td></td> 
    2174                         </tr> 
    2175                       </table> 
    2176                       <p> 
    2177                         Exception dates may also be created by deleting an instance 
    2178                         of a recurring event. 
    2179                       </p> 
     2052                      <h4> 
     2053                        Recurrence and Exception Dates 
     2054                      </h4> 
     2055                      <div id="raContent"> 
     2056                        <div class="dateStartEndBox" id="rdatesFormFields"> 
     2057                          <!-- 
     2058                          <input type="checkbox" name="dateOnly" id="rdateDateOnly" onclick="swapRdateAllDay(this)" value="true"/> 
     2059                          all day 
     2060                          <input type="checkbox" name="floating" id="rdateFloating" onclick="swapRdateFloatingTime(this)" value="true"/> 
     2061                          floating 
     2062                          store time as coordinated universal time (UTC) 
     2063                          <input type="checkbox" name="storeUTC" id="rdateStoreUTC" onclick="swapRdateStoreUTC(this)" value="true"/> 
     2064                          store as UTC<br/>--> 
     2065                          <div class="dateFields"> 
     2066                            <!-- input name="eventRdate.date" 
     2067                                   dojoType="dropdowndatepicker" 
     2068                                   formatLength="medium" 
     2069                                   value="today" 
     2070                                   saveFormat="yyyyMMdd" 
     2071                                   id="bwEventWidgeRdate" 
     2072                                   iconURL="{$resourcesRoot}/resources/calIcon.gif"/--> 
     2073                            <input type="text" name="eventRdate.date" id="bwEventWidgetRdate" size="10"/> 
     2074                            <script language="JavaScript" type="text/javascript"> 
     2075                              <xsl:comment> 
     2076                              $("#bwEventWidgetRdate").datepicker({ 
     2077                                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"/>), 
     2078                                dateFormat: "yymmdd" 
     2079                              }).attr("readonly", "readonly"); 
     2080                              $("#bwEventWidgetRdate").val('<xsl:value-of select="substring-before(form/start/rfc3339DateTime,'T')"/>'); 
     2081                              </xsl:comment> 
     2082                            </script> 
     2083                          </div> 
     2084                          <div id="rdateTimeFields" class="timeFields"> 
     2085                           <select name="eventRdate.hour"> 
     2086                              <option value="00">00</option> 
     2087                              <option value="01">01</option> 
     2088                              <option value="02">02</option> 
     2089                              <option value="03">03</option> 
     2090                              <option value="04">04</option> 
     2091                              <option value="05">05</option> 
     2092                              <option value="06">06</option> 
     2093                              <option value="07">07</option> 
     2094                              <option value="08">08</option> 
     2095                              <option value="09">09</option> 
     2096                              <option value="10">10</option> 
     2097                              <option value="11">11</option> 
     2098                              <option value="12" selected="selected">12</option> 
     2099                              <option value="13">13</option> 
     2100                              <option value="14">14</option> 
     2101                              <option value="15">15</option> 
     2102                              <option value="16">16</option> 
     2103                              <option value="17">17</option> 
     2104                              <option value="18">18</option> 
     2105                              <option value="19">19</option> 
     2106                              <option value="20">20</option> 
     2107                              <option value="21">21</option> 
     2108                              <option value="22">22</option> 
     2109                              <option value="23">23</option> 
     2110                            </select> 
     2111                            <select name="eventRdate.minute"> 
     2112                              <option value="00" selected="selected">00</option> 
     2113                              <option value="05">05</option> 
     2114                              <option value="10">10</option> 
     2115                              <option value="15">15</option> 
     2116                              <option value="20">20</option> 
     2117                              <option value="25">25</option> 
     2118                              <option value="30">30</option> 
     2119                              <option value="35">35</option> 
     2120                              <option value="40">40</option> 
     2121                              <option value="45">45</option> 
     2122                              <option value="50">50</option> 
     2123                              <option value="55">55</option> 
     2124                            </select> 
     2125                           <xsl:text> </xsl:text> 
     2126 
     2127                            <select name="tzid" id="rdateTzid" class="timezones"> 
     2128                              <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if> 
     2129                              <option value="">select timezone...</option> 
     2130                              <xsl:variable name="rdateTzId" select="/bedework/now/defaultTzid"/> 
     2131                              <xsl:for-each select="/bedework/timezones/timezone"> 
     2132                                <option> 
     2133                                  <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> 
     2134                                  <xsl:if test="$rdateTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
     2135                                  <xsl:value-of select="name"/> 
     2136                                </option> 
     2137                              </xsl:for-each> 
     2138                            </select> 
     2139                          </div> 
     2140                          <xsl:text> </xsl:text> 
     2141                          <!--bwRdates.update() accepts: date, time, allDay, floating, utc, tzid--> 
     2142                          <input type="button" name="rdate" value="add recurrence" 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)"/> 
     2143                          <input type="button" name="exdate" value="add exception" 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)"/> 
     2144 
     2145                          <input type="hidden" name="rdates" value="" id="bwRdatesField" /> 
     2146                          <!-- if there are no recurrence dates, the following table will show --> 
     2147                          <table cellspacing="0" class="invisible" id="bwCurrentRdatesNone"> 
     2148                            <tr><th>Recurrence Dates</th></tr> 
     2149                            <tr><td>No recurrence dates</td></tr> 
     2150                          </table> 
     2151 
     2152                          <!-- if there are recurrence dates, the following table will show --> 
     2153                          <table cellspacing="0" class="invisible" id="bwCurrentRdates"> 
     2154                            <tr> 
     2155                              <th colspan="4">Recurrence Dates</th> 
     2156                            </tr> 
     2157                            <tr class="colNames"> 
     2158                              <td>Date</td> 
     2159                              <td>Time</td> 
     2160                              <td>TZid</td> 
     2161                              <td></td> 
     2162                            </tr> 
     2163                          </table> 
     2164 
     2165                          <input type="hidden" name="exdates" value="" id="bwExdatesField" /> 
     2166                          <!-- if there are no exception dates, the following table will show --> 
     2167                          <table cellspacing="0" class="invisible" id="bwCurrentExdatesNone"> 
     2168                            <tr><th>Exception Dates</th></tr> 
     2169                            <tr><td>No exception dates</td></tr> 
     2170                          </table> 
     2171 
     2172                          <!-- if there are exception dates, the following table will show --> 
     2173                          <table cellspacing="0" class="invisible" id="bwCurrentExdates"> 
     2174                            <tr> 
     2175                              <th colspan="4">Exception Dates</th> 
     2176                            </tr> 
     2177                            <tr class="colNames"> 
     2178                              <td>Date</td> 
     2179                              <td>Time</td> 
     2180                              <td>TZid</td> 
     2181                              <td></td> 
     2182                            </tr> 
     2183                          </table> 
     2184                          <p> 
     2185                            Exception dates may also be created by deleting an instance 
     2186                            of a recurring event. 
     2187                          </p> 
     2188                        </div> 
     2189                      </div> 
    21802190                    </div> 
     2191                  </xsl:otherwise> 
     2192                </xsl:choose> 
     2193              </td> 
     2194            </tr> 
     2195            <!--  Status  --> 
     2196            <tr> 
     2197              <td class="fieldName"> 
     2198                Status: 
     2199              </td> 
     2200              <td> 
     2201                <xsl:choose> 
     2202                  <xsl:when test="form/status = 'TENTATIVE'"> 
     2203                    <input type="radio" name="eventStatus" value="CONFIRMED"/>confirmed <input type="radio" name="eventStatus" value="TENTATIVE" checked="checked"/>tentative <input type="radio" name="eventStatus" value="CANCELLED"/>cancelled 
     2204                  </xsl:when> 
     2205                  <xsl:when test="form/status = 'CANCELLED'"> 
     2206                    <input type="radio" name="eventStatus" value="CONFIRMED"/>confirmed <input type="radio" name="eventStatus" value="TENTATIVE"/>tentative <input type="radio" name="eventStatus" value="CANCELLED" checked="checked"/>cancelled 
     2207                  </xsl:when> 
     2208                  <xsl:otherwise> 
     2209                    <input type="radio" name="eventStatus" value="CONFIRMED" checked="checked"/>confirmed <input type="radio" name="eventStatus" value="TENTATIVE"/>tentative <input type="radio" name="eventStatus" value="CANCELLED"/>cancelled 
     2210                  </xsl:otherwise> 
     2211                </xsl:choose> 
     2212              </td> 
     2213            </tr> 
     2214            <!--  Transparency  --> 
     2215            <tr> 
     2216              <td class="fieldName"> 
     2217                Effects free/busy: 
     2218              </td> 
     2219              <td align="left" class="padMeTop"> 
     2220                <input type="radio" value="OPAQUE" name="transparency"> 
     2221                  <xsl:if test="form/transparency = 'OPAQUE'"> 
     2222                    <xsl:attribute name="checked">checked</xsl:attribute> 
     2223                  </xsl:if> 
     2224                </input> 
     2225                yes (opaque) 
     2226 
     2227                <input type="radio" value="TRANSPARENT" name="transparency"> 
     2228                  <xsl:if test="form/transparency = 'TRANSPARENT'"> 
     2229                    <xsl:attribute name="checked">checked</xsl:attribute> 
     2230                  </xsl:if> 
     2231                </input> 
     2232                no (transparent) 
     2233              </td> 
     2234            </tr> 
     2235            <!--  Description  --> 
     2236            <tr> 
     2237              <td class="fieldName"> 
     2238                Description: 
     2239              </td> 
     2240              <td> 
     2241                <textarea name="description" cols="55" rows="8"> 
     2242                  <xsl:value-of select="form/desc/textarea"/> 
     2243                  <xsl:if test="form/desc/textarea = ''"><xsl:text> </xsl:text></xsl:if> 
     2244                </textarea> 
     2245                <div class="fieldInfo"> 
     2246                  Enter all pertinent information, including the academic titles of 
     2247                  all speakers and/or participants. 
     2248                  <span class="maxCharNotice">(<xsl:value-of select="form/descLength"/> characters max.)</span> 
     2249                </div> 
     2250              </td> 
     2251            </tr> 
     2252            <!-- Cost --> 
     2253            <tr> 
     2254              <td class="optional"> 
     2255                Cost: 
     2256              </td> 
     2257              <td> 
     2258                <xsl:copy-of select="form/cost/*"/> 
     2259                <xsl:text> </xsl:text> 
     2260                <span class="fieldInfo">(optional: if any, and place to purchase tickets)</span> 
     2261              </td> 
     2262            </tr> 
     2263            <!-- Url --> 
     2264            <tr> 
     2265              <td class="optional"> 
     2266                Event URL: 
     2267              </td> 
     2268              <td> 
     2269                <xsl:variable name="link" select="form/link/input/@value"/> 
     2270                <input type="text" name="eventLink" value="{$link}" size="80" class="edit"/> 
     2271                <xsl:text> </xsl:text> 
     2272                <span class="fieldInfo">(optional: for more information about the event)</span> 
     2273              </td> 
     2274            </tr> 
     2275            <!-- Image Url --> 
     2276            <tr> 
     2277              <td class="optional"> 
     2278                Image URL: 
     2279              </td> 
     2280              <td> 
     2281                <input type="text" name="xBwImageHolder" value="" size="80" class="edit"> 
     2282                  <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-IMAGE']/values/text"/></xsl:attribute> 
     2283                </input> 
     2284                <xsl:text> </xsl:text> 
     2285                <span class="fieldInfo">(optional: to include an image with the event description)</span> 
     2286              </td> 
     2287            </tr> 
     2288            <!-- Location --> 
     2289            <tr> 
     2290              <td class="fieldName"> 
     2291                Location: 
     2292              </td> 
     2293              <td> 
     2294                <xsl:if test="form/location/preferred/select/option"> 
     2295                  <select name="prefLocationId" id="bwPreferredLocationList"> 
     2296                    <option value=""> 
     2297                      Select: 
     2298                    </option> 
     2299                    <xsl:copy-of select="form/location/preferred/select/*"/> 
     2300                  </select> 
     2301                </xsl:if> 
     2302                <select name="allLocationId" id="bwAllLocationList"> 
     2303                  <xsl:if test="form/location/preferred/select/option"> 
     2304                    <xsl:attribute name="class">invisible</xsl:attribute> 
     2305                  </xsl:if> 
     2306                  <option value=""> 
     2307                    Select: 
     2308                  </option> 
     2309                  <xsl:copy-of select="form/location/all/select/*"/> 
     2310                </select> 
     2311                <xsl:text> </xsl:text> 
     2312                <!-- allow for toggling between the preferred and all location listings if preferred 
     2313                     locations exist --> 
     2314                <xsl:if test="form/location/preferred/select/option"> 
     2315                  <input type="radio" name="toggleLocationLists" value="preferred" checked="checked" onclick="changeClass('bwPreferredLocationList','shown');changeClass('bwAllLocationList','invisible');"/> 
     2316                  preferred 
     2317                  <input type="radio" name="toggleLocationLists" value="all" onclick="changeClass('bwPreferredLocationList','invisible');changeClass('bwAllLocationList','shown');"/> 
     2318                  all 
     2319                </xsl:if> 
     2320              </td> 
     2321            </tr> 
     2322 
     2323            <xsl:if test="form/location/address"> 
     2324              <tr> 
     2325                <td class="fieldName" colspan="2"> 
     2326                  <span class="std-text"> 
     2327                    <span class="bold">or</span> add</span> 
     2328                </td> 
     2329              </tr> 
     2330              <tr> 
     2331                <td class="fieldName"> 
     2332                  Address: 
     2333                </td> 
     2334                <td> 
     2335                  <xsl:variable name="addressFieldName" select="form/location/address/input/@name"/> 
     2336                  <xsl:variable name="calLocations"> 
     2337                    <xsl:for-each select="form/location/all/select/option">"<xsl:value-of select="."/>"<xsl:if test="position()!=last()">,</xsl:if> 
     2338                    </xsl:for-each> 
     2339                  </xsl:variable> 
     2340                  <input type="text" size="30" name="{$addressFieldName}" autocomplete="off" onfocus="autoComplete(this,event,new Array({$calLocations}));"/> 
     2341                  <div class="fieldInfo"> 
     2342                    Please include room, building, and campus (if not Seattle). 
    21812343                  </div> 
     2344                </td> 
     2345              </tr> 
     2346              <tr> 
     2347                <td class="optional"> 
     2348                  <span class="std-text">Location URL:</span> 
     2349                </td> 
     2350                <td> 
     2351                  <xsl:copy-of select="form/location/link/*"/> 
     2352                  <xsl:text> </xsl:text> 
     2353                  <span class="fieldInfo">(optional: for information about the location)</span> 
     2354                </td> 
     2355              </tr> 
     2356            </xsl:if> 
     2357 
     2358            <!-- Contact --> 
     2359            <tr> 
     2360              <td class="fieldName"> 
     2361                Contact: 
     2362              </td> 
     2363              <td> 
     2364                <xsl:if test="form/contact/preferred/select/option"> 
     2365                  <select name="prefContactId" id="bwPreferredContactList"> 
     2366                    <option value=""> 
     2367                      Select: 
     2368                    </option>option> 
     2369                    <xsl:copy-of select="form/contact/preferred/select/*"/> 
     2370                  </select> 
     2371                </xsl:if> 
     2372                <select name="allContactId" id="bwAllContactList"> 
     2373                  <xsl:if test="form/contact/preferred/select/option"> 
     2374                    <xsl:attribute name="class">invisible</xsl:attribute> 
     2375                  </xsl:if> 
     2376                  <option value=""> 
     2377                    Select: 
     2378                  </option> 
     2379                  <xsl:copy-of select="form/contact/all/select/*"/> 
     2380                </select> 
     2381                <xsl:text> </xsl:text> 
     2382                <!-- allow for toggling between the preferred and all contacts listings if preferred 
     2383                     contacts exist --> 
     2384                <xsl:if test="form/contact/preferred/select/option"> 
     2385                  <input type="radio" name="toggleContactLists" value="preferred" checked="checked" onclick="changeClass('bwPreferredContactList','shown');changeClass('bwAllContactList','invisible');"/> 
     2386                  preferred 
     2387                  <input type="radio" name="toggleContactLists" value="all" onclick="changeClass('bwPreferredContactList','invisible');changeClass('bwAllContactList','shown');"/> 
     2388                  all 
     2389                </xsl:if> 
     2390              </td> 
     2391            </tr> 
     2392 
     2393            <!-- Topical area  --> 
     2394            <!-- These are the subscriptions (aliases) where the events should show up. 
     2395                 By selecting one or more of these, appropriate categories will be set on the event --> 
     2396            <tr> 
     2397              <td class="fieldName"> 
     2398                Topical area: 
     2399              </td> 
     2400              <td> 
     2401                <ul class="aliasTree"> 
     2402                  <xsl:apply-templates select="form/subscriptions/calsuite/calendars/calendar" mode="showEventFormAliases"> 
     2403                    <xsl:with-param name="root">true</xsl:with-param> 
     2404                  </xsl:apply-templates> 
     2405                </ul> 
     2406              </td> 
     2407            </tr> 
     2408 
     2409            <!--  Category  --> 
     2410            <!-- 
     2411              direct setting of categories is deprecated; if you want to reenable, uncomment this block - but 
     2412              be forwarned that this will have peculiar consequences if using the submissions client 
     2413              --> 
     2414            <!-- 
     2415            <tr> 
     2416              <td class="fieldName"> 
     2417                Categories: 
     2418              </td> 
     2419              <td> 
     2420                <a href="javascript:toggleVisibility('bwEventCategories','visible')"> 
     2421                  show/hide categories 
     2422                </a> 
     2423                <div id="bwEventCategories" class="invisible"> 
     2424                  <xsl:if test="form/categories/preferred/category and /bedework/creating='true'"> 
     2425                    <input type="radio" name="categoryCheckboxes" value="preferred" checked="checked" onclick="changeClass('preferredCategoryCheckboxes','shown');changeClass('allCategoryCheckboxes','invisible');"/>preferred 
     2426                    <input type="radio" name="categoryCheckboxes" value="all" onclick="changeClass('preferredCategoryCheckboxes','invisible');changeClass('allCategoryCheckboxes','shown')"/>all<br/> 
     2427                    <table cellpadding="0" id="preferredCategoryCheckboxes"> 
     2428                      <tr> 
     2429                        <xsl:variable name="catCount" select="count(form/categories/preferred/category)"/> 
     2430                        <td> 
     2431                          <xsl:for-each select="form/categories/preferred/category[position() &lt;= ceiling($catCount div 2)]"> 
     2432                            <xsl:sort select="keyword" order="ascending"/> 
     2433                            <input type="checkbox" name="catUid"> 
     2434                              <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute> 
     2435                              <xsl:attribute name="id">pref-<xsl:value-of select="uid"/></xsl:attribute> 
     2436                              <xsl:attribute name="onchange">setCatChBx('pref-<xsl:value-of select="uid"/>','all-<xsl:value-of select="uid"/>')</xsl:attribute> 
     2437                              <xsl:if test="uid = ../../current//category/uid"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
     2438                              <xsl:if test="uid = /bedework/currentCalSuite/defaultCategories//category/uid"> 
     2439                                <xsl:attribute name="disabled">disabled</xsl:attribute> 
     2440                              </xsl:if> 
     2441                              <xsl:value-of select="keyword"/> 
     2442                            </input><br/> 
     2443                          </xsl:for-each> 
     2444                        </td> 
     2445                        <td> 
     2446                          <xsl:for-each select="form/categories/preferred/category[position() &gt; ceiling($catCount div 2)]"> 
     2447                            <xsl:sort select="keyword" order="ascending"/> 
     2448                            <input type="checkbox" name="catUid"> 
     2449                              <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute> 
     2450                              <xsl:attribute name="id">pref-<xsl:value-of select="uid"/></xsl:attribute> 
     2451                              <xsl:attribute name="onchange">setCatChBx('pref-<xsl:value-of select="uid"/>','all-<xsl:value-of select="uid"/>')</xsl:attribute> 
     2452                              <xsl:if test="uid = ../../current//category/uid"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
     2453                              <xsl:if test="uid = /bedework/currentCalSuite/defaultCategories//category/uid"> 
     2454                                <xsl:attribute name="disabled">disabled</xsl:attribute> 
     2455                              </xsl:if> 
     2456                              <xsl:value-of select="keyword"/> 
     2457                            </input><br/> 
     2458                          </xsl:for-each> 
     2459                        </td> 
     2460                      </tr> 
     2461                    </table> 
     2462                  </xsl:if> 
     2463                  <table cellpadding="0" id="allCategoryCheckboxes"> 
     2464                    <xsl:if test="form/categories/preferred/category and /bedework/creating='true'"> 
     2465                      <xsl:attribute name="class">invisible</xsl:attribute> 
     2466                    </xsl:if> 
     2467                    <tr> 
     2468                      <xsl:variable name="catCount" select="count(form/categories/all/category)"/> 
     2469                      <td> 
     2470                        <xsl:for-each select="form/categories/all/category[position() &lt;= ceiling($catCount div 2)]"> 
     2471                          <input type="checkbox" name="catUid"> 
     2472                            <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute> 
     2473                            <xsl:if test="/bedework/creating='true'"> 
     2474                              <xsl:attribute name="id">all-<xsl:value-of select="uid"/></xsl:attribute> 
     2475                              <xsl:attribute name="onchange">setCatChBx('all-<xsl:value-of select="uid"/>','pref-<xsl:value-of select="uid"/>')</xsl:attribute> 
     2476                            </xsl:if> 
     2477                            <xsl:if test="uid = ../../current//category/uid"> 
     2478                              <xsl:attribute name="checked">checked</xsl:attribute> 
     2479                              <xsl:if test="uid = /bedework/currentCalSuite/defaultCategories//category/uid"> 
     2480                                <xsl:attribute name="disabled">disabled</xsl:attribute> 
     2481                              </xsl:if> 
     2482                            </xsl:if> 
     2483                            <xsl:value-of select="keyword"/> 
     2484                          </input><br/> 
     2485                        </xsl:for-each> 
     2486                      </td> 
     2487                      <td> 
     2488                        <xsl:for-each select="form/categories/all/category[position() &gt; ceiling($catCount div 2)]"> 
     2489                          <input type="checkbox" name="catUid"> 
     2490                            <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute> 
     2491                            <xsl:if test="/bedework/creating='true'"> 
     2492                              <xsl:attribute name="id">all-<xsl:value-of select="uid"/></xsl:attribute> 
     2493                              <xsl:attribute name="onchange">setCatChBx('all-<xsl:value-of select="uid"/>','pref-<xsl:value-of select="uid"/>')</xsl:attribute> 
     2494                            </xsl:if> 
     2495                            <xsl:if test="uid = ../../current//category/uid"> 
     2496                              <xsl:attribute name="checked">checked</xsl:attribute> 
     2497                              <xsl:if test="uid = /bedework/currentCalSuite/defaultCategories//category/uid"> 
     2498                                <xsl:attribute name="disabled">disabled</xsl:attribute> 
     2499                              </xsl:if> 
     2500                            </xsl:if> 
     2501                            <xsl:value-of select="keyword"/> 
     2502                          </input><br/> 
     2503                        </xsl:for-each> 
     2504                      </td> 
     2505                    </tr> 
     2506                  </table> 
    21822507                </div> 
    2183               </xsl:otherwise> 
    2184             </xsl:choose> 
    2185           </td> 
    2186         </tr> 
    2187         <!--  Status  --> 
    2188         <tr> 
    2189           <td class="fieldName"> 
    2190             Status: 
    2191           </td> 
    2192           <td> 
    2193             <xsl:choose> 
    2194               <xsl:when test="form/status = 'TENTATIVE'"> 
    2195                 <input type="radio" name="eventStatus" value="CONFIRMED"/>confirmed <input type="radio" name="eventStatus" value="TENTATIVE" checked="checked"/>tentative <input type="radio" name="eventStatus" value="CANCELLED"/>cancelled 
    2196               </xsl:when> 
    2197               <xsl:when test="form/status = 'CANCELLED'"> 
    2198                 <input type="radio" name="eventStatus" value="CONFIRMED"/>confirmed <input type="radio" name="eventStatus" value="TENTATIVE"/>tentative <input type="radio" name="eventStatus" value="CANCELLED" checked="checked"/>cancelled 
    2199               </xsl:when> 
    2200               <xsl:otherwise> 
    2201                 <input type="radio" name="eventStatus" value="CONFIRMED" checked="checked"/>confirmed <input type="radio" name="eventStatus" value="TENTATIVE"/>tentative <input type="radio" name="eventStatus" value="CANCELLED"/>cancelled 
    2202               </xsl:otherwise> 
    2203             </xsl:choose> 
    2204           </td> 
    2205         </tr> 
    2206         <!--  Transparency  --> 
    2207         <tr> 
    2208           <td class="fieldName"> 
    2209             Effects free/busy: 
    2210           </td> 
    2211           <td align="left" class="padMeTop"> 
    2212             <input type="radio" value="OPAQUE" name="transparency"> 
    2213               <xsl:if test="form/transparency = 'OPAQUE'"> 
    2214                 <xsl:attribute name="checked">checked</xsl:attribute> 
    2215               </xsl:if> 
    2216             </input> 
    2217             yes (opaque) 
    2218  
    2219             <input type="radio" value="TRANSPARENT" name="transparency"> 
    2220               <xsl:if test="form/transparency = 'TRANSPARENT'"> 
    2221                 <xsl:attribute name="checked">checked</xsl:attribute> 
    2222               </xsl:if> 
    2223             </input> 
    2224             no (transparent) 
    2225           </td> 
    2226         </tr> 
    2227         <!--  Description  --> 
    2228         <tr> 
    2229           <td class="fieldName"> 
    2230             Description: 
    2231           </td> 
    2232           <td> 
    2233             <textarea name="description" cols="55" rows="8"> 
    2234               <xsl:value-of select="form/desc/textarea"/> 
    2235               <xsl:if test="form/desc/textarea = ''"><xsl:text> </xsl:text></xsl:if> 
    2236             </textarea> 
    2237             <div class="fieldInfo"> 
    2238               Enter all pertinent information, including the academic titles of 
    2239               all speakers and/or participants. 
    2240               <span class="maxCharNotice">(<xsl:value-of select="form/descLength"/> characters max.)</span> 
    2241             </div> 
    2242           </td> 
    2243         </tr> 
    2244         <!-- Cost --> 
    2245         <tr> 
    2246           <td class="optional"> 
    2247             Cost: 
    2248           </td> 
    2249           <td> 
    2250             <xsl:copy-of select="form/cost/*"/> 
    2251             <xsl:text> </xsl:text> 
    2252             <span class="fieldInfo">(optional: if any, and place to purchase tickets)</span> 
    2253           </td> 
    2254         </tr> 
    2255         <!-- Url --> 
    2256         <tr> 
    2257           <td class="optional"> 
    2258             Event URL: 
    2259           </td> 
    2260           <td> 
    2261             <xsl:variable name="link" select="form/link/input/@value"/> 
    2262             <input type="text" name="eventLink" value="{$link}" size="80" class="edit"/> 
    2263             <xsl:text> </xsl:text> 
    2264             <span class="fieldInfo">(optional: for more information about the event)</span> 
    2265           </td> 
    2266         </tr> 
    2267         <!-- Image Url --> 
    2268         <tr> 
    2269           <td class="optional"> 
    2270             Image URL: 
    2271           </td> 
    2272           <td> 
    2273             <input type="text" name="xBwImageHolder" value="" size="80" class="edit"> 
    2274               <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-IMAGE']/values/text"/></xsl:attribute> 
    2275             </input> 
    2276             <xsl:text> </xsl:text> 
    2277             <span class="fieldInfo">(optional: to include an image with the event description)</span> 
    2278           </td> 
    2279         </tr> 
    2280         <!-- Location --> 
    2281         <tr> 
    2282           <td class="fieldName"> 
    2283             Location: 
    2284           </td> 
    2285           <td> 
    2286             <xsl:if test="form/location/preferred/select/option"> 
    2287               <select name="prefLocationId" id="bwPreferredLocationList"> 
    2288                 <option value=""> 
    2289                   Select: 
    2290                 </option> 
    2291                 <xsl:copy-of select="form/location/preferred/select/*"/> 
    2292               </select> 
     2508              </td> 
     2509            </tr> 
     2510            --> 
     2511            <!-- note --> 
     2512            <!-- let's shut this off for now - needs rewriting if we keep it at all 
     2513            <tr> 
     2514              <td colspan="2" style="padding-top: 1em;"> 
     2515                <span class="fieldInfo"> 
     2516                  <strong>If "preferred values" are enabled</strong> 
     2517                  by your administrator, the calendar, category, location, and contact lists will 
     2518                  contain only those value you've used previously.  If you don't find the value 
     2519                  you need in one of these lists, use the "all" list adjacent to each 
     2520                  of these fields.  The event you select from the "all" list will be added 
     2521                  to your preferred list from that point on.  <strong>Note: if you don't 
     2522                  find a location or contact at all, you can add a new one from the 
     2523                  <a href="{$setup}">main menu</a>.</strong> 
     2524                  Only administrators can create calendars, however. 
     2525                  To make sure you've used the 
     2526                  correct calendar, please see the 
     2527                  <a href="" target="_blank">Calendar Definitions</a> 
     2528                </span> 
     2529              </td> 
     2530            </tr> --> 
     2531 
     2532            <xsl:if test="form/contact/name"> 
     2533              <tr> 
     2534                <td class="fieldName" colspan="2"> 
     2535                  <span class="std-text"> 
     2536                    <span class="bold">or</span> add</span> 
     2537                </td> 
     2538              </tr> 
     2539              <tr> 
     2540                <td class="fieldName"> 
     2541                  Contact (name): 
     2542                </td> 
     2543                <td> 
     2544                  <xsl:copy-of select="form/contact/name/*"/> 
     2545                </td> 
     2546              </tr> 
     2547              <tr> 
     2548                <td class="fieldName"> 
     2549                  Contact Phone Number: 
     2550                </td> 
     2551                <td> 
     2552                  <xsl:copy-of select="form/contact/phone/*"/> 
     2553                  <xsl:text> </xsl:text> 
     2554                  <span class="fieldInfo">(optional)</span> 
     2555                </td> 
     2556              </tr> 
     2557              <tr> 
     2558                <td class="optional"> 
     2559                  Contact's URL: 
     2560                </td> 
     2561                <td> 
     2562                  <xsl:copy-of select="form/contact/link/*"/> 
     2563                  <xsl:text> </xsl:text> 
     2564                  <span class="fieldInfo">(optional)</span> 
     2565                </td> 
     2566              </tr> 
     2567              <tr> 
     2568                <td class="optional"> 
     2569                  Contact Email Address: 
     2570                </td> 
     2571                <td> 
     2572                  <xsl:copy-of select="form/contact/email/*"/> 
     2573                  <xsl:text> </xsl:text> 
     2574                  <span class="fieldInfo">(optional)</span> test 
     2575                  <div id="contactEmailAlert">&#160;</div> <!-- space for email warning --> 
     2576                </td> 
     2577              </tr> 
    22932578            </xsl:if> 
    2294             <select name="allLocationId" id="bwAllLocationList"> 
    2295               <xsl:if test="form/location/preferred/select/option"> 
    2296                 <xsl:attribute name="class">invisible</xsl:attribute> 
    2297               </xsl:if> 
    2298               <option value=""> 
    2299                 Select: 
    2300               </option> 
    2301               <xsl:copy-of select="form/location/all/select/*"/> 
    2302             </select> 
    2303             <xsl:text> </xsl:text> 
    2304             <!-- allow for toggling between the preferred and all location listings if preferred 
    2305                  locations exist --> 
    2306             <xsl:if test="form/location/preferred/select/option"> 
    2307               <input type="radio" name="toggleLocationLists" value="preferred" checked="checked" onclick="changeClass('bwPreferredLocationList','shown');changeClass('bwAllLocationList','invisible');"/> 
    2308               preferred 
    2309               <input type="radio" name="toggleLocationLists" value="all" onclick="changeClass('bwPreferredLocationList','invisible');changeClass('bwAllLocationList','shown');"/> 
    2310               all 
    2311             </xsl:if> 
    2312           </td> 
    2313         </tr> 
    2314  
    2315         <xsl:if test="form/location/address"> 
    2316           <tr> 
    2317             <td class="fieldName" colspan="2"> 
    2318               <span class="std-text"> 
    2319                 <span class="bold">or</span> add</span> 
    2320             </td> 
    2321           </tr> 
    2322           <tr> 
    2323             <td class="fieldName"> 
    2324               Address: 
    2325             </td> 
    2326             <td> 
    2327               <xsl:variable name="addressFieldName" select="form/location/address/input/@name"/> 
    2328               <xsl:variable name="calLocations"> 
    2329                 <xsl:for-each select="form/location/all/select/option">"<xsl:value-of select="."/>"<xsl:if test="position()!=last()">,</xsl:if> 
    2330                 </xsl:for-each> 
    2331               </xsl:variable> 
    2332               <input type="text" size="30" name="{$addressFieldName}" autocomplete="off" onfocus="autoComplete(this,event,new Array({$calLocations}));"/> 
    2333               <div class="fieldInfo"> 
    2334                 Please include room, building, and campus (if not Seattle). 
    2335               </div> 
    2336             </td> 
    2337           </tr> 
    2338           <tr> 
    2339             <td class="optional"> 
    2340               <span class="std-text">Location URL:</span> 
    2341             </td> 
    2342             <td> 
    2343               <xsl:copy-of select="form/location/link/*"/> 
    2344               <xsl:text> </xsl:text> 
    2345               <span class="fieldInfo">(optional: for information about the location)</span> 
    2346             </td> 
    2347           </tr> 
    2348         </xsl:if> 
    2349  
    2350         <!-- Contact --> 
    2351         <tr> 
    2352           <td class="fieldName"> 
    2353             Contact: 
    2354           </td> 
    2355           <td> 
    2356             <xsl:if test="form/contact/preferred/select/option"> 
    2357               <select name="prefContactId" id="bwPreferredContactList"> 
    2358                 <option value=""> 
    2359                   Select: 
    2360                 </option>option> 
    2361                 <xsl:copy-of select="form/contact/preferred/select/*"/> 
    2362               </select> 
    2363             </xsl:if> 
    2364             <select name="allContactId" id="bwAllContactList"> 
    2365               <xsl:if test="form/contact/preferred/select/option"> 
    2366                 <xsl:attribute name="class">invisible</xsl:attribute> 
    2367               </xsl:if> 
    2368               <option value=""> 
    2369                 Select: 
    2370               </option> 
    2371               <xsl:copy-of select="form/contact/all/select/*"/> 
    2372             </select> 
    2373             <xsl:text> </xsl:text> 
    2374             <!-- allow for toggling between the preferred and all contacts listings if preferred 
    2375                  contacts exist --> 
    2376             <xsl:if test="form/contact/preferred/select/option"> 
    2377               <input type="radio" name="toggleContactLists" value="preferred" checked="checked" onclick="changeClass('bwPreferredContactList','shown');changeClass('bwAllContactList','invisible');"/> 
    2378               preferred 
    2379               <input type="radio" name="toggleContactLists" value="all" onclick="changeClass('bwPreferredContactList','invisible');changeClass('bwAllContactList','shown');"/> 
    2380               all 
    2381             </xsl:if> 
    2382           </td> 
    2383         </tr> 
    2384  
    2385         <!-- Topical area  --> 
    2386         <!-- These are the subscriptions (aliases) where the events should show up. 
    2387              By selecting one or more of these, appropriate categories will be set on the event --> 
    2388         <tr> 
    2389           <td class="fieldName"> 
    2390             Topical area: 
    2391           </td> 
    2392           <td> 
    2393             <ul class="aliasTree"> 
    2394               <xsl:apply-templates select="form/subscriptions/calsuite/calendars/calendar" mode="showEventFormAliases"> 
    2395                 <xsl:with-param name="root">true</xsl:with-param> 
    2396               </xsl:apply-templates> 
    2397             </ul> 
    2398           </td> 
    2399         </tr> 
    2400  
    2401         <!--  Category  --> 
    2402         <!-- 
    2403           direct setting of categories is deprecated; if you want to reenable, uncomment this block - but 
    2404           be forwarned that this will have peculiar consequences if using the submissions client 
    2405           --> 
    2406         <!-- 
    2407         <tr> 
    2408           <td class="fieldName"> 
    2409             Categories: 
    2410           </td> 
    2411           <td> 
    2412             <a href="javascript:toggleVisibility('bwEventCategories','visible')"> 
    2413               show/hide categories 
    2414             </a> 
    2415             <div id="bwEventCategories" class="invisible"> 
    2416               <xsl:if test="form/categories/preferred/category and /bedework/creating='true'"> 
    2417                 <input type="radio" name="categoryCheckboxes" value="preferred" checked="checked" onclick="changeClass('preferredCategoryCheckboxes','shown');changeClass('allCategoryCheckboxes','invisible');"/>preferred 
    2418                 <input type="radio" name="categoryCheckboxes" value="all" onclick="changeClass('preferredCategoryCheckboxes','invisible');changeClass('allCategoryCheckboxes','shown')"/>all<br/> 
    2419                 <table cellpadding="0" id="preferredCategoryCheckboxes"> 
    2420                   <tr> 
    2421                     <xsl:variable name="catCount" select="count(form/categories/preferred/category)"/> 
    2422                     <td> 
    2423                       <xsl:for-each select="form/categories/preferred/category[position() &lt;= ceiling($catCount div 2)]"> 
    2424                         <xsl:sort select="keyword" order="ascending"/> 
    2425                         <input type="checkbox" name="catUid"> 
    2426                           <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute> 
    2427                           <xsl:attribute name="id">pref-<xsl:value-of select="uid"/></xsl:attribute> 
    2428                           <xsl:attribute name="onchange">setCatChBx('pref-<xsl:value-of select="uid"/>','all-<xsl:value-of select="uid"/>')</xsl:attribute> 
    2429                           <xsl:if test="uid = ../../current//category/uid"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    2430                           <xsl:if test="uid = /bedework/currentCalSuite/defaultCategories//category/uid"> 
    2431                             <xsl:attribute name="disabled">disabled</xsl:attribute> 
    2432                           </xsl:if> 
    2433                           <xsl:value-of select="keyword"/> 
    2434                         </input><br/> 
    2435                       </xsl:for-each> 
    2436                     </td> 
    2437                     <td> 
    2438                       <xsl:for-each select="form/categories/preferred/category[position() &gt; ceiling($catCount div 2)]"> 
    2439                         <xsl:sort select="keyword" order="ascending"/> 
    2440                         <input type="checkbox" name="catUid"> 
    2441                           <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute> 
    2442                           <xsl:attribute name="id">pref-<xsl:value-of select="uid"/></xsl:attribute> 
    2443                           <xsl:attribute name="onchange">setCatChBx('pref-<xsl:value-of select="uid"/>','all-<xsl:value-of select="uid"/>')</xsl:attribute> 
    2444                           <xsl:if test="uid = ../../current//category/uid"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    2445                           <xsl:if test="uid = /bedework/currentCalSuite/defaultCategories//category/uid"> 
    2446                             <xsl:attribute name="disabled">disabled</xsl:attribute> 
    2447                           </xsl:if> 
    2448                           <xsl:value-of select="keyword"/> 
    2449                         </input><br/> 
    2450                       </xsl:for-each> 
    2451                     </td> 
    2452                   </tr> 
    2453                 </table> 
    2454               </xsl:if> 
    2455               <table cellpadding="0" id="allCategoryCheckboxes"> 
    2456                 <xsl:if test="form/categories/preferred/category and /bedework/creating='true'"> 
    2457                   <xsl:attribute name="class">invisible</xsl:attribute> 
    2458                 </xsl:if> 
    2459                 <tr> 
    2460                   <xsl:variable name="catCount" select="count(form/categories/all/category)"/> 
    2461                   <td> 
    2462                     <xsl:for-each select="form/categories/all/category[position() &lt;= ceiling($catCount div 2)]"> 
    2463                       <input type="checkbox" name="catUid"> 
    2464                         <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute> 
    2465                         <xsl:if test="/bedework/creating='true'"> 
    2466                           <xsl:attribute name="id">all-<xsl:value-of select="uid"/></xsl:attribute> 
    2467                           <xsl:attribute name="onchange">setCatChBx('all-<xsl:value-of select="uid"/>','pref-<xsl:value-of select="uid"/>')</xsl:attribute> 
    2468                         </xsl:if> 
    2469                         <xsl:if test="uid = ../../current//category/uid"> 
    2470                           <xsl:attribute name="checked">checked</xsl:attribute> 
    2471                           <xsl:if test="uid = /bedework/currentCalSuite/defaultCategories//category/uid"> 
    2472                             <xsl:attribute name="disabled">disabled</xsl:attribute> 
    2473                           </xsl:if> 
    2474                         </xsl:if> 
    2475                         <xsl:value-of select="keyword"/> 
    2476                       </input><br/> 
    2477                     </xsl:for-each> 
    2478                   </td> 
    2479                   <td> 
    2480                     <xsl:for-each select="form/categories/all/category[position() &gt; ceiling($catCount div 2)]"> 
    2481                       <input type="checkbox" name="catUid"> 
    2482                         <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute> 
    2483                         <xsl:if test="/bedework/creating='true'"> 
    2484                           <xsl:attribute name="id">all-<xsl:value-of select="uid"/></xsl:attribute> 
    2485                           <xsl:attribute name="onchange">setCatChBx('all-<xsl:value-of select="uid"/>','pref-<xsl:value-of select="uid"/>')</xsl:attribute> 
    2486                         </xsl:if> 
    2487                         <xsl:if test="uid = ../../current//category/uid"> 
    2488                           <xsl:attribute name="checked">checked</xsl:attribute> 
    2489                           <xsl:if test="uid = /bedework/currentCalSuite/defaultCategories//category/uid"> 
    2490                             <xsl:attribute name="disabled">disabled</xsl:attribute> 
    2491                           </xsl:if> 
    2492                         </xsl:if> 
    2493                         <xsl:value-of select="keyword"/> 
    2494                       </input><br/> 
    2495                     </xsl:for-each> 
    2496                   </td> 
    2497                 </tr> 
    2498               </table> 
    2499             </div> 
    2500           </td> 
    2501         </tr> 
    2502         --> 
    2503         <!-- note --> 
    2504         <!-- let's shut this off for now - needs rewriting if we keep it at all 
    2505         <tr> 
    2506           <td colspan="2" style="padding-top: 1em;"> 
    2507             <span class="fieldInfo"> 
    2508               <strong>If "preferred values" are enabled</strong> 
    2509               by your administrator, the calendar, category, location, and contact lists will 
    2510               contain only those value you've used previously.  If you don't find the value 
    2511               you need in one of these lists, use the "all" list adjacent to each 
    2512               of these fields.  The event you select from the "all" list will be added 
    2513               to your preferred list from that point on.  <strong>Note: if you don't 
    2514               find a location or contact at all, you can add a new one from the 
    2515               <a href="{$setup}">main menu</a>.</strong> 
    2516               Only administrators can create calendars, however. 
    2517               To make sure you've used the 
    2518               correct calendar, please see the 
    2519               <a href="" target="_blank">Calendar Definitions</a> 
    2520             </span> 
    2521           </td> 
    2522         </tr> --> 
    2523  
    2524         <xsl:if test="form/contact/name"> 
    2525           <tr> 
    2526             <td class="fieldName" colspan="2"> 
    2527               <span class="std-text"> 
    2528                 <span class="bold">or</span> add</span> 
    2529             </td> 
    2530           </tr> 
    2531           <tr> 
    2532             <td class="fieldName"> 
    2533               Contact (name): 
    2534             </td> 
    2535             <td> 
    2536               <xsl:copy-of select="form/contact/name/*"/> 
    2537             </td> 
    2538           </tr> 
    2539           <tr> 
    2540             <td class="fieldName"> 
    2541               Contact Phone Number: 
    2542             </td> 
    2543             <td> 
    2544               <xsl:copy-of select="form/contact/phone/*"/> 
    2545               <xsl:text> </xsl:text> 
    2546               <span class="fieldInfo">(optional)</span> 
    2547             </td> 
    2548           </tr> 
    2549           <tr> 
    2550             <td class="optional"> 
    2551               Contact's URL: 
    2552             </td> 
    2553             <td> 
    2554               <xsl:copy-of select="form/contact/link/*"/> 
    2555               <xsl:text> </xsl:text> 
    2556               <span class="fieldInfo">(optional)</span> 
    2557             </td> 
    2558           </tr> 
    2559           <tr> 
    2560             <td class="optional"> 
    2561               Contact Email Address: 
    2562             </td> 
    2563             <td> 
    2564               <xsl:copy-of select="form/contact/email/*"/> 
    2565               <xsl:text> </xsl:text> 
    2566               <span class="fieldInfo">(optional)</span> test 
    2567               <div id="contactEmailAlert">&#160;</div> <!-- space for email warning --> 
    2568             </td> 
    2569           </tr> 
    2570         </xsl:if> 
    2571       </table> 
    2572       <xsl:if test="not(starts-with(form/calendar/path,$submissionsRootUnencoded))"> 
    2573         <!-- don't create two instances of the submit buttons on pending events; 
    2574              the publishing buttons require numerous unique ids --> 
    2575         <xsl:call-template name="submitEventButtons"> 
    2576           <xsl:with-param name="eventTitle" select="$eventTitle"/> 
    2577           <xsl:with-param name="eventUrlPrefix" select="$eventUrlPrefix"/> 
    2578         </xsl:call-template> 
    2579       </xsl:if> 
    2580     </form> 
     2579          </table> 
     2580          <xsl:if test="not(starts-with(form/calendar/path,$submissionsRootUnencoded))"> 
     2581            <!-- don't create two instances of the submit buttons on pending events; 
     2582                 the publishing buttons require numerous unique ids --> 
     2583            <xsl:call-template name="submitEventButtons"> 
     2584              <xsl:with-param name="eventTitle" select="$eventTitle"/> 
     2585              <xsl:with-param name="eventUrlPrefix" select="$eventUrlPrefix"/> 
     2586            </xsl:call-template> 
     2587          </xsl:if> 
     2588        </form> 
     2589      </xsl:when> 
     2590      <xsl:otherwise> 
     2591        <!-- The admin group editing the event did not create it.  Allow tagging only. --> 
     2592        <p>Test: will allow tagging here</p> 
     2593      </xsl:otherwise> 
     2594    </xsl:choose> 
    25812595  </xsl:template> 
    25822596 
     
    29672981      <tr> 
    29682982        <th> 
    2969           Calendar
     2983          Topical Areas
    29702984        </th> 
    29712985        <td> 
    2972           <xsl:value-of select="calendar/path"/> 
     2986           <xsl:for-each select="xproperties/X-BEDEWORK-ALIAS"> 
     2987             <xsl:call-template name="substring-afterLastInstanceOf"> 
     2988               <xsl:with-param name="string" select="values/text"/> 
     2989               <xsl:with-param name="char">/</xsl:with-param> 
     2990             </xsl:call-template><br/> 
     2991           </xsl:for-each> 
    29732992        </td> 
    29742993      </tr> 
     
    30533072      </xsl:if> 
    30543073 
     3074      <tr> 
     3075        <th> 
     3076          Calendar: 
     3077        </th> 
     3078        <td> 
     3079          <xsl:value-of select="calendar/path"/> 
     3080        </td> 
     3081      </tr> 
     3082 
    30553083      <!--  Categories  --> 
    30563084      <tr> 
     
    30683096 
    30693097    <p> 
    3070       <xsl:if test="/bedework/canEdit = 'true' or /bedework/userInfo/superUser = 'true'"> 
    3071         <input type="button" name="return" value="Edit event" onclick="javascript:location.replace('{$event-fetchForUpdate}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}')"/> 
    3072       </xsl:if> 
     3098      <xsl:variable name="userPath"><xsl:value-of select="/bedework/syspars/userPrincipalRoot"/>/<xsl:value-of select="/bedework/userInfo/user"/></xsl:variable> 
     3099      <input type="button" name="return" onclick="javascript:location.replace('{$event-fetchForUpdate}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}')"> 
     3100        <xsl:choose> 
     3101          <xsl:when test="$userPath = creator or /bedework/userInfo/superUser = 'true'"> 
     3102            <xsl:attribute name="value">Edit event</xsl:attribute> 
     3103          </xsl:when> 
     3104          <xsl:otherwise> 
     3105            <xsl:attribute name="value">Tag event with topical areas</xsl:attribute> 
     3106          </xsl:otherwise> 
     3107        </xsl:choose> 
     3108      </input> 
    30733109 
    30743110      <input type="button" name="return" value="Back" onclick="javascript:history.back()"/> 
     
    64786514            date &amp; time 
    64796515          </td> 
    6480           <td> 
    6481             calendar 
    6482           </td> 
     6516          <!-- <td> 
     6517            topical areas 
     6518          </td>--> 
    64836519          <td> 
    64846520            location 
     
    65006536            <a href="{$event-fetchForDisplay}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    65016537              <xsl:value-of select="event/summary"/> 
     6538              <xsl:if test="event/summary = ''"><em>no title</em></xsl:if> 
    65026539            </a> 
    65036540          </td> 
     
    65176554            </xsl:choose> 
    65186555          </td> 
    6519           <td> 
    6520             <xsl:value-of select="event/calendar/name"/> 
    6521           </td> 
     6556          <!-- 
     6557          <td> 
     6558            <xsl:for-each select="xproperties/X-BEDEWORK-ALIAS"> 
     6559              <xsl:call-template name="substring-afterLastInstanceOf"> 
     6560                <xsl:with-param name="string" select="values/text"/> 
     6561                <xsl:with-param name="char">/</xsl:with-param> 
     6562              </xsl:call-template><br/> 
     6563            </xsl:for-each> 
     6564          </td>--> 
    65226565          <td> 
    65236566            <xsl:value-of select="event/location/address"/> 
  • trunk/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js

    r2173 r2174  
    337337  } // else we are editing an instance of a recurrence 
    338338  setBedeworkXProperties(formObj,submitter); 
    339  
    340   //setAccessHow(formObj,1); 
    341   //setAccessAcl(formObj); 
    342339} 
    343340