Changeset 1209

Show
Ignore:
Timestamp:
01/09/07 22:31:30
Author:
johnsa
Message:

forgot to commit these earlier.
user client:

- sweeping changes to event form
- inclusion of dojo widgets
- output is now valid xhtml
- clean up of some javascript

a bit more work to be done here

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/default.xsl

    r1185 r1209  
    12471247              <input type="hidden" name="calPath" value=""/> 
    12481248              <!-- fill these on submit --> 
    1249               <input type="hidden" name="eventStartDate" value=""/> 
    1250               <input type="hidden" name="eventEndDate" value=""/> 
     1249              <input type="hidden" name="eventStartDate.year" value=""/> 
     1250              <input type="hidden" name="eventStartDate.month" value=""/> 
     1251              <input type="hidden" name="eventStartDate.day" value=""/> 
     1252              <input type="hidden" name="eventEndDate.year" value=""/> 
     1253              <input type="hidden" name="eventEndDate.month" value=""/> 
     1254              <input type="hidden" name="eventEndDate.day" value=""/> 
    12511255              <!-- static fields --> 
    12521256              <input type="hidden" name="nocache" value="no"/> 
  • trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/resources/javascript/bedework.js

    r1169 r1209  
    1717} 
    1818function fillExportFields(formId) { 
    19    var formObj = document.getElementById(formId); 
    20    formObj.eventStartDate.value = dojo.widget.byId('bwExportCalendarWidgetStartDate').getValue(); 
    21    formObj.eventEndDate.value = dojo.widget.byId('bwExportCalendarWidgetEndDate').getValue(); 
     19  var formObj = document.getElementById(formId); 
     20  var startDate = new Date(); 
     21  startDate = dojo.widget.byId("bwExportCalendarWidgetStartDate").getDate(); 
     22  formObj["eventStartDate.year"].value = startDate.getFullYear(); 
     23  formObj["eventStartDate.month"].value = startDate.getMonth() + 1; 
     24  formObj["eventStartDate.day"].value = startDate.getDate(); 
     25 
     26  var endDate = new Date(); 
     27  endDate = dojo.widget.byId("bwExportCalendarWidgetEndDate").getDate(); 
     28  formObj["eventEndDate.year"].value = endDate.getFullYear(); 
     29  formObj["eventEndDate.month"].value = endDate.getMonth() + 1; 
     30  formObj["eventEndDate.day"].value = endDate.getDate(); 
    2231} 
    2332function hideWidget(id) { 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.css

    r1204 r1209  
    4141h2 .formButtons { 
    4242  float: right; 
     43  font-size: 0.8em; 
     44} 
     45div.eventSubmitButtons { 
     46  text-align: right; 
     47  margin: 1em 0.5em; 
     48} 
     49.eventSubmitButtons input, 
     50.formButtons input { 
     51  margin: 0; 
     52  font-size: 0.8em; 
    4353} 
    4454h3 { 
     
    7282} 
    7383#logoTable img { 
    74   display: inline; 
    7584  padding: 0 0 2px 5px; 
     85  margin: 0; 
    7686} 
    7787#logoTable #schoolLinksCell { 
     
    110120  font-weight : bold; 
    111121  text-align : center; 
    112   vertical-align: middle; 
    113122  white-space: nowrap; 
    114123} 
     
    118127  padding-left: 0.5em; 
    119128  padding-right: 0.5em; 
     129  vertical-align: middle; 
    120130} 
    121131#curDateRangeTable td.sideBarOpenCloseIcon { 
     
    136146  text-align : right; 
    137147  white-space: nowrap; 
     148  vertical-align: middle; 
    138149} 
    139150#curDateRangeTable td.rssPrint img { 
     
    302313#utilBarTable img { 
    303314  vertical-align: middle; 
     315  margin: 0; 
     316  padding: 0; 
    304317} 
    305318#searchTable { 
     
    344357} 
    345358#tabsTable { 
    346   margin: 0em; 
     359  margin: 0; 
     360  padding: 0; 
    347361  text-align: center; 
    348362  vertical-align: bottom; 
     
    352366} 
    353367#tabsTable td { 
    354   padding-top: 4px; 
    355   white-space: nowrap; 
     368  padding: 4px 0 0 0; 
     369  white-space: nowrap; 
     370
     371#tabsTable img { 
     372  display: inline; 
    356373} 
    357374#tabsTable a { 
     
    359376  color: #ccc; 
    360377} 
    361 #tabsTable .rightCell { 
     378#tabsTable td.rightCell { 
    362379  width: 100%; 
    363380  background : url(../../resources/std-tab-space.gif); 
     
    409426#navigationBarTable td.leftCell .prevImg { 
    410427  margin: 0; 
     428  padding: 0; 
    411429  vertical-align: middle; 
    412430} 
    413431#navigationBarTable td.leftCell .nextImg { 
    414   margin-left: 0.2em; 
    415   margin-right: 0.5em
     432  margin: 0 0.5em 0 0.2em; 
     433  padding: 0
    416434  vertical-align: middle; 
    417435} 
     
    458476  margin: 0 0 1em 0; 
    459477  padding: 0; 
    460   font-size: 0.9em; 
     478  font-size: 0.8em; 
    461479  color: black; 
    462480  background-color: #eee; 
     
    475493  color: black; 
    476494  background-color: white; 
    477   font-weight: bold; 
    478495  border-bottom: 1px solid white; 
    479496} 
     
    499516  padding: 0; 
    500517} 
     518#eventAccessLink { 
     519  float: right; 
     520  font-size: 0.8em; 
     521  margin: 0 1em; 
     522} 
    501523/* table below is used for almost all forms  */ 
    502524table.common { 
     
    505527  margin: 0px; 
    506528  padding: 0px; 
     529} 
     530table.dottedBorder { 
     531  border: 1px dotted #ccc; 
    507532} 
    508533table.common th { 
     
    579604  white-space: nowrap; 
    580605} 
     606table.dottedBorder td.fieldname { 
     607  text-align: right; 
     608} 
    581609table.common td.submit { 
    582610  padding: 0.5em 0.5em 0.2em 0.5em; 
    583611  color: black; 
    584   background: #f5f5f5
     612  background: white
    585613  text-align: right; 
    586614  border-top: 1px solid #ccc; 
     
    592620  text-align: center; 
    593621} 
    594 table.common td.tzTime { 
    595   /*font-style: italic;*/ 
    596 } 
    597622table.common #eventActions { 
    598623  float: right; 
     
    619644  padding: 0.5em; 
    620645} 
    621 table.common .dateFields { 
     646table.common .padMeTop { 
     647  padding-top: 1em !important; 
     648
     649table.common .padMe { 
     650  padding: 1em !important; 
     651
     652.dateFields { 
    622653  display: inline; 
    623654} 
    624 table.common .timeFields { 
     655.timeFields { 
    625656  display: inline; 
    626657  margin-left: 1em; 
    627658} 
    628 table.common .dateStartEndBox { 
     659.dateStartEndBox { 
    629660  border: 1px solid #ccb; 
    630661  margin: 4px; 
     
    632663  white-space: nowrap; 
    633664} 
    634 table.common .dateStartEndBox strong { 
     665.dateStartEndBox strong { 
    635666  display: block; 
    636667} 
    637 table.common .startDateLabel { 
     668.startDateLabel { 
    638669  margin-left: 26px; 
    639670} 
    640 table.common select.timezones { 
     671select.timezones { 
    641672  margin-left: 1em; 
    642673  width: 160px; 
    643674} 
    644 table.common div.durationBox { 
     675div.durationBox { 
    645676  border: 1px solid #ccb; 
    646677  display: inline; 
     
    648679  padding: 4px; 
    649680} 
    650 table.common .durationSpacerText { 
     681.durationSpacerText { 
    651682  font-weight: bold; 
    652683  margin: 0 1em; 
    653684} 
    654 table.common .padMeTop { 
    655   padding-top: 1em !important; 
    656 } 
    657 table.common .padMe { 
    658   padding: 1em !important; 
    659 } 
    660685table.scheduling td { 
    661686  white-space: nowrap; 
     
    663688table#manage td { 
    664689  padding: 0.2em 0 0 0.5em; 
     690} 
     691#bwEventTab-Recurrence { 
     692  margin: 0 1em; 
     693  font-size: 0.9em; 
    665694} 
    666695#bwEventCalDisplay { 
     
    670699#clock { 
    671700  position: absolute; 
    672   top: 460px; 
    673   left: 320px; 
     701  top: 160px; 
     702  margin: auto; 
     703
     704#startTimeFields img, 
     705#endTimeFields img { 
     706  vertical-align: middle; 
    674707} 
    675708#tztable { 
     
    684717  margin-bottom: 0.5em; 
    685718} 
     719#recurrenceUiSwitch { 
     720  margin: 0.2em 0 2em 0; 
     721  font-size: 0.8em; 
     722} 
     723#recurrenceFields { 
     724  margin: 0; 
     725  border: 1px solid #ddd; 
     726} 
    686727#recurrenceFields #recurrenceTable strong { 
    687728  display: inline; 
    688729} 
    689730#recurrenceFields #recurrenceTable td.recurrenceFrequency { 
    690   padding: 0.5em 1em 0 0
     731  padding: 0.5em 1em
    691732} 
    692733#recurrenceFields #recurrenceTable td.recurrenceRules { 
    693   padding: 0.5em 0 0.5em 1em; 
     734  padding: 0.5em 1em 0.5em 1em; 
    694735  border-left: 1px solid #ddd; 
    695736} 
     
    701742#recurrenceFields #recurrenceTable td.recurrenceRules #advancedRecurrenceRules { 
    702743  display: block; 
    703   border-bottom: 1px solid #ddd; 
    704 
    705 #recurrenceFields #recurrenceTable td.recurrenceRules .rruleBlock { 
    706   margin: 0 0 0.5em 2em; 
     744  border-top: 1px solid #ddd; 
     745  padding: 1em 0; 
    707746} 
    708747.chkBoxListItem { 
     
    738777  display: block; 
    739778  clear: both; 
     779  white-space: nowrap !important; 
    740780} 
    741781#recurrenceDatesButton { 
    742   margin-top: 0.5em
     782  margin: 0 0 1em 0
    743783} 
    744784.shown { 
     
    859899  color: black; 
    860900  background: #eee; 
    861 } 
    862 /* default title of movable dialog boxes */ 
    863 #dialogTitle { 
    864   cursor: move; 
    865901} 
    866902#weekCalendarTable { 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r1204 r1209  
    22<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    33<xsl:output 
    4   method="html" 
     4  method="xhtml" 
     5  indent="no" 
     6  media-type="text/html" 
     7  doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" 
     8  doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" 
     9  standalone="yes" 
     10  omit-xml-declaration="yes"/> 
     11<!--<xsl:output 
     12  method="xhtml" 
    513  indent="yes" 
    614  media-type="text/html" 
     
    816  doctype-system="http://www.w3.org/TR/html4/loose.dtd" 
    917  standalone="yes" 
    10 /> 
     18/>--> 
    1119  <!-- ========================================= --> 
    1220  <!--       PERSONAL CALENDAR STYLESHEET        --> 
     
    7684  <xsl:variable name="addEvent" select="/bedework/urlPrefixes/event/addEvent"/> 
    7785  <xsl:variable name="event-addEventRefComplete" select="/bedework/urlPrefixes/event/addEventRefComplete/a/@href"/> 
     86  <xsl:variable name="event-initAccess" select="/bedework/urlPrefixes/event/initAccess/a/@href"/> 
    7887  <xsl:variable name="event-setAccess" select="/bedework/urlPrefixes/event/setAccess/a/@href"/> 
    7988  <xsl:variable name="event-selectCalForEvent" select="/bedework/urlPrefixes/event/selectCalForEvent/a/@href"/> 
     
    322331    <title>Bedework: Personal Calendar Client</title> 
    323332    <meta name="robots" content="noindex,nofollow"/> 
     333    <meta content="text/html;charset=utf-8" http-equiv="Content-Type" /> 
    324334    <link rel="stylesheet" href="{$resourcesRoot}/default/default/default.css"/> 
    325335    <link rel="stylesheet" href="{$resourcesRoot}/default/default/subColors.css"/> 
    326336    <link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/default/default/print.css" /> 
    327337    <link rel="icon" type="image/ico" href="{$resourcesRoot}/resources/bedework.ico" /> 
     338    <!-- note: the non-breaking spaces in the script bodies below are to avoid 
     339         losing the script closing tags (which avoids browser problems) --> 
    328340    <xsl:if test="/bedework/page='addEvent' or 
    329341                  /bedework/page='addEventRef' or 
     
    336348                  /bedework/page='attendeeRespond' or 
    337349                  /bedework/page='modSchedulingPrefs'"> 
    338       <script type="text/javascript" src="{$resourcesRoot}/resources/includes.js"></script> 
     350      <script type="text/javascript" src="{$resourcesRoot}/resources/bedework.js">&#160;</script> 
     351    </xsl:if> 
     352    <xsl:if test="/bedework/page='modSchedulingPrefs'"> 
     353      <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkPrefs.js">&#160;</script> 
    339354    </xsl:if> 
    340355    <xsl:if test="/bedework/page='addEvent' or 
    341356                  /bedework/page='editEvent' or 
    342357                  /bedework/page='calendarListForExport'"> 
    343       <script type="text/javascript" src="{$resourcesRoot}/resources/bwClock.js"></script> 
     358      <script type="text/javascript" src="{$resourcesRoot}/resources/bwClock.js">&#160;</script> 
    344359      <link rel="stylesheet" href="{$resourcesRoot}/resources/bwClock.css"/> 
    345       <script type="text/javascript" src="{$resourcesRoot}/resources/dynCalendarWidget.js"></script> 
    346       <link rel="stylesheet" href="{$resourcesRoot}/resources/dynCalendarWidget.css"/> 
    347       <script type="text/javascript" src="{$resourcesRoot}/resources/browserSniffer.js"></script> 
    348       <script type="text/javascript" src="/bedework-common/javascript/dojo/dojo.js"/> 
     360      <script type="text/javascript" src="/bedework-common/javascript/dojo/dojo.js">&#160;</script> 
     361      <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkEventForm.js">&#160;</script> 
    349362    </xsl:if> 
    350363    <script type="text/javascript"> 
     
    508521          </xsl:choose> 
    509522        </xsl:variable> 
    510         <table border="0" cellpadding="0" cellspacing="0" id="tabsTable"> 
     523        <table cellspacing="0" id="tabsTable"> 
    511524          <tr> 
    512525            <td> 
     
    562575      </xsl:when> 
    563576      <xsl:otherwise> 
    564         <table border="0" cellpadding="0" cellspacing="0" id="tabsTable"> 
     577        <table cellspacing="0" id="tabsTable"> 
    565578          <tr> 
    566579            <td> 
     
    10601073                <xsl:value-of select="value"/> 
    10611074              </a> 
    1062               <ul> 
    1063                 <xsl:apply-templates select="event" mode="calendarLayout"> 
    1064                   <xsl:with-param name="dayPos" select="$dayPos"/> 
    1065                 </xsl:apply-templates> 
    1066               </ul> 
     1075              <xsl:if test="event"> 
     1076                <ul> 
     1077                  <xsl:apply-templates select="event" mode="calendarLayout"> 
     1078                    <xsl:with-param name="dayPos" select="$dayPos"/> 
     1079                  </xsl:apply-templates> 
     1080                </ul> 
     1081              </xsl:if> 
    10671082            </td> 
    10681083          </xsl:if> 
     
    11001115                    <xsl:value-of select="value"/> 
    11011116                  </a> 
    1102                   <ul> 
    1103                     <xsl:apply-templates select="event" mode="calendarLayout"> 
    1104                       <xsl:with-param name="dayPos" select="$dayPos"/> 
    1105                     </xsl:apply-templates> 
    1106                   </ul> 
     1117                  <xsl:if test="event"> 
     1118                    <ul> 
     1119                      <xsl:apply-templates select="event" mode="calendarLayout"> 
     1120                        <xsl:with-param name="dayPos" select="$dayPos"/> 
     1121                      </xsl:apply-templates> 
     1122                    </ul> 
     1123                  </xsl:if> 
    11071124                </td> 
    11081125              </xsl:otherwise> 
     
    17331750  <xsl:template match="formElements" mode="addEvent"> 
    17341751  <!-- The name "eventForm" is referenced by several javascript functions. Do not 
    1735     change it without modifying includes.js --> 
    1736     <form name="eventForm" method="post" action="{$addEvent}" id="standardForm" onsubmit="setRecurrence(this)"> 
     1752    change it without modifying bedework.js --> 
     1753    <form name="eventForm" method="post" action="{$addEvent}" id="standardForm" onsubmit="setEventFields(this)"> 
    17371754      <h2> 
    17381755        <span class="formButtons"> 
    1739           <input name="submit" type="submit" value="save event"/>&#160; 
     1756          <input name="submit" type="submit" value="save event"/> 
    17401757          <input name="cancelled" type="submit" value="cancel"/> 
    17411758        </span> 
     
    17441761      <xsl:apply-templates select="." mode="eventForm"/> 
    17451762    </form> 
    1746  
    1747     <!-- Access tab (must exist outside of event form --> 
    1748     <!-- =============================================== --> 
    1749     <div id="bwEventTab-Access" class="invisible"> 
    1750       <div id="sharingBox"> 
    1751         <h3>Current Access:</h3> 
    1752         Sharing may be added once an event is created 
    1753       </div> 
    1754     </div> 
    17551763  </xsl:template> 
    17561764 
     
    17631771    <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    17641772    <!-- The name "eventForm" is referenced by several javascript functions. Do not 
    1765     change it without modifying includes.js --> 
    1766     <form name="eventForm" method="post" action="{$updateEvent}" id="standardForm" onsubmit="setRecurrence(this)"> 
     1773    change it without modifying bedework.js --> 
     1774    <form name="eventForm" method="post" action="{$updateEvent}" id="standardForm" onsubmit="setEventFields(this)"> 
    17671775      <h2> 
    17681776        <span class="formButtons"> 
    1769           <input name="submit" type="submit" value="save event"/>&#160; 
     1777          <input name="submit" type="submit" value="save event"/> 
    17701778          <input name="cancelled" type="submit" value="cancel"/> 
    1771           <input type="button" value="go to view" onclick="location.replace('{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}')"/> 
    17721779        </span> 
    17731780        Edit Event 
     
    17751782      <xsl:apply-templates select="." mode="eventForm"/> 
    17761783    </form> 
    1777  
    1778     <!-- Access tab (must exist outside of event form) --> 
    1779     <!-- ============================================= --> 
    1780     <div id="bwEventTab-Access" class="invisible"> 
    1781       <div id="sharingBox"> 
    1782         <xsl:apply-templates select="/bedework/access/acl" mode="currentAccess"> 
    1783           <xsl:with-param name="action" select="$event-setAccess"/> 
    1784           <xsl:with-param name="calPathEncoded" select="$calPathEncoded"/> 
    1785           <xsl:with-param name="guid" select="$guid"/> 
    1786           <xsl:with-param name="recurrenceId" select="$recurrenceId"/> 
    1787         </xsl:apply-templates> 
    1788         <form name="eventShareForm" action="{$event-setAccess}" id="shareForm"> 
    1789           <input type="hidden" name="calPath" value="{$calPath}"/> 
    1790           <input type="hidden" name="guid" value="{$guid}"/> 
    1791           <input type="hidden" name="recurid" value="{$recurrenceId}"/> 
    1792           <xsl:call-template name="entityAccessForm"/> 
    1793         </form> 
    1794       </div> 
    1795     </div> 
    1796   </xsl:template> 
     1784  </xsl:template> 
     1785 
    17971786 
    17981787  <!--==== ADD and EDIT EVENT FORM ====--> 
     
    18041793    <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    18051794    <input type="hidden" name="endType" value="date"/> 
    1806     <table class="common" cellspacing="0"> 
     1795 
    18071796      <!-- event info for edit event --> 
    18081797      <xsl:if test="/bedework/creating != 'true'"> 
    1809         <tr> 
    1810           <th colspan="2" class="commonHeader"> 
    1811             <div id="eventActions"> 
    1812               <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    1813                 <img src="{$resourcesRoot}/resources/glassFill-icon-viewGray.gif" width="13" height="13" border="0" alt="view"/> 
    1814                 View 
    1815               </a> 
    1816                 | 
    1817                 <xsl:choose> 
    1818                   <xsl:when test="recurring='true'"> 
    1819                     <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    1820                     Delete: 
    1821                     <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="delete master (recurring event)">all</a>,<a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete instance (recurring event)">instance</a> 
    1822                   </xsl:when> 
    1823                   <xsl:otherwise> 
    1824                     <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete event"> 
     1798        <table class="common" cellspacing="0"> 
     1799          <tr> 
     1800            <th colspan="2" class="commonHeader"> 
     1801              <div id="eventActions"> 
     1802                <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     1803                  <img src="{$resourcesRoot}/resources/glassFill-icon-viewGray.gif" width="13" height="13" border="0" alt="view"/> 
     1804                  View 
     1805                </a> 
     1806                  | 
     1807                  <xsl:choose> 
     1808                    <xsl:when test="recurring='true'"> 
    18251809                      <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    1826                       Delete 
    1827                     </a> 
    1828                   </xsl:otherwise> 
    1829                 </xsl:choose> 
    1830             </div> 
    1831             Personal Event 
    1832           </th> 
    1833         </tr> 
     1810                      Delete: 
     1811                      <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="delete master (recurring event)">all</a>,<a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete instance (recurring event)">instance</a> 
     1812                    </xsl:when> 
     1813                    <xsl:otherwise> 
     1814                      <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete event"> 
     1815                        <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
     1816                        Delete 
     1817                      </a> 
     1818                    </xsl:otherwise> 
     1819                  </xsl:choose> 
     1820              </div> 
     1821              Personal Event 
     1822            </th> 
     1823          </tr> 
     1824        </table> 
    18341825      </xsl:if> 
    18351826 
    18361827      <!-- event form submenu --> 
    1837       <tr> 
    1838         <td colspan="2"> 
    1839           <ul id="eventFormTabs" class="submenu"> 
    1840             <li class="selected"> 
    1841               <a href="javascript:setTab('eventFormTabs',0); show('bwEventTab-Basic'); hide('bwEventTab-Details','bwEventTab-Recurrence','bwEventTab-Access');"> 
    1842                 basic 
    1843               </a> 
    1844             </li> 
    1845             <li> 
    1846               <a href="javascript:setTab('eventFormTabs',1); show('bwEventTab-Details'); hide('bwEventTab-Basic','bwEventTab-Recurrence','bwEventTab-Access');"> 
    1847                 details 
    1848               </a> 
    1849             </li> 
    1850             <li> 
    1851               <a href="javascript:setTab('eventFormTabs',2); show('bwEventTab-Recurrence'); hide('bwEventTab-Details','bwEventTab-Basic','bwEventTab-Access');"> 
    1852                 recurrence 
    1853               </a> 
    1854             </li> 
    1855             <li> 
    1856               <a href="javascript:setTab('eventFormTabs',3); show('bwEventTab-Access'); hide('bwEventTab-Details','bwEventTab-Recurrence','bwEventTab-Basic');"> 
    1857                 access 
    1858               </a> 
    1859               <!-- note, the access tab is outside of the events form --> 
    1860             </li> 
    1861           </ul> 
    1862         </td> 
    1863       </tr> 
    1864     </table> 
     1828      <xsl:if test="/bedework/creating = 'false'"> 
     1829        <a href="{$event-initAccess}" id="eventAccessLink">set event access</a> 
     1830      </xsl:if> 
     1831      <ul id="eventFormTabs" class="submenu"> 
     1832        <li class="selected"> 
     1833          <a href="javascript:setTab('eventFormTabs',0); show('bwEventTab-Basic'); hide('bwEventTab-Details','bwEventTab-Recurrence');"> 
     1834            basic 
     1835          </a> 
     1836        </li> 
     1837        <li> 
     1838          <a href="javascript:setTab('eventFormTabs',1); show('bwEventTab-Details'); hide('bwEventTab-Basic','bwEventTab-Recurrence');"> 
     1839            details 
     1840          </a> 
     1841        </li> 
     1842        <li> 
     1843          <a href="javascript:setTab('eventFormTabs',2); show('bwEventTab-Recurrence'); hide('bwEventTab-Details','bwEventTab-Basic');"> 
     1844            recurrence 
     1845          </a> 
     1846        </li> 
     1847      </ul> 
    18651848 
    18661849    <!-- Basic tab --> 
     
    18691852    <div id="bwEventTab-Basic"> 
    18701853    <!--<h3>Basic Event Recurrence:</h3>--> 
    1871       <table cellspacing="0" class="common"> 
     1854      <table cellspacing="0" class="common dottedBorder"> 
    18721855        <!--  Calendar in which to place event  --> 
    18731856        <tr> 
     
    19261909              <xsl:when test="form/allDay/input/@checked='checked'"> 
    19271910                <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/> 
    1928                 <input type="hidden" name="eventStartDate.dateOnly" value="on" id="allDayStartDateField"/> 
    1929                 <input type="hidden" name="eventEndDate.dateOnly" value="on" id="allDayEndDateField"/> 
     1911                <input type="hidden" name="eventStartDate.dateOnly" value="true" id="allDayStartDateField"/> 
     1912                <input type="hidden" name="eventEndDate.dateOnly" value="true" id="allDayEndDateField"/> 
    19301913              </xsl:when> 
    19311914              <xsl:otherwise> 
    19321915                <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/> 
    1933                 <input type="hidden" name="eventStartDate.dateOnly" value="off" id="allDayStartDateField"/> 
    1934                 <input type="hidden" name="eventEndDate.dateOnly" value="off" id="allDayEndDateField"/> 
     1916                <input type="hidden" name="eventStartDate.dateOnly" value="false" id="allDayStartDateField"/> 
     1917                <input type="hidden" name="eventEndDate.dateOnly" value="false" id="allDayEndDateField"/> 
    19351918              </xsl:otherwise> 
    19361919            </xsl:choose> 
     
    19411924              <xsl:when test="form/floating/input/@checked='checked'"> 
    19421925                <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="on" checked="checked"/> 
    1943                 <input type="hidden" name="eventStartDate.floating" value="on" id="startFloating"/> 
    1944                 <input type="hidden" name="eventEndDate.floating" value="on" id="endFloating"/> 
     1926                <input type="hidden" name="eventStartDate.floating" value="true" id="startFloating"/> 
     1927                <input type="hidden" name="eventEndDate.floating" value="true" id="endFloating"/> 
    19451928              </xsl:when> 
    19461929              <xsl:otherwise> 
    19471930                <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="off"/> 
    1948                 <input type="hidden" name="eventStartDate.floating" value="off" id="startFloating"/> 
    1949                 <input type="hidden" name="eventEndDate.floating" value="off" id="endFloating"/> 
     1931                <input type="hidden" name="eventStartDate.floating" value="false" id="startFloating"/> 
     1932                <input type="hidden" name="eventEndDate.floating" value="false" id="endFloating"/> 
    19501933              </xsl:otherwise> 
    19511934            </xsl:choose> 
     
    19561939              <xsl:when test="form/storeUTC/input/@checked='checked'"> 
    19571940                <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="on" checked="checked"/> 
    1958                 <input type="hidden" name="eventStartDate.storeUTC" value="on" id="startStoreUTC"/> 
    1959                 <input type="hidden" name="eventEndDate.storeUTC" value="on" id="endStoreUTC"/> 
     1941                <input type="hidden" name="eventStartDate.storeUTC" value="true" id="startStoreUTC"/> 
     1942                <input type="hidden" name="eventEndDate.storeUTC" value="true" id="endStoreUTC"/> 
    19601943              </xsl:when> 
    19611944              <xsl:otherwise> 
    19621945                <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="off"/> 
    1963                 <input type="hidden" name="eventStartDate.storeUTC" value="off" id="startStoreUTC"/> 
    1964                 <input type="hidden" name="eventEndDate.storeUTC" value="off" id="endStoreUTC"/> 
     1946                <input type="hidden" name="eventStartDate.storeUTC" value="false" id="startStoreUTC"/> 
     1947                <input type="hidden" name="eventEndDate.storeUTC" value="false" id="endStoreUTC"/> 
    19651948              </xsl:otherwise> 
    19661949            </xsl:choose> 
     
    19721955              <div class="dateFields"> 
    19731956                <span class="startDateLabel">Date </span> 
     1957                <span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetStartDate" iconURL="{$resourcesRoot}/resources/calIcon.gif" onChange="setDate(this.form,'start')"> 
     1958                  <xsl:attribute name="value"><xsl:value-of select="form/start/rfc3339DateTime"/></xsl:attribute> 
     1959                  <xsl:text> </xsl:text> 
     1960                </span> 
     1961                <input type="hidden" name="eventStartDate.year"> 
     1962                  <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute> 
     1963                </input> 
     1964                <input type="hidden" name="eventStartDate.month"> 
     1965                  <xsl:attribute name="value"><xsl:value-of select="form/start/month/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
     1966                </input> 
     1967                <input type="hidden" name="eventStartDate.day"> 
     1968                  <xsl:attribute name="value"><xsl:value-of select="form/start/day/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
     1969                </input> 
     1970                <!-- 
    19741971                <xsl:copy-of select="form/start/month/*"/> 
    19751972                <xsl:copy-of select="form/start/day/*"/> 
     
    19811978                    <xsl:copy-of select="form/start/yearText/*"/> 
    19821979                  </xsl:otherwise> 
    1983                 </xsl:choose> 
    1984               </div> 
     1980                </xsl:choose>--> 
     1981              </div><!-- 
    19851982              <script language="JavaScript" type="text/javascript"> 
    19861983              <xsl:comment> 
    19871984                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/'); 
    19881985              </xsl:comment> 
    1989               </script> 
    1990               <!--<img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>--> 
     1986              </script>--> 
    19911987              <div class="{$timeFieldsClass}" id="startTimeFields"> 
    19921988                <span id="calWidgetStartTimeHider" class="show"> 
     
    19971993                  </xsl:if> 
    19981994                  <xsl:text> </xsl:text> 
    1999                   <a href="javascript:bwClockLaunch('eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a> 
     1995                  <a href="javascript:bwClockLaunch('eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0" alt="bwClock"/></a> 
    20001996 
    20011997                  <select name="eventStartDate.tzid" id="startTzid" class="timezones"> 
    2002                     <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">true</xsl:attribute></xsl:if> 
     1998                    <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if> 
    20031999                    <option value="-1">select timezone...</option> 
    20042000                    <xsl:variable name="startTzId" select="form/start/tzid"/> 
     
    20182014              <xsl:choose> 
    20192015                <xsl:when test="form/end/type='E'"> 
    2020                   <input type="radio" name="eventEndType" value="E" checked="checked" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
     2016                  <input type="radio" name="eventEndType" value="E" checked="checked" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    20212017                </xsl:when> 
    20222018                <xsl:otherwise> 
    2023                   <input type="radio" name="eventEndType" value="E" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
     2019                  <input type="radio" name="eventEndType" value="E" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    20242020                </xsl:otherwise> 
    20252021              </xsl:choose> 
     
    20332029              <div class="{$endDateTimeClass}" id="endDateTime"> 
    20342030                <div class="dateFields"> 
    2035                   <xsl:copy-of select="form/end/dateTime/month/*"/> 
     2031                  <span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetEndDate" iconURL="{$resourcesRoot}/resources/calIcon.gif" onChange="setDate(this.form,'end')"> 
     2032                    <xsl:attribute name="value"><xsl:value-of select="form/end/rfc3339DateTime"/></xsl:attribute> 
     2033                    <xsl:text> </xsl:text> 
     2034                  </span> 
     2035                  <input type="hidden" name="eventEndDate.year"> 
     2036                    <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/yearText/input/@value"/></xsl:attribute> 
     2037                  </input> 
     2038                  <input type="hidden" name="eventEndDate.month"> 
     2039                    <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/month/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
     2040                  </input> 
     2041                  <input type="hidden" name="eventEndDate.day"> 
     2042                    <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/day/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
     2043                  </input> 
     2044                  <!--<xsl:copy-of select="form/end/dateTime/month/*"/> 
    20362045                  <xsl:copy-of select="form/end/dateTime/day/*"/> 
    20372046                  <xsl:choose> 
     
    20422051                      <xsl:copy-of select="form/end/dateTime/yearText/*"/> 
    20432052                    </xsl:otherwise> 
    2044                   </xsl:choose> 
     2053                  </xsl:choose>--> 
    20452054                </div> 
    2046                 <script language="JavaScript" type="text/javascript"> 
     2055                <!--<script language="JavaScript" type="text/javascript"> 
    20472056                <xsl:comment> 
    20482057                  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/'); 
    20492058                </xsl:comment> 
    2050                 </script> 
    2051                 <!--<img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>--> 
     2059                </script>--> 
    20522060                <div class="{$timeFieldsClass}" id="endTimeFields"> 
    20532061                  <span id="calWidgetEndTimeHider" class="show"> 
     
    20582066                    </xsl:if> 
    20592067                    <xsl:text> </xsl:text> 
    2060                     <a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a> 
     2068                    <a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0" alt="bwClock"/></a> 
    20612069 
    20622070                    <select name="eventEndDate.tzid" id="endTzid" class="timezones"> 
    2063                       <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">true</xsl:attribute></xsl:if> 
     2071                      <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if> 
    20642072                      <option value="-1">select timezone...</option> 
    20652073                      <xsl:variable name="endTzId" select="form/end/dateTime/tzid"/> 
     
    20812089                <xsl:choose> 
    20822090                  <xsl:when test="form/end/type='D'"> 
    2083                     <input type="radio" name="eventEndType" value="D" checked="checked" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
     2091                    <input type="radio" name="eventEndType" value="D" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    20842092                  </xsl:when> 
    20852093                  <xsl:otherwise> 
    2086                     <input type="radio" name="eventEndType" value="D" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
     2094                    <input type="radio" name="eventEndType" value="D" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    20872095                  </xsl:otherwise> 
    20882096                </xsl:choose> 
     
    21202128                        <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/> 
    21212129                        <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 
    2122                         <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="true"/>weeks 
     2130                        <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="disabled"/>weeks 
    21232131                      </div> 
    21242132                    </xsl:when> 
     
    21282136                        <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/> 
    21292137                        <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 
    2130                         <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="true"/>days 
     2138                        <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="disabled"/>days 
    21312139                        <span id="durationHrMin" class="{$durationHrMinClass}"> 
    21322140                          <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 
    2133                           <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="true"/>hours 
     2141                          <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="disabled"/>hours 
    21342142                          <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 
    2135                           <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="true"/>minutes 
     2143                          <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="disabled"/>minutes 
    21362144                        </span> 
    21372145                      </div> 
     
    21492157                <xsl:choose> 
    21502158                  <xsl:when test="form/end/type='N'"> 
    2151                     <input type="radio" name="eventEndType" value="N" checked="checked" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
     2159                    <input type="radio" name="eventEndType" value="N" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    21522160                  </xsl:when> 
    21532161                  <xsl:otherwise> 
    2154                     <input type="radio" name="eventEndType" value="N" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
     2162                    <input type="radio" name="eventEndType" value="N" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    21552163                  </xsl:otherwise> 
    21562164                </xsl:choose> 
     
    21992207          </td> 
    22002208        </tr> 
    2201         <tr> 
    2202           <td class="submit" colspan="2"> 
    2203             <input name="submit" type="submit" value="save event"/>&#160; 
    2204             <input name="cancelled" type="submit" value="cancel"/> 
    2205             <xsl:if test="/bedework/creating != 'true'"> 
    2206               <input type="button" value="go to view" onclick="location.replace('{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}')"/> 
    2207             </xsl:if> 
    2208           </td> 
    2209         </tr> 
    22102209      </table> 
    22112210    </div> 
     
    22162215    <div id="bwEventTab-Details" class="invisible"> 
    22172216      <!--<h3>Extra Information:</h3>--> 
    2218       <table cellspacing="0" class="common"> 
     2217      <table cellspacing="0" class="common dottedBorder"> 
    22192218        <!--  Location  --> 
    22202219        <tr> 
     
    22612260          <td class="fieldname">Description:</td> 
    22622261          <td class="fieldval"> 
    2263             <textarea name="description" cols="60" rows="4"> 
    2264               <xsl:value-of select="form/desc/textarea"/> 
    2265             </textarea> 
     2262            <xsl:choose> 
     2263              <xsl:when test="normalize-space(form/desc/textarea) = ''"> 
     2264                <textarea name="description" cols="60" rows="4"> 
     2265                  <xsl:text> </xsl:text> 
     2266                </textarea> 
     2267                <!-- keep this space to avoid browser 
     2268                rendering errors when the text area is empty --> 
     2269              </xsl:when> 
     2270              <xsl:otherwise> 
     2271                <textarea name="description" cols="60" rows="4"> 
     2272                  <xsl:value-of select="form/desc/textarea"/> 
     2273                </textarea> 
     2274              </xsl:otherwise> 
     2275            </xsl:choose> 
    22662276          </td> 
    22672277        </tr> 
     
    23382348          </td> 
    23392349        </tr> 
    2340         <tr> 
    2341           <td class="submit" colspan="2"> 
    2342             <input name="submit" type="submit" value="save event"/>&#160; 
    2343             <input name="cancelled" type="submit" value="cancel"/> 
    2344             <xsl:if test="/bedework/creating != 'true'"> 
    2345               <input type="button" value="go to view" onclick="location.replace('{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}')"/> 
    2346             </xsl:if> 
    2347           </td> 
    2348         </tr> 
    23492350      </table> 
    23502351    </div> 
     
    23542355    <!-- ============== --> 
    23552356    <div id="bwEventTab-Recurrence" class="invisible"> 
    2356       <!--<h3>Event Recurrence:</h3>--> 
    2357       <table cellspacing="0" class="common"> 
    2358         <tr> 
    2359           <td class="fieldname"> 
    2360             Recurrence: 
    2361           </td> 
    2362           <td class="fieldval"> 
    2363             <!-- Output descriptive recurrence information.  Probably not 
    2364                  complete yet. Replace all strings so can be 
    2365                  more easily internationalized. --> 
    2366             <xsl:if test="form/recurrence"> 
    2367               <div id="recurrenceInfo"> 
    2368                 Every 
    2369                 <xsl:choose> 
    2370                   <xsl:when test="form/recurrence/interval &gt; 1"> 
    2371                     <xsl:value-of select="form/recurrence/interval"/> 
    2372                   </xsl:when> 
    2373                 </xsl:choose> 
    2374                 <xsl:text> </xsl:text> 
    2375                 <xsl:choose> 
    2376                   <xsl:when test="form/recurrence/freq = 'HOURLY'">hour</xsl:when> 
    2377                   <xsl:when test="form/recurrence/freq = 'DAILY'">day</xsl:when> 
    2378                   <xsl:when test="form/recurrence/freq = 'WEEKLY'">week</xsl:when> 
    2379                   <xsl:when test="form/recurrence/freq = 'MONTHLY'">month</xsl:when> 
    2380                   <xsl:when test="form/recurrence/freq = 'YEARLY'">year</xsl:when> 
    2381                 </xsl:choose><xsl:if test="form/recurrence/interval &gt; 1">s</xsl:if> 
    2382                 <xsl:text> </xsl:text> 
    2383  
    2384                 <xsl:if test="form/recurrence/byday"> 
    2385                   <xsl:for-each select="form/recurrence/byday/pos"> 
    2386                     <xsl:if test="position() != 1"> and </xsl:if> 
    2387                     on 
    2388                     <xsl:choose> 
    2389                       <xsl:when test="@val='1'"> 
    2390                         the first 
    2391                       </xsl:when> 
    2392                       <xsl:when test="@val='2'"> 
    2393                         the second 
    2394                       </xsl:when> 
    2395                       <xsl:when test="@val='3'"> 
    2396                         the third 
    2397                       </xsl:when> 
    2398                       <xsl:when test="@val='4'"> 
    2399                         the fourth 
    2400                       </xsl:when> 
    2401                       <xsl:when test="@val='5'"> 
    2402                         the fifth 
    2403                       </xsl:when> 
    2404                       <xsl:when test="@val='-1'"> 
    2405                         the last 
    2406                       </xsl:when> 
    2407                       <!-- don't output "every" --> 
    2408                       <!--<xsl:otherwise> 
     2357      <!-- Output descriptive recurrence information.  Probably not 
     2358           complete yet. Replace all strings so can be 
     2359           more easily internationalized. --> 
     2360      <xsl:if test="form/recurrence"> 
     2361        <div id="recurrenceInfo"> 
     2362          Every 
     2363          <xsl:choose> 
     2364            <xsl:when test="form/recurrence/interval &gt; 1"> 
     2365              <xsl:value-of select="form/recurrence/interval"/> 
     2366            </xsl:when> 
     2367          </xsl:choose> 
     2368          <xsl:text> </xsl:text> 
     2369          <xsl:choose> 
     2370            <xsl:when test="form/recurrence/freq = 'HOURLY'">hour</xsl:when> 
     2371            <xsl:when test="form/recurrence/freq = 'DAILY'">day</xsl:when> 
     2372            <xsl:when test="form/recurrence/freq = 'WEEKLY'">week</xsl:when> 
     2373            <xsl:when test="form/recurrence/freq = 'MONTHLY'">month</xsl:when> 
     2374            <xsl:when test="form/recurrence/freq = 'YEARLY'">year</xsl:when> 
     2375          </xsl:choose><xsl:if test="form/recurrence/interval &gt; 1">s</xsl:if> 
     2376          <xsl:text> </xsl:text> 
     2377 
     2378          <xsl:if test="form/recurrence/byday"> 
     2379            <xsl:for-each select="form/recurrence/byday/pos"> 
     2380              <xsl:if test="position() != 1"> and </xsl:if> 
     2381              on 
     2382              <xsl:choose> 
     2383                <xsl:when test="@val='1'"> 
     2384                  the first 
     2385                </xsl:when> 
     2386                <xsl:when test="@val='2'"> 
     2387                  the second 
     2388                </xsl:when> 
     2389                <xsl:when test="@val='3'"> 
     2390                  the third 
     2391                </xsl:when> 
     2392                <xsl:when test="@val='4'"> 
     2393                  the fourth 
     2394                </xsl:when> 
     2395                <xsl:when test="@val='5'"> 
     2396                  the fifth 
     2397                </xsl:when> 
     2398                <xsl:when test="@val='-1'"> 
     2399                  the last 
     2400                </xsl:when> 
     2401                <!-- don't output "every" --> 
     2402                <!--<xsl:otherwise> 
     2403                  every 
     2404                </xsl:otherwise>--> 
     2405              </xsl:choose> 
     2406              <xsl:for-each select="day"> 
     2407                <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 
     2408                <xsl:variable name="dayVal" select="."/> 
     2409                <xsl:variable name="dayPos"> 
     2410                  <xsl:for-each select="/bedework/recurdayvals/val"> 
     2411                    <xsl:if test="node() = $dayVal"><xsl:value-of select="position()"/></xsl:if> 
     2412                  </xsl:for-each> 
     2413                </xsl:variable> 
     2414                <xsl:value-of select="/bedework/shortdaynames/val[position() = $dayPos]"/> 
     2415                <xsl:if test="position() != last()">, </xsl:if> 
     2416              </xsl:for-each> 
     2417            </xsl:for-each> 
     2418          </xsl:if> 
     2419 
     2420          <xsl:if test="form/recurrence/bymonth"> 
     2421            in 
     2422            <xsl:for-each select="form/recurrence/bymonth/val"> 
     2423              <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 
     2424              <xsl:variable name="monthNum" select="number(.)"/> 
     2425              <xsl:value-of select="/bedework/monthlabels/val[position() = $monthNum]"/> 
     2426              <xsl:if test="position() != last()">, </xsl:if> 
     2427            </xsl:for-each> 
     2428          </xsl:if> 
     2429 
     2430          <xsl:if test="form/recurrence/bymonthday"> 
     2431            on the 
     2432            <xsl:apply-templates select="form/recurrence/bymonthday/val" mode="weekMonthYearNumbers"/> 
     2433            day<xsl:if test="form/recurrence/bymonthday/val[position()=2]">s</xsl:if> of the month 
     2434          </xsl:if> 
     2435 
     2436          <xsl:if test="form/recurrence/byyearday"> 
     2437            on the 
     2438            <xsl:apply-templates select="form/recurrence/byyearday/val" mode="weekMonthYearNumbers"/> 
     2439            day<xsl:if test="form/recurrence/byyearday/val[position()=2]">s</xsl:if> of the year 
     2440          </xsl:if> 
     2441 
     2442          <xsl:if test="form/recurrence/byweekno"> 
     2443            in the 
     2444            <xsl:apply-templates select="form/recurrence/byweekno/val" mode="weekMonthYearNumbers"/> 
     2445            week<xsl:if test="form/recurrence/byweekno/val[position()=2]">s</xsl:if> of the year 
     2446          </xsl:if> 
     2447 
     2448          repeating 
     2449          <xsl:choose> 
     2450            <xsl:when test="form/recurrence/count = '-1'">forever</xsl:when> 
     2451            <xsl:when test="form/recurrence/until"> 
     2452              <xsl:value-of select="form/recurrence/until"/> 
     2453            </xsl:when> 
     2454            <xsl:otherwise> 
     2455              <xsl:value-of select="form/recurrence/count"/> 
     2456              time<xsl:if test="form/recurrence/count &gt; 1">s</xsl:if> 
     2457            </xsl:otherwise> 
     2458          </xsl:choose> 
     2459        </div> 
     2460      </xsl:if> 
     2461 
     2462      <!-- recurrence rules --> 
     2463      <xsl:choose> 
     2464        <xsl:when test="recurrenceId != ''"> 
     2465          <!-- recurrence instances can not themselves recur, 
     2466               so provide access to master event --> 
     2467          <em>This event is a recurrence instance.</em><br/> 
     2468          <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="edit master (recurring event)">edit master event</a> 
     2469        </xsl:when> 
     2470        <xsl:otherwise> 
     2471          <!-- has recurrenceId, so is master --> 
     2472          <!--<input type="checkbox" name="recurrenceFlag" onclick="swapRecurrence(this)" value="on"/> 
     2473          <xsl:choose> 
     2474            <xsl:when test="/bedework/creating = 'true'"> 
     2475              set recurrence rules 
     2476            </xsl:when> 
     2477            <xsl:otherwise> 
     2478              change recurrence 
     2479            </xsl:otherwise> 
     2480          </xsl:choose>--> 
     2481 
     2482          <!-- set these dynamically when form is submitted --> 
     2483          <input type="hidden" name="interval" value=""/> 
     2484          <input type="hidden" name="count" value=""/> 
     2485          <input type="hidden" name="until" value=""/> 
     2486          <input type="hidden" name="byday" value=""/> 
     2487          <input type="hidden" name="bymonthday" value=""/> 
     2488          <input type="hidden" name="bymonth" value=""/> 
     2489          <input type="hidden" name="byweekno" value=""/> 
     2490          <input type="hidden" name="byyearday" value=""/> 
     2491          <input type="hidden" name="wkst" value=""/> 
     2492          <input type="hidden" name="setpos" value=""/> 
     2493 
     2494          <div id="recurrenceFields"> 
     2495            <table id="recurrenceTable" cellspacing="0"> 
     2496              <tr> 
     2497                <td class="recurrenceFrequency" rowspan="2"> 
     2498                  <strong>Frequency:</strong><br/> 
     2499                  <!-- "freq" is used to determine if a recurrence should be created; test for "NONE" --> 
     2500                  <input type="radio" name="freq" value="NONE" onclick="showRecurrence(this.value)" checked="checked"/>none<br/> 
     2501                  <!--<input type="radio" name="freq" value="HOURLY" onclick="showRecurrence(this.value)"/>hourly<br/>--> 
     2502                  <input type="radio" name="freq" value="DAILY" onclick="showRecurrence(this.value)"/>daily<br/> 
     2503                  <input type="radio" name="freq" value="WEEKLY" onclick="showRecurrence(this.value)"/>weekly<br/> 
     2504                  <input type="radio" name="freq" value="MONTHLY" onclick="showRecurrence(this.value)"/>monthly<br/> 
     2505                  <input type="radio" name="freq" value="YEARLY" onclick="showRecurrence(this.value)"/>yearly 
     2506                </td> 
     2507                <!-- recurrence count, until, forever --> 
     2508                <td class="recurrenceUntil"> 
     2509                  <!-- none --> 
     2510                  <div id="noneRecurrenceRules"> 
     2511                    <p>does not recur</p> 
     2512                  </div> 
     2513                  <div id="recurrenceUntilRules" class="invisible"> 
     2514                    <strong>Repeat:</strong> 
     2515                    <p> 
     2516                      <div class="dateFields"> 
     2517                        <input type="radio" name="recurCountUntil" value="until" id="recurUntil"> 
     2518                          <xsl:if test="form/recurring/until"> 
     2519                            <xsl:attribute name="checked">checked</xsl:attribute> 
     2520                          </xsl:if> 
     2521                        </input> 
     2522                        until 
     2523                        <select name="untilMonth" onfocus="selectRecurCountUntil('recurUntil')"> 
     2524                          <xsl:for-each select="form/start/month/select/option"> 
     2525                            <xsl:copy-of select="."/> 
     2526                          </xsl:for-each> 
     2527                        </select> 
     2528                        <select name="untilDay" onfocus="selectRecurCountUntil('recurUntil')"> 
     2529                          <xsl:for-each select="form/start/day/select/option"> 
     2530                            <xsl:copy-of select="."/> 
     2531                          </xsl:for-each> 
     2532                        </select> 
     2533                        <xsl:choose> 
     2534                          <xsl:when test="/bedework/creating = 'true'"> 
     2535                            <select name="untilYear" onfocus="selectRecurCountUntil('recurUntil')"> 
     2536                              <xsl:for-each select="form/start/year/select/option"> 
     2537                                <xsl:copy-of select="."/> 
     2538                              </xsl:for-each> 
     2539                            </select> 
     2540                          </xsl:when> 
     2541                          <xsl:otherwise> 
     2542                            <input type="text" name="untilYear" size="4"  onfocus="selectRecurCountUntil('recurUntil')"> 
     2543                              <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute> 
     2544                            </input> 
     2545                          </xsl:otherwise> 
     2546                        </xsl:choose> 
     2547                      </div> 
     2548                      <!-- 
     2549                      <script language="JavaScript" type="text/javascript"> 
     2550                      <xsl:comment> 
     2551                        untilDateDynCalWidget = new dynCalendar('untilDateDynCalWidget', <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)"/>, 'untilDateCalWidgetCallback',false,'<xsl:value-of select="$resourcesRoot"/>/resources/'); 
     2552                      </xsl:comment> 
     2553                      </script>--> 
     2554                    </p> 
     2555                    <p> 
     2556                      <input type="radio" name="recurCountUntil" value="forever"> 
     2557                        <xsl:if test="not(form/recurring) or form/recurring/count = '-1'"> 
     2558                          <xsl:attribute name="checked">checked</xsl:attribute> 
     2559                        </xsl:if> 
     2560                      </input> 
     2561                      forever 
     2562                      &#160; 
     2563                      <input type="radio" name="recurCountUntil" value="count" id="recurCount"> 
     2564                        <xsl:if test="form/recurring/count != '-1'"> 
     2565                          <xsl:attribute name="checked">checked</xsl:attribute> 
     2566                        </xsl:if> 
     2567                      </input> 
     2568                      <input type="text" value="1" size="2" name="countHolder"  onfocus="selectRecurCountUntil('recurCount')"> 
     2569                        <xsl:if test="form/recurring/count and form/recurring/count != '-1'"> 
     2570                          <xsl:attribute name="value"><xsl:value-of select="form/recurring/count"/></xsl:attribute> 
     2571                        </xsl:if> 
     2572                      </input> 
     2573                      times 
     2574                    </p> 
     2575                  </div> 
     2576                </td> 
     2577              </tr> 
     2578              <tr> 
     2579                <td class="recurrenceRules"> 
     2580                  <span id="advancedRecurrenceRules" class="invisible"> 
     2581                    <!-- hourly --> 
     2582                    <div id="hourlyRecurrenceRules" class="invisible"> 
     2583                      <p> 
     2584                        <strong>Interval:</strong> 
    24092585                        every 
    2410                       </xsl:otherwise>--> 
    2411                     </xsl:choose> 
    2412                     <xsl:for-each select="day"> 
    2413                       <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 
    2414                       <xsl:variable name="dayVal" select="."/> 
    2415                       <xsl:variable name="dayPos"> 
    2416                         <xsl:for-each select="/bedework/recurdayvals/val"> 
    2417                           <xsl:if test="node() = $dayVal"><xsl:value-of select="position()"/></xsl:if> 
    2418                         </xsl:for-each> 
    2419                       </xsl:variable> 
    2420                       <xsl:value-of select="/bedework/shortdaynames/val[position() = $dayPos]"/> 
    2421                       <xsl:if test="position() != last()">, </xsl:if> 
    2422                     </xsl:for-each> 
    2423                   </xsl:for-each> 
    2424                 </xsl:if> 
    2425  
    2426                 <xsl:if test="form/recurrence/bymonth"> 
    2427                   in 
    2428                   <xsl:for-each select="form/recurrence/bymonth/val"> 
    2429                     <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 
    2430                     <xsl:variable name="monthNum" select="number(.)"/> 
    2431                     <xsl:value-of select="/bedework/monthlabels/val[position() = $monthNum]"/> 
    2432                     <xsl:if test="position() != last()">, </xsl:if> 
    2433                   </xsl:for-each> 
    2434                 </xsl:if> 
    2435  
    2436                 <xsl:if test="form/recurrence/bymonthday"> 
    2437                   on the 
    2438                   <xsl:apply-templates select="form/recurrence/bymonthday/val" mode="weekMonthYearNumbers"/> 
    2439                   day<xsl:if test="form/recurrence/bymonthday/val[position()=2]">s</xsl:if> of the month 
    2440                 </xsl:if> 
    2441  
    2442                 <xsl:if test="form/recurrence/byyearday"> 
    2443                   on the 
    2444                   <xsl:apply-templates select="form/recurrence/byyearday/val" mode="weekMonthYearNumbers"/> 
    2445                   day<xsl:if test="form/recurrence/byyearday/val[position()=2]">s</xsl:if> of the year 
    2446                 </xsl:if> 
    2447  
    2448                 <xsl:if test="form/recurrence/byweekno"> 
    2449                   in the 
    2450                   <xsl:apply-templates select="form/recurrence/byweekno/val" mode="weekMonthYearNumbers"/> 
    2451                   week<xsl:if test="form/recurrence/byweekno/val[position()=2]">s</xsl:if> of the year 
    2452                 </xsl:if> 
    2453  
    2454                 repeating 
    2455                 <xsl:choose> 
    2456                   <xsl:when test="form/recurrence/count = '-1'">forever</xsl:when> 
    2457                   <xsl:when test="form/recurrence/until"> 
    2458                     <xsl:value-of select="form/recurrence/until"/> 
    2459                   </xsl:when> 
    2460                   <xsl:otherwise> 
    2461                     <xsl:value-of select="form/recurrence/count"/> 
    2462                     time<xsl:if test="form/recurrence/count &gt; 1">s</xsl:if> 
    2463                   </xsl:otherwise> 
    2464                 </xsl:choose> 
    2465               </div> 
    2466             </xsl:if> 
    2467  
    2468             <!-- recurrence rules --> 
    2469             <xsl:choose> 
    2470               <xsl:when test="recurrenceId != ''"> 
    2471                 <!-- recurrence instances can not themselves recur, 
    2472                      so provide access to master event --> 
    2473                 <em>This event is a recurrence instance.</em><br/> 
    2474                 <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="edit master (recurring event)">edit master event</a> 
    2475               </xsl:when> 
    2476               <xsl:otherwise> 
    2477                 <!-- has recurrenceId, so is master --> 
    2478                   <input type="checkbox" name="recurrenceFlag" onclick="swapRecurrence(this)" value="on"/> 
    2479                   <xsl:choose> 
    2480                     <xsl:when test="/bedework/creating = 'true'"> 
    2481                       set recurrence rules 
    2482                     </xsl:when> 
    2483                     <xsl:otherwise> 
    2484                       change recurrence 
    2485                     </xsl:otherwise> 
    2486                   </xsl:choose> 
    2487                   <span id="recurrenceUiSwitch" class="invisible"> 
    2488                     <input type="checkbox" name="recurrenceUiSwitch" value="simple" onchange="swapVisible(this,'advancedRecurrenceRules')"/> 
    2489                     show advanced recurrence rules 
     2586                        <input type="text" name="hourlyInterval" size="2" value="1"> 
     2587                          <xsl:if test="form/recurrence/interval"> 
     2588                            <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
     2589                          </xsl:if> 
     2590                        </input> 
     2591                        hour(s) 
     2592                      </p> 
     2593                    </div> 
     2594                    <!-- daily --> 
     2595                    <div id="dailyRecurrenceRules" class="invisible"> 
     2596                      <p> 
     2597                        <strong>Interval:</strong> 
     2598                        every 
     2599                        <input type="text" name="dailyInterval" size="2" value="1"> 
     2600                          <xsl:if test="form/recurrence/interval"> 
     2601                            <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
     2602                          </xsl:if> 
     2603                        </input> 
     2604                        day(s) 
     2605                      </p> 
     2606                      <p> 
     2607                        <input type="checkbox" name="swapDayMonthCheckBoxList" value="" onclick="swapVisible(this,'dayMonthCheckBoxList')"/> 
     2608                        in these months: 
     2609                        <div id="dayMonthCheckBoxList" class="invisible"> 
     2610                          <xsl:for-each select="/bedework/monthlabels/val"> 
     2611                            <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 
     2612                            <span class="chkBoxListItem"> 
     2613                              <input type="checkbox" name="dayMonths"> 
     2614                                <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute> 
     2615                              </input> 
     2616                              <xsl:value-of select="."/> 
     2617                            </span> 
     2618                            <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 
     2619                          </xsl:for-each> 
     2620                        </div> 
     2621                      </p> 
     2622                      <!--<p> 
     2623                        <input type="checkbox" name="swapDaySetPos" value="" onclick="swapVisible(this,'daySetPos')"/> 
     2624                        limit to: 
     2625                        <div id="daySetPos" class="invisible"> 
     2626                        </div> 
     2627                      </p>--> 
     2628                    </div> 
     2629                    <!-- weekly --> 
     2630                    <div id="weeklyRecurrenceRules" class="invisible"> 
     2631                      <p> 
     2632                        <strong>Interval:</strong> 
     2633                        every 
     2634                        <input type="text" name="weeklyInterval" size="2" value="1"> 
     2635                          <xsl:if test="form/recurrence/interval"> 
     2636                            <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
     2637                          </xsl:if> 
     2638                        </input> 
     2639                        week(s) on: 
     2640                      </p> 
     2641                      <p> 
     2642                        <div id="weekRecurFields"> 
     2643                          <xsl:call-template name="byDayChkBoxList"> 
     2644                            <xsl:with-param name="name">byDayWeek</xsl:with-param> 
     2645                          </xsl:call-template> 
     2646                        </div> 
     2647                      </p> 
     2648                      <p class="weekRecurLinks"> 
     2649                        <a href="javascript:recurSelectWeekdays('weekRecurFields')">select weekdays</a> | 
     2650                        <a href="javascript:recurSelectWeekends('weekRecurFields')">select weekends</a> 
     2651                      </p> 
     2652                      <p> 
     2653                        Week start: 
     2654                        <select name="weekWkst"> 
     2655                          <xsl:for-each select="/bedework/shortdaynames/val"> 
     2656                            <xsl:variable name="pos" select="position()"/> 
     2657                            <option> 
     2658                              <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 
     2659                              <xsl:value-of select="."/> 
     2660                            </option> 
     2661                          </xsl:for-each> 
     2662                        </select> 
     2663                      </p> 
     2664                    </div> 
     2665                    <!-- monthly --> 
     2666                    <div id="monthlyRecurrenceRules" class="invisible"> 
     2667                      <p> 
     2668                        <strong>Interval:</strong> 
     2669                        every 
     2670                        <input type="text" name="monthlyInterval" size="2" value="1"> 
     2671                          <xsl:if test="form/recurrence/interval"> 
     2672                            <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
     2673                          </xsl:if> 
     2674                        </input> 
     2675                        month(s) 
     2676                      </p> 
     2677                      <div id="monthRecurFields"> 
     2678                        <div id="monthRecurFields1"> 
     2679                          on 
     2680                          <select name="bymonthposPos1" width="7em" onchange="changeClass('monthRecurFields2','shown')"> 
     2681                            <xsl:call-template name="recurrenceDayPosOptions"/> 
     2682                          </select> 
     2683                          <xsl:call-template name="byDayChkBoxList"/> 
     2684                        </div> 
     2685                        <xsl:call-template name="buildRecurFields"> 
     2686                          <xsl:with-param name="current">2</xsl:with-param> 
     2687                          <xsl:with-param name="total">10</xsl:with-param> 
     2688                          <xsl:with-param name="name">month</xsl:with-param> 
     2689                        </xsl:call-template> 
     2690                      </div> 
     2691                      <p> 
     2692                        <input type="checkbox" name="swapMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'monthDaysCheckBoxList')"/> 
     2693                        on these days:<br/> 
     2694                        <div id="monthDaysCheckBoxList" class="invisible"> 
     2695                          <xsl:call-template name="buildCheckboxList"> 
     2696                            <xsl:with-param name="current">1</xsl:with-param> 
     2697                            <xsl:with-param name="end">31</xsl:with-param> 
     2698                            <xsl:with-param name="name">monthDayBoxes</xsl:with-param> 
     2699                          </xsl:call-template> 
     2700                        </div> 
     2701                      </p> 
     2702                    </div> 
     2703                    <!-- yearly --> 
     2704                    <div id="yearlyRecurrenceRules" class="invisible"> 
     2705                      <p> 
     2706                        <strong>Interval:</strong> 
     2707                        every 
     2708                        <input type="text" name="yearlyInterval" size="2" value="1"> 
     2709                          <xsl:if test="form/recurrence/interval"> 
     2710                            <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
     2711                          </xsl:if> 
     2712                        </input> 
     2713                        years(s) 
     2714                      </p> 
     2715                      <div id="yearRecurFields"> 
     2716                        <div id="yearRecurFields1"> 
     2717                          on 
     2718                          <select name="byyearposPos1" width="7em" onchange="changeClass('yearRecurFields2','shown')"> 
     2719                            <xsl:call-template name="recurrenceDayPosOptions"/> 
     2720                          </select> 
     2721                          <xsl:call-template name="byDayChkBoxList"/> 
     2722                        </div> 
     2723                        <xsl:call-template name="buildRecurFields"> 
     2724                          <xsl:with-param name="current">2</xsl:with-param> 
     2725                          <xsl:with-param name="total">10</xsl:with-param> 
     2726                          <xsl:with-param name="name">year</xsl:with-param> 
     2727                        </xsl:call-template> 
     2728                      </div> 
     2729                      <p> 
     2730                        <input type="checkbox" name="swapYearMonthCheckBoxList" value="" onclick="swapVisible(this,'yearMonthCheckBoxList')"/> 
     2731                        in these months: 
     2732                        <div id="yearMonthCheckBoxList" class="invisible"> 
     2733                          <xsl:for-each select="/bedework/monthlabels/val"> 
     2734                            <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 
     2735                            <span class="chkBoxListItem"> 
     2736                              <input type="checkbox" name="yearMonths"> 
     2737                                <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute> 
     2738                              </input> 
     2739                              <xsl:value-of select="."/> 
     2740                            </span> 
     2741                            <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 
     2742                          </xsl:for-each> 
     2743                        </div> 
     2744                      </p> 
     2745                      <p> 
     2746                        <input type="checkbox" name="swapYearMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'yearMonthDaysCheckBoxList')"/> 
     2747                        on these days of the month:<br/> 
     2748                        <div id="yearMonthDaysCheckBoxList" class="invisible"> 
     2749                          <xsl:call-template name="buildCheckboxList"> 
     2750                            <xsl:with-param name="current">1</xsl:with-param> 
     2751                            <xsl:with-param name="end">31</xsl:with-param> 
     2752                            <xsl:with-param name="name">yearMonthDayBoxes</xsl:with-param> 
     2753                          </xsl:call-template> 
     2754                        </div> 
     2755                      </p> 
     2756                      <p> 
     2757                        <input type="checkbox" name="swapYearWeeksCheckBoxList" value="" onclick="swapVisible(this,'yearWeeksCheckBoxList')"/> 
     2758                        in these weeks of the year:<br/> 
     2759                        <div id="yearWeeksCheckBoxList" class="invisible"> 
     2760                          <xsl:call-template name="buildCheckboxList"> 
     2761                            <xsl:with-param name="current">1</xsl:with-param> 
     2762                            <xsl:with-param name="end">53</xsl:with-param> 
     2763                            <xsl:with-param name="name">yearWeekBoxes</xsl:with-param> 
     2764                          </xsl:call-template> 
     2765                        </div> 
     2766                      </p> 
     2767                      <p> 
     2768                        <input type="checkbox" name="swapYearDaysCheckBoxList" value="" onclick="swapVisible(this,'yearDaysCheckBoxList')"/> 
     2769                        on these days of the year:<br/> 
     2770                        <div id="yearDaysCheckBoxList" class="invisible"> 
     2771                          <xsl:call-template name="buildCheckboxList"> 
     2772                            <xsl:with-param name="current">1</xsl:with-param> 
     2773                            <xsl:with-param name="end">366</xsl:with-param> 
     2774                            <xsl:with-param name="name">yearDayBoxes</xsl:with-param> 
     2775                          </xsl:call-template> 
     2776                        </div> 
     2777                      </p> 
     2778                      <p> 
     2779                        Week start: 
     2780                        <select name="yearWkst"> 
     2781                          <xsl:for-each select="/bedework/shortdaynames/val"> 
     2782                            <xsl:variable name="pos" select="position()"/> 
     2783                            <option> 
     2784                              <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 
     2785                              <xsl:value-of select="."/> 
     2786                            </option> 
     2787                          </xsl:for-each> 
     2788                        </select> 
     2789                      </p> 
     2790                    </div> 
    24902791                  </span> 
    2491  
    2492                   <!-- set these dynamically when form is submitted --> 
    2493                   <input type="hidden" name="interval" value=""/> 
    2494                   <input type="hidden" name="count" value=""/> 
    2495                   <input type="hidden" name="until" value=""/> 
    2496                   <input type="hidden" name="byday" value=""/> 
    2497                   <input type="hidden" name="bymonthday" value=""/> 
    2498                   <input type="hidden" name="bymonth" value=""/> 
    2499                   <input type="hidden" name="byweekno" value=""/> 
    2500                   <input type="hidden" name="byyearday" value=""/> 
    2501                   <input type="hidden" name="wkst" value=""/> 
    2502                   <input type="hidden" name="setpos" value=""/> 
    2503  
    2504                   <div id="recurrenceFields" class="invisible"> 
    2505                     <table id="recurrenceTable" cellspacing="0"> 
    2506                       <tr> 
    2507                         <td class="recurrenceFrequency" rowspan="2"> 
    2508                           <strong>Frequency:</strong><br/> 
    2509                           <!-- "freq" is used to determine if a recurrence should be created; test for "NONE" --> 
    2510                           <input type="radio" name="freq" value="NONE" onclick="showRecurrence(this.value)" checked="checked"/>none<br/> 
    2511                           <!--<input type="radio" name="freq" value="HOURLY" onclick="showRecurrence(this.value)"/>hourly<br/>--> 
    2512                           <input type="radio" name="freq" value="DAILY" onclick="showRecurrence(this.value)"/>daily<br/> 
    2513                           <input type="radio" name="freq" value="WEEKLY" onclick="showRecurrence(this.value)"/>weekly<br/> 
    2514                           <input type="radio" name="freq" value="MONTHLY" onclick="showRecurrence(this.value)"/>monthly<br/> 
    2515                           <input type="radio" name="freq" value="YEARLY" onclick="showRecurrence(this.value)"/>yearly 
    2516                         </td> 
    2517                         <td class="recurrenceRules"> 
    2518                           <!-- none --> 
    2519                           <div id="noneRecurrenceRules"> 
    2520                             <p>does not recur</p> 
    2521                           </div> 
    2522                           <span id="advancedRecurrenceRules" class="invisible"> 
    2523                             <!-- hourly --> 
    2524                             <div id="hourlyRecurrenceRules" class="invisible"> 
    2525                               <p> 
    2526                                 <strong>Interval:</strong> 
    2527                                 every 
    2528                                 <input type="text" name="hourlyInterval" size="2" value="1"> 
    2529                                   <xsl:if test="form/recurrence/interval"> 
    2530                                     <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    2531                                   </xsl:if> 
    2532                                 </input> 
    2533                                 hour(s) 
    2534                               </p> 
    2535                             </div> 
    2536                             <!-- daily --> 
    2537                             <div id="dailyRecurrenceRules" class="invisible"> 
    2538                               <p> 
    2539                                 <strong>Interval:</strong> 
    2540                                 every 
    2541                                 <input type="text" name="dailyInterval" size="2" value="1"> 
    2542                                   <xsl:if test="form/recurrence/interval"> 
    2543                                     <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    2544                                   </xsl:if> 
    2545                                 </input> 
    2546                                 day(s) 
    2547                               </p> 
    2548                               <p> 
    2549                                 <input type="checkbox" name="swapDayMonthCheckBoxList" value="" onclick="swapVisible(this,'dayMonthCheckBoxList')"/> 
    2550                                 in these months: 
    2551                                 <div id="dayMonthCheckBoxList" class="invisible"> 
    2552                                   <xsl:for-each select="/bedework/monthlabels/val"> 
    2553                                     <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 
    2554                                     <span class="chkBoxListItem"> 
    2555                                       <input type="checkbox" name="dayMonths"> 
    2556                                         <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute> 
    2557                                       </input> 
    2558                                       <xsl:value-of select="."/> 
    2559                                     </span> 
    2560                                     <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 
    2561                                   </xsl:for-each> 
    2562                                 </div> 
    2563                               </p> 
    2564                               <!--<p> 
    2565                                 <input type="checkbox" name="swapDaySetPos" value="" onclick="swapVisible(this,'daySetPos')"/> 
    2566                                 limit to: 
    2567                                 <div id="daySetPos" class="invisible"> 
    2568                                 </div> 
    2569                               </p>--> 
    2570                             </div> 
    2571                             <!-- weekly --> 
    2572                             <div id="weeklyRecurrenceRules" class="invisible"> 
    2573                               <p> 
    2574                                 <strong>Interval:</strong> 
    2575                                 every 
    2576                                 <input type="text" name="weeklyInterval" size="2" value="1"> 
    2577                                   <xsl:if test="form/recurrence/interval"> 
    2578                                     <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    2579                                   </xsl:if> 
    2580                                 </input> 
    2581                                 week(s) on: 
    2582                               </p> 
    2583                               <p> 
    2584                                 <div id="weekRecurFields"> 
    2585                                   <xsl:call-template name="byDayChkBoxList"> 
    2586                                     <xsl:with-param name="name">byDayWeek</xsl:with-param> 
    2587                                   </xsl:call-template> 
    2588                                 </div> 
    2589                               </p> 
    2590                               <p class="weekRecurLinks"> 
    2591                                 <a href="javascript:recurSelectWeekdays('weekRecurFields')">select weekdays</a> | 
    2592                                 <a href="javascript:recurSelectWeekends('weekRecurFields')">select weekends</a> 
    2593                               </p> 
    2594                               <p> 
    2595                                 Week start: 
    2596                                 <select name="weekWkst"> 
    2597                                   <xsl:for-each select="/bedework/shortdaynames/val"> 
    2598                                     <xsl:variable name="pos" select="position()"/> 
    2599                                     <option> 
    2600                                       <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 
    2601                                       <xsl:value-of select="."/> 
    2602                                     </option> 
    2603                                   </xsl:for-each> 
    2604                                 </select> 
    2605                               </p> 
    2606                             </div> 
    2607                             <!-- monthly --> 
    2608                             <div id="monthlyRecurrenceRules" class="invisible"> 
    2609                               <p> 
    2610                                 <strong>Interval:</strong> 
    2611                                 every 
    2612                                 <input type="text" name="monthlyInterval" size="2" value="1"> 
    2613                                   <xsl:if test="form/recurrence/interval"> 
    2614                                     <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    2615                                   </xsl:if> 
    2616                                 </input> 
    2617                                 month(s) 
    2618                               </p> 
    2619                               <div id="monthRecurFields"> 
    2620                                 <div id="monthRecurFields1"> 
    2621                                   on 
    2622                                   <select name="bymonthposPos1" width="7em" onchange="changeClass('monthRecurFields2','shown')"> 
    2623                                     <xsl:call-template name="recurrenceDayPosOptions"/> 
    2624                                   </select> 
    2625                                   <xsl:call-template name="byDayChkBoxList"/> 
    2626                                 </div> 
    2627                                 <xsl:call-template name="buildRecurFields"> 
    2628                                   <xsl:with-param name="current">2</xsl:with-param> 
    2629                                   <xsl:with-param name="total">10</xsl:with-param> 
    2630                                   <xsl:with-param name="name">month</xsl:with-param> 
    2631                                 </xsl:call-template> 
    2632                               </div> 
    2633                               <p> 
    2634                                 <input type="checkbox" name="swapMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'monthDaysCheckBoxList')"/> 
    2635                                 on these days:<br/> 
    2636                                 <div id="monthDaysCheckBoxList" class="invisible"> 
    2637                                   <xsl:call-template name="buildCheckboxList"> 
    2638                                     <xsl:with-param name="current">1</xsl:with-param> 
    2639                                     <xsl:with-param name="end">31</xsl:with-param> 
    2640                                     <xsl:with-param name="name">monthDayBoxes</xsl:with-param> 
    2641                                   </xsl:call-template> 
    2642                                 </div> 
    2643                               </p> 
    2644                             </div> 
    2645                             <!-- yearly --> 
    2646                             <div id="yearlyRecurrenceRules" class="invisible"> 
    2647                               <p> 
    2648                                 <strong>Interval:</strong> 
    2649                                 every 
    2650                                 <input type="text" name="yearlyInterval" size="2" value="1"> 
    2651                                   <xsl:if test="form/recurrence/interval"> 
    2652                                     <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    2653                                   </xsl:if> 
    2654                                 </input> 
    2655                                 years(s) 
    2656                               </p> 
    2657                               <div id="yearRecurFields"> 
    2658                                 <div id="yearRecurFields1"> 
    2659                                   on 
    2660                                   <select name="byyearposPos1" width="7em" onchange="changeClass('yearRecurFields2','shown')"> 
    2661                                     <xsl:call-template name="recurrenceDayPosOptions"/> 
    2662                                   </select> 
    2663                                   <xsl:call-template name="byDayChkBoxList"/> 
    2664                                 </div> 
    2665                                 <xsl:call-template name="buildRecurFields"> 
    2666                                   <xsl:with-param name="current">2</xsl:with-param> 
    2667                                   <xsl:with-param name="total">10</xsl:with-param> 
    2668                                   <xsl:with-param name="name">year</xsl:with-param> 
    2669                                 </xsl:call-template> 
    2670                               </div> 
    2671                               <p> 
    2672                                 <input type="checkbox" name="swapYearMonthCheckBoxList" value="" onclick="swapVisible(this,'yearMonthCheckBoxList')"/> 
    2673                                 in these months: 
    2674                                 <div id="yearMonthCheckBoxList" class="invisible"> 
    2675                                   <xsl:for-each select="/bedework/monthlabels/val"> 
    2676                                     <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 
    2677                                     <span class="chkBoxListItem"> 
    2678                                       <input type="checkbox" name="yearMonths"> 
    2679                                         <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute> 
    2680                                       </input> 
    2681                                       <xsl:value-of select="."/> 
    2682                                     </span> 
    2683                                     <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 
    2684                                   </xsl:for-each> 
    2685                                 </div> 
    2686                               </p> 
    2687                               <p> 
    2688                                 <input type="checkbox" name="swapYearMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'yearMonthDaysCheckBoxList')"/> 
    2689                                 on these days of the month:<br/> 
    2690                                 <div id="yearMonthDaysCheckBoxList" class="invisible"> 
    2691                                   <xsl:call-template name="buildCheckboxList"> 
    2692                                     <xsl:with-param name="current">1</xsl:with-param> 
    2693                                     <xsl:with-param name="end">31</xsl:with-param> 
    2694                                     <xsl:with-param name="name">yearMonthDayBoxes</xsl:with-param> 
    2695                                   </xsl:call-template> 
    2696                                 </div> 
    2697                               </p> 
    2698                               <p> 
    2699                                 <input type="checkbox" name="swapYearWeeksCheckBoxList" value="" onclick="swapVisible(this,'yearWeeksCheckBoxList')"/> 
    2700                                 in these weeks of the year:<br/> 
    2701                                 <div id="yearWeeksCheckBoxList" class="invisible"> 
    2702                                   <xsl:call-template name="buildCheckboxList"> 
    2703                                     <xsl:with-param name="current">1</xsl:with-param> 
    2704                                     <xsl:with-param name="end">53</xsl:with-param> 
    2705                                     <xsl:with-param name="name">yearWeekBoxes</xsl:with-param> 
    2706                                   </xsl:call-template> 
    2707                                 </div> 
    2708                               </p> 
    2709                               <p> 
    2710                                 <input type="checkbox" name="swapYearDaysCheckBoxList" value="" onclick="swapVisible(this,'yearDaysCheckBoxList')"/> 
    2711                                 on these days of the year:<br/> 
    2712                                 <div id="yearDaysCheckBoxList" class="invisible"> 
    2713                                   <xsl:call-template name="buildCheckboxList"> 
    2714                                     <xsl:with-param name="current">1</xsl:with-param> 
    2715                                     <xsl:with-param name="end">366</xsl:with-param> 
    2716                                     <xsl:with-param name="name">yearDayBoxes</xsl:with-param> 
    2717                                   </xsl:call-template> 
    2718                                 </div> 
    2719                               </p> 
    2720                               <p> 
    2721                                 Week start: 
    2722                                 <select name="yearWkst"> 
    2723                                   <xsl:for-each select="/bedework/shortdaynames/val"> 
    2724                                     <xsl:variable name="pos" select="position()"/> 
    2725                                     <option> 
    2726                                       <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 
    2727                                       <xsl:value-of select="."/> 
    2728                                     </option> 
    2729                                   </xsl:for-each> 
    2730                                 </select> 
    2731                               </p> 
    2732                             </div> 
    2733                           </span> 
    2734                         </td> 
    2735                       </tr> 
    2736                       <!-- recurrence count, until, forever --> 
    2737                       <tr> 
    2738                         <td class="recurrenceUntil"> 
    2739                            <div id="recurrenceUntilRules" class="invisible"> 
    2740                              <strong>Repeat:</strong> 
    2741                              <p> 
    2742                                <div class="dateFields"> 
    2743                                  <input type="radio" name="recurCountUntil" value="until" id="recurUntil"> 
    2744                                    <xsl:if test="form/recurring/until"> 
    2745                                      <xsl:attribute name="checked">checked</xsl:attribute> 
    2746                                    </xsl:if> 
    2747                                  </input> 
    2748                                  until 
    2749                                  <select name="untilMonth" onfocus="selectRecurCountUntil('recurUntil')"> 
    2750                                    <xsl:for-each select="form/start/month/select/option"> 
    2751                                      <xsl:copy-of select="."/> 
    2752                                    </xsl:for-each> 
    2753                                  </select> 
    2754                                  <select name="untilDay" onfocus="selectRecurCountUntil('recurUntil')"> 
    2755                                    <xsl:for-each select="form/start/day/select/option"> 
    2756                                      <xsl:copy-of select="."/> 
    2757                                    </xsl:for-each> 
    2758                                  </select> 
    2759                                  <xsl:choose> 
    2760                                    <xsl:when test="/bedework/creating = 'true'"> 
    2761                                      <select name="untilYear" onfocus="selectRecurCountUntil('recurUntil')"> 
    2762                                        <xsl:for-each select="form/start/year/select/option"> 
    2763                                          <xsl:copy-of select="."/> 
    2764                                        </xsl:for-each> 
    2765                                      </select> 
    2766                                    </xsl:when> 
    2767                                    <xsl:otherwise> 
    2768                                      <input type="text" name="untilYear" size="4"  onfocus="selectRecurCountUntil('recurUntil')"> 
    2769                                        <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute> 
    2770                                      </input> 
    2771                                    </xsl:otherwise> 
    2772                                  </xsl:choose> 
    2773                                </div> 
    2774                                <script language="JavaScript" type="text/javascript"> 
    2775                                <xsl:comment> 
    2776                                  untilDateDynCalWidget = new dynCalendar('untilDateDynCalWidget', <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)"/>, 'untilDateCalWidgetCallback',false,'<xsl:value-of select="$resourcesRoot"/>/resources/'); 
    2777                                </xsl:comment> 
    2778                                </script> 
    2779                              </p> 
    2780                              <p> 
    2781                                <input type="radio" name="recurCountUntil" value="forever"> 
    2782                                  <xsl:if test="not(form/recurring) or form/recurring/count = '-1'"> 
    2783                                    <xsl:attribute name="checked">checked</xsl:attribute> 
    2784                                  </xsl:if> 
    2785                                </input> 
    2786                                forever 
    2787                                &#160; 
    2788                                <input type="radio" name="recurCountUntil" value="count" id="recurCount"> 
    2789                                  <xsl:if test="form/recurring/count != '-1'"> 
    2790                                    <xsl:attribute name="checked">checked</xsl:attribute> 
    2791                                  </xsl:if> 
    2792                                </input> 
    2793                                <input type="text" value="1" size="2" name="countHolder"  onfocus="selectRecurCountUntil('recurCount')"> 
    2794                                  <xsl:if test="form/recurring/count and form/recurring/count != '-1'"> 
    2795                                    <xsl:attribute name="value"><xsl:value-of select="form/recurring/count"/></xsl:attribute> 
    2796                                  </xsl:if> 
    2797                                </input> 
    2798                                times 
    2799                              </p> 
    2800                            </div> 
    2801                         </td> 
    2802                       </tr> 
    2803                     </table> 
    2804                   </div> 
    2805  
    2806                   <!-- recurrence dates (rdates) --> 
    2807                   <div id="recurrenceDatesButton"> 
    2808                     <input type="button" value="add/remove recurrence dates" action="" class="small"/> 
    2809                   </div> 
    2810                 </xsl:otherwise> 
    2811               </xsl:choose> 
    2812           </td> 
    2813         </tr> 
    2814         <tr> 
    2815           <td class="submit" colspan="2"> 
    2816             <input name="submit" type="submit" value="save event"/>&#160; 
    2817             <input name="cancelled" type="submit" value="cancel"/> 
    2818             <xsl:if test="/bedework/creating != 'true'"> 
    2819               <input type="button" value="go to view" onclick="location.replace('{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}')"/> 
    2820             </xsl:if> 
    2821           </td> 
    2822         </tr> 
    2823       </table> 
     2792                </td> 
     2793              </tr> 
     2794            </table> 
     2795          </div> 
     2796        </xsl:otherwise> 
     2797      </xsl:choose> 
     2798      <div id="recurrenceUiSwitch"> 
     2799        <input type="checkbox" name="recurrenceUiSwitch" value="simple" onchange="swapVisible(this,'advancedRecurrenceRules')"/> 
     2800        show advanced recurrence rules 
     2801      </div> 
     2802      <!-- recurrence dates (rdates) --> 
     2803      <div id="recurrenceDatesButton"> 
     2804        <input type="button" value="add/remove recurrence dates" class="small"/> 
     2805      </div> 
     2806    </div> 
     2807    <div class="eventSubmitButtons"> 
     2808      <input name="submit" type="submit" value="save event"/> 
     2809      <input name="cancelled" type="submit" value="cancel"/> 
    28242810    </div> 
    28252811  </xsl:template> 
     
    29272913           used with resources/bwClock.js and resources/bwClock.css --> 
    29282914      <div id="bwClockClock"> 
    2929         <img id="clockMap" src="{$resourcesRoot}/resources/clockMap.gif" width="368" height="368" border="0" alt="" usemap="#bwClockMap" /> 
     2915        <img id="clockMap" src="{$resourcesRoot}/resources/clockMap.gif" width="368" height="368" border="0" alt="bwClock" usemap="#bwClockMap" /> 
    29302916      </div> 
    29312917      <div id="bwClockCover"> 
     2918        &#160; 
    29322919        <!-- this is a special effect div used simply to cover the pixelated edge 
    29332920             where the clock meets the clock box title --> 
     
    29422929        <div id="bwClockTime"> 
    29432930          select time 
     2931        </div> 
     2932        <div id="bwClockSwitch"> 
     2933          switch 
    29442934        </div> 
    29452935        <div id="bwClockCloseText"> 
     
    31023092  <xsl:template match="event" mode="addEventRef"> 
    31033093  <!-- The name "eventForm" is referenced by several javascript functions. Do not 
    3104     change it without modifying includes.js --> 
     3094    change it without modifying bedework.js --> 
    31053095    <form name="eventForm" method="post" action="{$event-addEventRefComplete}" id="standardForm"  enctype="multipart/form-data"> 
    31063096      <xsl:variable name="subscriptionId" select="subscription/id"/> 
     
    33563346              <td> 
    33573347                <textarea name="categoryDesc.value" rows="3" cols="60"> 
     3348                  <xsl:text> </xsl:text> 
    33583349                </textarea> 
    33593350              </td> 
     
    33943385                <textarea name="categoryDesc.value" rows="3" cols="60"> 
    33953386                  <xsl:value-of select="normalize-space(/bedework/currentCategory/category/desc)"/> 
     3387                  <xsl:if test="normalize-space(/bedework/currentCategory/category/desc/textarea) = ''"> 
     3388                    <xsl:text> </xsl:text> 
     3389                    <!-- keep this space to avoid browser 
     3390                    rendering errors when the text area is empty --> 
     3391                  </xsl:if> 
    33963392                </textarea> 
    33973393              </td> 
     
    37363732            <textarea name="calendar.description" cols="40" rows="4"> 
    37373733              <xsl:value-of select="desc"/> 
     3734              <xsl:if test="normalize-space(desc) = ''"> 
     3735                <xsl:text> </xsl:text> 
     3736                <!-- keep this non-breaking space to avoid browser 
     3737                rendering errors when the text area is empty --> 
     3738              </xsl:if> 
    37383739            </textarea> 
    37393740          </td> 
     
    38083809            <textarea name="calendar.description" cols="40" rows="4"> 
    38093810              <xsl:value-of select="desc"/> 
     3811              <xsl:if test="normalize-space(desc) = ''"> 
     3812                <xsl:text> </xsl:text> 
     3813                <!-- keep this non-breaking space to avoid browser 
     3814                rendering errors when the text area is empty --> 
     3815              </xsl:if> 
    38103816            </textarea> 
    38113817          </td> 
     
    41274133                    <li class="folder"> 
    41284134                      <xsl:value-of select="name"/>: 
    4129                       <ul> 
    4130                         <xsl:for-each select="calendars//calendar[calendarCollection='true']"> 
    4131                           <li class="calendar"> 
    4132                             <xsl:variable name="calPath" select="path"/> 
    4133                             <xsl:variable name="name" select="name"/> 
    4134                             <a href="javascript:exportCalendar('exportCalendarForm','{$name}','{$calPath}')"> 
    4135                               <xsl:value-of select="name"/> 
    4136                             </a> 
    4137                           </li> 
    4138                         </xsl:for-each> 
    4139                       </ul> 
     4135                      <xsl:if test="calendars//calendar[calendarCollection='true']"> 
     4136                        <ul> 
     4137                          <xsl:for-each select="calendars//calendar[calendarCollection='true']"> 
     4138                            <li class="calendar"> 
     4139                              <xsl:variable name="calPath" select="path"/> 
     4140                              <xsl:variable name="name" select="name"/> 
     4141                              <a href="javascript:exportCalendar('exportCalendarForm','{$name}','{$calPath}')"> 
     4142                                <xsl:value-of select="name"/> 
     4143                              </a> 
     4144                            </li> 
     4145                          </xsl:for-each> 
     4146                        </ul> 
     4147                      </xsl:if> 
    41404148                    </li> 
    41414149                  </xsl:otherwise> 
     
    42304238    <h3>Add Subscription to User Calendar</h3> 
    42314239    <p class="note">*the subsciption name must be unique</p> 
    4232     <form name="subscribeForm" action="{$subscriptions-initAdd}" onsubmit="return setSubscriptionUri(this)" method="post"> 
     4240    <form name="subscribeForm" action="{$subscriptions-initAdd}" onsubmit="return setSubscriptionUri(this,'bwcal:///user/')" method="post"> 
    42334241      <table class="common" cellspacing="0"> 
    42344242        <tr> 
     
    46644672  <xsl:template name="upload"> 
    46654673  <!-- The name "eventForm" is referenced by several javascript functions. Do not 
    4666     change it without modifying includes.js --> 
     4674    change it without modifying bedework.js --> 
    46674675    <form name="eventForm" method="post" action="{$upload}" id="standardForm"  enctype="multipart/form-data"> 
    46684676      <h2>Upload iCAL File</h2> 
     
    47684776      <tr> 
    47694777        <td> 
    4770           <ul> 
    4771             <xsl:for-each select="/bedework/locations/location"> 
    4772               <xsl:sort select="."/> 
    4773               <li> 
    4774                 <xsl:variable name="uid" select="uid"/> 
    4775                 <a href="{$location-fetchForUpdate}&amp;uid={$uid}"><xsl:value-of select="address"/></a> 
    4776               </li> 
    4777             </xsl:for-each> 
    4778           </ul> 
     4778          <xsl:if test="/bedework/locations/location"> 
     4779            <ul> 
     4780              <xsl:for-each select="/bedework/locations/location"> 
     4781                <xsl:sort select="."/> 
     4782                <li> 
     4783                  <xsl:variable name="uid" select="uid"/> 
     4784                  <a href="{$location-fetchForUpdate}&amp;uid={$uid}"><xsl:value-of select="address"/></a> 
     4785                </li> 
     4786              </xsl:for-each> 
     4787            </ul> 
     4788          </xsl:if> 
    47794789        </td> 
    47804790      </tr> 
     
    50025012    <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    50035013    <!-- The name "eventForm" is referenced by several javascript functions. Do not 
    5004     change it without modifying includes.js --> 
     5014    change it without modifying bedework.js --> 
    50055015    <form name="eventForm" method="post" action="{$schedule-attendeeRespond}" id="standardForm"> 
    50065016      <input type="hidden" name="updateEvent" value="true"/> 
     
    50435053          <td class="fieldval scheduleActions"> 
    50445054            <textarea name="comment" cols="60" rows="2"> 
     5055              <xsl:text> </xsl:text> 
    50455056            </textarea> 
    50465057          </td> 
     
    51515162                <xsl:choose> 
    51525163                  <xsl:when test="form/end/type='E'"> 
    5153                     <input type="radio" name="eventEndType" value="E" checked="checked" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
     5164                    <input type="radio" name="eventEndType" value="E" checked="checked" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    51545165                  </xsl:when> 
    51555166                  <xsl:otherwise> 
    5156                     <input type="radio" name="eventEndType" value="E" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
     5167                    <input type="radio" name="eventEndType" value="E" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    51575168                  </xsl:otherwise> 
    51585169                </xsl:choose> 
     
    52005211                  <xsl:choose> 
    52015212                    <xsl:when test="form/end/type='D'"> 
    5202                       <input type="radio" name="eventEndType" value="D" checked="checked" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
     5213                      <input type="radio" name="eventEndType" value="D" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    52035214                    </xsl:when> 
    52045215                    <xsl:otherwise> 
    5205                       <input type="radio" name="eventEndType" value="D" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
     5216                      <input type="radio" name="eventEndType" value="D" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    52065217                    </xsl:otherwise> 
    52075218                  </xsl:choose> 
     
    52395250                          <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/> 
    52405251                          <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 
    5241                           <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="true"/>weeks 
     5252                          <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="disabled"/>weeks 
    52425253                        </div> 
    52435254                      </xsl:when> 
     
    52475258                          <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/> 
    52485259                          <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 
    5249                           <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="true"/>days 
     5260                          <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="disabled"/>days 
    52505261                          <span id="durationHrMin" class="{$durationHrMinClass}"> 
    52515262                            <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 
    5252                             <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="true"/>hours 
     5263                            <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="disabled"/>hours 
    52535264                            <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 
    5254                             <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="true"/>minutes 
     5265                            <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="disabled"/>minutes 
    52555266                          </span> 
    52565267                        </div> 
     
    52685279                  <xsl:choose> 
    52695280                    <xsl:when test="form/end/type='N'"> 
    5270                       <input type="radio" name="eventEndType" value="N" checked="checked" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
     5281                      <input type="radio" name="eventEndType" value="N" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    52715282                    </xsl:when> 
    52725283                    <xsl:otherwise> 
    5273                       <input type="radio" name="eventEndType" value="N" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
     5284                      <input type="radio" name="eventEndType" value="N" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    52745285                    </xsl:otherwise> 
    52755286                  </xsl:choose> 
     
    55765587  <xsl:template match="event" mode="addEventRef"> 
    55775588  <!-- The name "eventForm" is referenced by several javascript functions. Do not 
    5578     change it without modifying includes.js --> 
     5589    change it without modifying bedework.js --> 
    55795590    <form name="eventForm" method="post" action="{$event-addEventRefComplete}" id="standardForm"  enctype="multipart/form-data"> 
    55805591      <xsl:variable name="subscriptionId" select="subscription/id"/> 
     
    56365647    <h2>Manage Preferences</h2> 
    56375648    <ul class="submenu"> 
    5638       <li class="selected">General</li> 
    5639       <li><a href="{$prefs-fetchSchedulingForUpdate}">Scheduling/Meetings</a></li> 
     5649      <li class="selected">general</li> 
     5650      <li><a href="{$prefs-fetchSchedulingForUpdate}">scheduling/meetings</a></li> 
    56405651    </ul> 
    56415652    <!-- The name "eventForm" is referenced by several javascript functions. Do not 
    5642     change it without modifying includes.js --> 
    5643     <form name="eventForm" method="post" action="{$prefs-update}" onSubmit="setWorkDays(this)"> 
     5653    change it without modifying bedework.js --> 
     5654    <form name="eventForm" method="post" action="{$prefs-update}" onsubmit="setWorkDays(this)"> 
    56445655      <table class="common"> 
    56455656        <tr><td colspan="2" class="fill">User settings:</td></tr> 
     
    59565967    <h2>Manage Preferences</h2> 
    59575968    <ul class="submenu"> 
    5958       <li><a href="{$prefs-fetchForUpdate}">General</a></li> 
    5959       <li class="selected"><a href="">Scheduling/Meetings</a></li> 
     5969      <li><a href="{$prefs-fetchForUpdate}">general</a></li> 
     5970      <li class="selected">scheduling/meetings</li> 
    59605971    </ul> 
    59615972 
     
    59695980            <form name="prefsSetAccess1" method="post" action="{$prefs-setAccess}" onsubmit="setScheduleHow(this)"> 
    59705981              <xsl:call-template name="schedulingAccessForm"/> 
     5982              <input type="hidden" name="what" value="in"/> 
    59715983            </form> 
    59725984            <xsl:apply-templates select="inbox/acl" mode="currentAccess"> 
     
    59785990            <form name="prefsSetAccess2" method="post" action="{$prefs-setAccess}" onsubmit="setScheduleHow(this)"> 
    59795991              <xsl:call-template name="schedulingAccessForm"/> 
     5992              <input type="hidden" name="what" value="out"/> 
    59805993            </form> 
    59815994            <xsl:apply-templates select="outbox/acl" mode="currentAccess"> 
     
    60216034  <!--==== ACCESS CONTROL TEMPLATES ====--> 
    60226035 
     6036  <xsl:template name="eventAccessForm"> 
     6037    <xsl:variable name="calPathEncoded" select="form/calendar/encodedPath"/> 
     6038    <xsl:variable name="calPath" select="form/calendar/path"/> 
     6039    <xsl:variable name="guid" select="guid"/> 
     6040    <xsl:variable name="recurrenceId" select="recurrenceId"/> 
     6041    <div id="bwEventTab-Access" class="invisible"> 
     6042      <div id="sharingBox"> 
     6043        <xsl:apply-templates select="/bedework/access/acl" mode="currentAccess"> 
     6044          <xsl:with-param name="action" select="$event-setAccess"/> 
     6045          <xsl:with-param name="calPathEncoded" select="$calPathEncoded"/> 
     6046          <xsl:with-param name="guid" select="$guid"/> 
     6047          <xsl:with-param name="recurrenceId" select="$recurrenceId"/> 
     6048        </xsl:apply-templates> 
     6049        <form name="eventShareForm" action="{$event-setAccess}" id="shareForm"> 
     6050          <input type="hidden" name="calPath" value="{$calPath}"/> 
     6051          <input type="hidden" name="guid" value="{$guid}"/> 
     6052          <input type="hidden" name="recurid" value="{$recurrenceId}"/> 
     6053          <xsl:call-template name="entityAccessForm"/> 
     6054        </form> 
     6055      </div> 
     6056    </div> 
     6057  </xsl:template> 
     6058 
    60236059  <xsl:template name="schedulingAccessForm"> 
    6024     <input type="hidden" name="what" value="out"/> 
    60256060    <p> 
    60266061      <input type="text" name="who" width="40"/> 
     
    64396474          <!--<form name="skinSelectForm" method="post" action="{$setup}"> 
    64406475            skin selector: 
    6441             <select name="skinNameSticky" onChange="submit()"> 
     6476            <select name="skinNameSticky" onchange="submit()"> 
    64426477              <option>select a skin</option> 
    64436478              <option value="default">Demo Calendar</option>