Changeset 1595

Show
Ignore:
Timestamp:
10/29/07 17:36:57
Author:
johnsa
Message:

websubmit: putting simple user interface in place

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/websubmit/webapp/resources/demoskins/default/default/default.css

    r1594 r1595  
     1body { 
     2  /* removed for portals */ 
     3  margin: 0; 
     4  padding: 0; 
     5} 
     6 
    17#bedework { 
    28  /* this is the main wrapper div used to encapsulate all Bedework CSS; we 
     
    612  font-family : Arial, Helvetica, sans-serif; 
    713  font-size: 100%; /* to make IE behave */ 
    8   background-color : white; 
    9   color : black; 
    10   padding: 0.75em 1em 0em 1em; 
    11   margin: 0; 
     14  background-color: white; 
     15  color: black; 
     16  padding: 2em 2em 0em 2em; 
     17  margin: 0; 
     18  min-width: 835px; 
    1219} 
    1320/* Generic selectors*/ 
     
    1724  font-size: 1.3em; 
    1825} 
    19 #bedework #bodyBlock h2 { 
    20   color: black; 
    21   background: #f5f5f5; 
    22 } 
    2326#bedework h2 a:link, 
    2427#bedework h2 a:active, 
     
    6568#bedework #headBar { 
    6669  position: relative; 
    67   text-align: right; 
    68   vertical-align: bottom; 
    6970  clear: right; 
    70   height: 80px; 
    7171  padding: 0em; 
    7272  margin: 0em; 
     
    7474#bedework #logo { 
    7575  position: absolute; 
    76   left: 0; 
    77   bottom: 0; 
    78   padding: 0 0 2px 5px; 
    79   margin: 0; 
    80 } 
    81 #bedework #headBar #title { 
    82   position: absolute; 
    8376  right: 0; 
    84   bottom: 0; 
     77  bottom: -10px; 
     78  padding: 0 5px 0 0; 
     79  margin: 0; 
    8580} 
    8681#bedework #headBar h2 { 
     
    124119} 
    125120#bedework #bodyContent { 
     121  position: relative; 
    126122  margin: 0; 
    127123  padding:  2em; 
     
    180176#bedework #eventFormTabs { 
    181177} 
     178#bedework .instructions { 
     179  position: absolute; 
     180  right: 1em; 
     181  top: 1em; 
     182  padding: 0.5em; 
     183  margin: 0; 
     184  border: 1px solid #ccc; 
     185  background-color: #ffe; 
     186  width: 300px; 
     187  font-size: 0.9em; 
     188  text-align: right; 
     189} 
    182190#bedework ul.submenu { 
    183191  margin: 0; 
     
    188196#bedework ul.submenu li { 
    189197  display: inline; 
    190   margin: 0 2px 0 0; 
     198  margin: 0 4px 0 0; 
    191199  padding: 0 1em 0 1em; 
    192200  border-left: 1px solid #ccc; 
     
    217225  color: black; 
    218226  background-color: white; 
     227} 
     228#bedework #eventFormContent { 
     229  margin: 0; 
     230  padding: 1em; 
     231  border-left: 1px solid #ccc; 
     232  border-right: 1px solid #ccc; 
     233  border-bottom: 1px solid #ccc; 
    219234} 
    220235#bedework #standardForm { 
     
    266281  margin: 0px; 
    267282  padding: 0px; 
    268   border-left: 1px solid #ccc; 
    269   border-right: 1px solid #ccc; 
    270   border-bottom: 1px solid #ccc; 
    271283} 
    272284#bedework table.common th { 
  • trunk/deployment/websubmit/webapp/resources/demoskins/default/default/default.xsl

    r1594 r1595  
    256256      <!-- event info for edit event --> 
    257257      <xsl:if test="/bedework/creating != 'true'"> 
     258 
    258259        <table class="common" cellspacing="0"> 
    259260          <tr> 
     
    313314      <ul id="eventFormTabs" class="submenu"> 
    314315        <li class="selected"> 
    315           <a href="javascript:setTab('eventFormTabs',0); show('bwEventTab-Basic'); hide('bwEventTab-Details','bwEventTab-Location','bwEventTab-Categories','bwEventTab-Contact');"> 
    316             basic 
     316          <a href="javascript:setTab('eventFormTabs',0); show('bwEventTab-Details'); hide('bwEventTab-Location','bwEventTab-Categories','bwEventTab-Contact');"> 
     317            1. details 
    317318          </a> 
    318319        </li> 
    319320        <li> 
    320           <a href="javascript:setTab('eventFormTabs',1); show('bwEventTab-Details'); hide('bwEventTab-Basic','bwEventTab-Location','bwEventTab-Categories','bwEventTab-Contact');"> 
    321             details 
     321          <a href="javascript:setTab('eventFormTabs',1); show('bwEventTab-Location'); hide('bwEventTab-Details','bwEventTab-Categories','bwEventTab-Contact');"> 
     322            2. location 
    322323          </a> 
    323324        </li> 
    324325        <li> 
    325           <a href="javascript:setTab('eventFormTabs',2); show('bwEventTab-Location'); hide('bwEventTab-Details','bwEventTab-Basic','bwEventTab-Categories','bwEventTab-Contact');"> 
    326             location 
     326          <a href="javascript:setTab('eventFormTabs',2); show('bwEventTab-Contact'); hide('bwEventTab-Details','bwEventTab-Location','bwEventTab-Categories');"> 
     327            3. contact 
    327328          </a> 
    328329        </li> 
    329330        <li> 
    330           <a href="javascript:setTab('eventFormTabs',3); show('bwEventTab-Contact'); hide('bwEventTab-Basic','bwEventTab-Details','bwEventTab-Location','bwEventTab-Categories');"> 
    331             contact 
    332           </a> 
    333         </li> 
    334         <li> 
    335           <a href="javascript:setTab('eventFormTabs',4); show('bwEventTab-Categories'); hide('bwEventTab-Details','bwEventTab-Basic','bwEventTab-Location','bwEventTab-Contact');"> 
    336             categories 
     331          <a href="javascript:setTab('eventFormTabs',3); show('bwEventTab-Categories'); hide('bwEventTab-Details','bwEventTab-Location','bwEventTab-Contact');"> 
     332            4. categories 
    337333          </a> 
    338334        </li> 
    339335      </ul> 
    340336 
    341     <!-- Basic tab --> 
    342     <!-- ============== --> 
    343     <!-- this tab is visible by default --> 
    344     <div id="bwEventTab-Basic"> 
    345       <!--  For now, hard code the path to the submissions calendar --> 
    346       <input type="hidden" name="newCalPath" value="/public/unbrowseable/submissions/submissions"/> 
    347       <table cellspacing="0" class="common"> 
    348         <!--  and hide calendar selection code; 
    349         <tr> 
    350           <td class="fieldname"> 
    351             Calendar: 
    352           </td> 
    353           <td class="fieldval"> 
    354             // the string "user/" should not be hard coded; fix this 
    355             <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/></xsl:variable> 
    356             <xsl:variable name="writableCalendars"> 
    357               <xsl:value-of select=" 
    358                 count(/bedework/myCalendars//calendar[calType = '1' and 
    359                        currentAccess/current-user-privilege-set/privilege/write-content]) + 
    360                 count(/bedework/mySubscriptions//calendar[calType = '1' and 
    361                        currentAccess/current-user-privilege-set/privilege/write-content and 
    362                        (not(contains(path,$userPath)))])"/> 
    363             </xsl:variable> 
    364             <xsl:choose> 
    365               <xsl:when test="$writableCalendars = 1"> 
    366                 // there is only 1 writable calendar, so find it by looking down both trees at once 
    367                 <xsl:variable name="newCalPath"><xsl:value-of select="/bedework/myCalendars//calendar[calType = '1' and 
    368                          currentAccess/current-user-privilege-set/privilege/write-content]/path"/><xsl:value-of select="/bedework/mySubscriptions//calendar[calType = '1' and 
    369                        currentAccess/current-user-privilege-set/privilege/write-content and 
    370                        (not(contains(path,$userPath)))]/path"/></xsl:variable> 
    371  
    372                 <input type="hidden" name="newCalPath" value="{$newCalPath}"/> 
    373  
    374                 <xsl:variable name="userFullPath"><xsl:value-of select="$userPath"/>/</xsl:variable> 
    375                 <span id="bwEventCalDisplay"> 
    376                   <xsl:choose> 
    377                     <xsl:when test="contains($newCalPath,$userFullPath)"> 
    378                       <xsl:value-of select="substring-after($newCalPath,$userFullPath)"/> 
    379                     </xsl:when> 
    380                     <xsl:otherwise> 
    381                       <xsl:value-of select="$newCalPath"/> 
    382                     </xsl:otherwise> 
    383                   </xsl:choose> 
    384                 </span> 
    385               </xsl:when> 
    386               <xsl:otherwise> 
    387                 <input type="hidden" name="newCalPath" id="bwNewCalPathField"> 
    388                   <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> 
    389                 </input> 
    390  
    391                 <xsl:variable name="userFullPath"><xsl:value-of select="$userPath"/>/</xsl:variable> 
    392                 <span id="bwEventCalDisplay"> 
    393                   <xsl:choose> 
    394                     <xsl:when test="contains(form/calendar/path,$userFullPath)"> 
    395                       <xsl:value-of select="substring-after(form/calendar/path,$userFullPath)"/> 
    396                     </xsl:when> 
    397                     <xsl:otherwise> 
    398                       <xsl:value-of select="form/calendar/path"/> 
    399                     </xsl:otherwise> 
    400                   </xsl:choose> 
    401                   <xsl:text> </xsl:text> 
    402                   // this final text element is required to avoid an empty 
    403                        span element which is improperly rendered in the browser 
    404                 </span> 
    405  
    406               </xsl:otherwise> 
    407             </xsl:choose> 
    408           </td> 
    409         </tr> 
    410         --> 
    411         <!--  Summary (title) of event  --> 
    412         <tr> 
    413           <td class="fieldname"> 
    414             Title: 
    415           </td> 
    416           <td class="fieldval"> 
    417             <xsl:variable name="title" select="form/title/input/@value"/> 
    418             <input type="text" name="summary" size="80" value="{$title}" id="bwEventTitle"/> 
    419           </td> 
    420         </tr> 
    421  
    422         <!--  Date and Time --> 
    423         <!--  ============= --> 
    424         <tr> 
    425           <td class="fieldname"> 
    426             Date &amp; Time: 
    427           </td> 
    428           <td class="fieldval"> 
    429             <!-- Set the timefields class for the first load of the page; 
    430                  subsequent changes will take place using javascript without a 
    431                  page reload. --> 
    432             <xsl:variable name="timeFieldsClass"> 
     337    <div id="eventFormContent"> 
     338      <!-- Basic tab --> 
     339      <!-- ============== --> 
     340      <!-- this tab is visible by default --> 
     341      <div id="bwEventTab-Details"> 
     342        <div class="instructions"> 
     343          <strong>Step 1:</strong> Enter your basic event information.<br/> 
     344          <a href="javascript:setTab('eventFormTabs',1); show('bwEventTab-Location'); hide('bwEventTab-Details','bwEventTab-Categories','bwEventTab-Contact');"> 
     345            next&gt; 
     346          </a> 
     347        </div> 
     348        <!--  For now, hard code the path to the submissions calendar --> 
     349        <input type="hidden" name="newCalPath" value="/public/unbrowsable/submissions/submissions"/> 
     350        <table cellspacing="0" class="common"> 
     351          <!--  and hide calendar selection code; 
     352          <tr> 
     353            <td class="fieldname"> 
     354              Calendar: 
     355            </td> 
     356            <td class="fieldval"> 
     357              // the string "user/" should not be hard coded; fix this 
     358              <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/></xsl:variable> 
     359              <xsl:variable name="writableCalendars"> 
     360                <xsl:value-of select=" 
     361                  count(/bedework/myCalendars//calendar[calType = '1' and 
     362                         currentAccess/current-user-privilege-set/privilege/write-content]) + 
     363                  count(/bedework/mySubscriptions//calendar[calType = '1' and 
     364                         currentAccess/current-user-privilege-set/privilege/write-content and 
     365                         (not(contains(path,$userPath)))])"/> 
     366              </xsl:variable> 
    433367              <xsl:choose> 
    434                 <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 
    435                 <xsl:otherwise>timeFields</xsl:otherwise> 
    436               </xsl:choose> 
    437             </xsl:variable> 
    438  
    439             <!-- date only event: anniversary event - often interpreted as "all day event" --> 
    440             <xsl:choose> 
    441               <xsl:when test="form/allDay/input/@checked='checked'"> 
    442                 <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/> 
    443                 <input type="hidden" name="eventStartDate.dateOnly" value="true" id="allDayStartDateField"/> 
    444                 <input type="hidden" name="eventEndDate.dateOnly" value="true" id="allDayEndDateField"/> 
    445               </xsl:when> 
    446               <xsl:otherwise> 
    447                 <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/> 
    448                 <input type="hidden" name="eventStartDate.dateOnly" value="false" id="allDayStartDateField"/> 
    449                 <input type="hidden" name="eventEndDate.dateOnly" value="false" id="allDayEndDateField"/> 
    450               </xsl:otherwise> 
    451             </xsl:choose> 
    452             all day 
    453  
    454             <!-- HIDE floating event: no timezone (and not UTC) 
    455             <xsl:choose> 
    456               <xsl:when test="form/floating/input/@checked='checked'"> 
    457                 <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="on" checked="checked"/> 
    458                 <input type="hidden" name="eventStartDate.floating" value="true" id="startFloating"/> 
    459                 <input type="hidden" name="eventEndDate.floating" value="true" id="endFloating"/> 
    460               </xsl:when> 
    461               <xsl:otherwise> 
    462                 <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="off"/> 
    463                 <input type="hidden" name="eventStartDate.floating" value="false" id="startFloating"/> 
    464                 <input type="hidden" name="eventEndDate.floating" value="false" id="endFloating"/> 
    465               </xsl:otherwise> 
    466             </xsl:choose> 
    467             floating --> 
    468  
    469             <!-- HIDE store time as coordinated universal time (UTC) 
    470             <xsl:choose> 
    471               <xsl:when test="form/storeUTC/input/@checked='checked'"> 
    472                 <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="on" checked="checked"/> 
    473                 <input type="hidden" name="eventStartDate.storeUTC" value="true" id="startStoreUTC"/> 
    474                 <input type="hidden" name="eventEndDate.storeUTC" value="true" id="endStoreUTC"/> 
    475               </xsl:when> 
    476               <xsl:otherwise> 
    477                 <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="off"/> 
    478                 <input type="hidden" name="eventStartDate.storeUTC" value="false" id="startStoreUTC"/> 
    479                 <input type="hidden" name="eventEndDate.storeUTC" value="false" id="endStoreUTC"/> 
    480               </xsl:otherwise> 
    481             </xsl:choose> 
    482             store as UTC--> 
    483  
    484             <br/> 
    485             <div class="dateStartEndBox"> 
    486               <strong>Start:</strong> 
    487               <div class="dateFields"> 
    488                 <span class="startDateLabel">Date </span> 
    489                 <xsl:choose> 
    490                   <xsl:when test="$portalFriendly = 'true'"> 
    491                     <xsl:copy-of select="/bedework/formElements/form/start/month/*"/> 
    492                     <xsl:copy-of select="/bedework/formElements/form/start/day/*"/> 
     368                <xsl:when test="$writableCalendars = 1"> 
     369                  // there is only 1 writable calendar, so find it by looking down both trees at once 
     370                  <xsl:variable name="newCalPath"><xsl:value-of select="/bedework/myCalendars//calendar[calType = '1' and 
     371                           currentAccess/current-user-privilege-set/privilege/write-content]/path"/><xsl:value-of select="/bedework/mySubscriptions//calendar[calType = '1' and 
     372                         currentAccess/current-user-privilege-set/privilege/write-content and 
     373                         (not(contains(path,$userPath)))]/path"/></xsl:variable> 
     374 
     375                  <input type="hidden" name="newCalPath" value="{$newCalPath}"/> 
     376 
     377                  <xsl:variable name="userFullPath"><xsl:value-of select="$userPath"/>/</xsl:variable> 
     378                  <span id="bwEventCalDisplay"> 
    493379                    <xsl:choose> 
    494                       <xsl:when test="/bedework/creating = 'true'"> 
    495                         <xsl:copy-of select="/bedework/formElements/form/start/year/*"/> 
     380                      <xsl:when test="contains($newCalPath,$userFullPath)"> 
     381                        <xsl:value-of select="substring-after($newCalPath,$userFullPath)"/> 
    496382                      </xsl:when> 
    497383                      <xsl:otherwise> 
    498                         <xsl:copy-of select="/bedework/formElements/form/start/yearText/*"/> 
     384                        <xsl:value-of select="$newCalPath"/> 
    499385                      </xsl:otherwise> 
    500386                    </xsl:choose> 
    501                     <script language="JavaScript" type="text/javascript"> 
    502                       <xsl:comment> 
    503                       startDateDynCalWidget = new dynCalendar('startDateDynCalWidget', <xsl:value-of select="number(/bedework/formElements/form/start/yearText/input/@value)"/>, <xsl:value-of select="number(/bedework/formElements/form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(/bedework/formElements/form/start/day/select/option[@selected='selected']/@value)"/>, 'startDateCalWidgetCallback', '<xsl:value-of select="$resourcesRoot"/>/resources/'); 
    504                       </xsl:comment> 
    505                     </script> 
    506                   </xsl:when> 
    507                   <xsl:otherwise> 
    508                     <span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetStartDate" iconURL="{$resourcesRoot}/resources/calIcon.gif"> 
    509                       <xsl:attribute name="value"><xsl:value-of select="form/start/rfc3339DateTime"/></xsl:attribute> 
    510                       <xsl:text> </xsl:text> 
    511                     </span> 
    512                     <input type="hidden" name="eventStartDate.year"> 
    513                       <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute> 
    514                     </input> 
    515                     <input type="hidden" name="eventStartDate.month"> 
    516                       <xsl:attribute name="value"><xsl:value-of select="form/start/month/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
    517                     </input> 
    518                     <input type="hidden" name="eventStartDate.day"> 
    519                       <xsl:attribute name="value"><xsl:value-of select="form/start/day/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
    520                     </input> 
    521                   </xsl:otherwise> 
    522                 </xsl:choose> 
    523               </div> 
    524               <div class="{$timeFieldsClass}" id="startTimeFields"> 
    525                 <span id="calWidgetStartTimeHider" class="show"> 
    526                   <xsl:copy-of select="form/start/hour/*"/> 
    527                   <xsl:copy-of select="form/start/minute/*"/> 
    528                   <xsl:if test="form/start/ampm"> 
    529                     <xsl:copy-of select="form/start/ampm/*"/> 
    530                   </xsl:if> 
    531                   <xsl:text> </xsl:text> 
    532                   <a href="javascript:bwClockLaunch('eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0" alt="bwClock"/></a> 
    533  
    534                   <select name="eventStartDate.tzid" id="startTzid" class="timezones"> 
    535                     <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if> 
    536                     <option value="-1">select timezone...</option> 
    537                     <xsl:variable name="startTzId" select="form/start/tzid"/> 
    538                     <xsl:for-each select="/bedework/timezones/timezone"> 
    539                       <option> 
    540                         <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> 
    541                         <xsl:if test="$startTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
    542                         <xsl:value-of select="name"/> 
    543                       </option> 
    544                     </xsl:for-each> 
    545                   </select> 
    546                 </span> 
    547               </div> 
    548             </div> 
    549             <div class="dateStartEndBox"> 
    550               <strong> 
    551                 <xsl:choose> 
    552                   <xsl:when test="form/entityType = '2'">Due:</xsl:when> 
    553                   <xsl:otherwise>End:</xsl:otherwise> 
    554                 </xsl:choose> 
    555               </strong> 
    556               <xsl:choose> 
    557                 <xsl:when test="form/end/type='E'"> 
    558                   <input type="radio" name="eventEndType" value="E" checked="checked" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
     387                  </span> 
    559388                </xsl:when> 
    560389                <xsl:otherwise> 
    561                   <input type="radio" name="eventEndType" value="E" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
     390                  <input type="hidden" name="newCalPath" id="bwNewCalPathField"> 
     391                    <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> 
     392                  </input> 
     393 
     394                  <xsl:variable name="userFullPath"><xsl:value-of select="$userPath"/>/</xsl:variable> 
     395                  <span id="bwEventCalDisplay"> 
     396                    <xsl:choose> 
     397                      <xsl:when test="contains(form/calendar/path,$userFullPath)"> 
     398                        <xsl:value-of select="substring-after(form/calendar/path,$userFullPath)"/> 
     399                      </xsl:when> 
     400                      <xsl:otherwise> 
     401                        <xsl:value-of select="form/calendar/path"/> 
     402                      </xsl:otherwise> 
     403                    </xsl:choose> 
     404                    <xsl:text> </xsl:text> 
     405                    // this final text element is required to avoid an empty 
     406                         span element which is improperly rendered in the browser 
     407                  </span> 
     408 
    562409                </xsl:otherwise> 
    563410              </xsl:choose> 
    564               Date 
    565               <xsl:variable name="endDateTimeClass"> 
     411            </td> 
     412          </tr> 
     413          --> 
     414          <!--  Summary (title) of event  --> 
     415          <tr> 
     416            <td class="fieldname"> 
     417              Title: 
     418            </td> 
     419            <td class="fieldval"> 
     420              <xsl:variable name="title" select="form/title/input/@value"/> 
     421              <input type="text" name="summary" size="80" value="{$title}" id="bwEventTitle"/> 
     422            </td> 
     423          </tr> 
     424 
     425          <!--  Date and Time --> 
     426          <!--  ============= --> 
     427          <tr> 
     428            <td class="fieldname"> 
     429              Date &amp; Time: 
     430            </td> 
     431            <td class="fieldval"> 
     432              <!-- Set the timefields class for the first load of the page; 
     433                   subsequent changes will take place using javascript without a 
     434                   page reload. --> 
     435              <xsl:variable name="timeFieldsClass"> 
    566436                <xsl:choose> 
    567                   <xsl:when test="form/end/type='E'">shown</xsl:when> 
    568                   <xsl:otherwise>invisible</xsl:otherwise> 
     437                  <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 
     438                  <xsl:otherwise>timeFields</xsl:otherwise> 
    569439                </xsl:choose> 
    570440              </xsl:variable> 
    571               <div class="{$endDateTimeClass}" id="endDateTime"> 
     441 
     442              <!-- date only event: anniversary event - often interpreted as "all day event" --> 
     443              <xsl:choose> 
     444                <xsl:when test="form/allDay/input/@checked='checked'"> 
     445                  <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/> 
     446                  <input type="hidden" name="eventStartDate.dateOnly" value="true" id="allDayStartDateField"/> 
     447                  <input type="hidden" name="eventEndDate.dateOnly" value="true" id="allDayEndDateField"/> 
     448                </xsl:when> 
     449                <xsl:otherwise> 
     450                  <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/> 
     451                  <input type="hidden" name="eventStartDate.dateOnly" value="false" id="allDayStartDateField"/> 
     452                  <input type="hidden" name="eventEndDate.dateOnly" value="false" id="allDayEndDateField"/> 
     453                </xsl:otherwise> 
     454              </xsl:choose> 
     455              all day 
     456 
     457              <!-- HIDE floating event: no timezone (and not UTC) 
     458              <xsl:choose> 
     459                <xsl:when test="form/floating/input/@checked='checked'"> 
     460                  <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="on" checked="checked"/> 
     461                  <input type="hidden" name="eventStartDate.floating" value="true" id="startFloating"/> 
     462                  <input type="hidden" name="eventEndDate.floating" value="true" id="endFloating"/> 
     463                </xsl:when> 
     464                <xsl:otherwise> 
     465                  <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="off"/> 
     466                  <input type="hidden" name="eventStartDate.floating" value="false" id="startFloating"/> 
     467                  <input type="hidden" name="eventEndDate.floating" value="false" id="endFloating"/> 
     468                </xsl:otherwise> 
     469              </xsl:choose> 
     470              floating --> 
     471 
     472              <!-- HIDE store time as coordinated universal time (UTC) 
     473              <xsl:choose> 
     474                <xsl:when test="form/storeUTC/input/@checked='checked'"> 
     475                  <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="on" checked="checked"/> 
     476                  <input type="hidden" name="eventStartDate.storeUTC" value="true" id="startStoreUTC"/> 
     477                  <input type="hidden" name="eventEndDate.storeUTC" value="true" id="endStoreUTC"/> 
     478                </xsl:when> 
     479                <xsl:otherwise> 
     480                  <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="off"/> 
     481                  <input type="hidden" name="eventStartDate.storeUTC" value="false" id="startStoreUTC"/> 
     482                  <input type="hidden" name="eventEndDate.storeUTC" value="false" id="endStoreUTC"/> 
     483                </xsl:otherwise> 
     484              </xsl:choose> 
     485              store as UTC--> 
     486 
     487              <br/> 
     488              <div class="dateStartEndBox"> 
     489                <strong>Start:</strong> 
    572490                <div class="dateFields"> 
     491                  <span class="startDateLabel">Date </span> 
    573492                  <xsl:choose> 
    574493                    <xsl:when test="$portalFriendly = 'true'"> 
    575                       <xsl:copy-of select="/bedework/formElements/form/end/dateTime/month/*"/> 
    576                       <xsl:copy-of select="/bedework/formElements/form/end/dateTime/day/*"/> 
     494                      <xsl:copy-of select="/bedework/formElements/form/start/month/*"/> 
     495                      <xsl:copy-of select="/bedework/formElements/form/start/day/*"/> 
    577496                      <xsl:choose> 
    578497                        <xsl:when test="/bedework/creating = 'true'"> 
    579                           <xsl:copy-of select="/bedework/formElements/form/end/dateTime/year/*"/> 
     498                          <xsl:copy-of select="/bedework/formElements/form/start/year/*"/> 
    580499                        </xsl:when> 
    581500                        <xsl:otherwise> 
    582                           <xsl:copy-of select="/bedework/formElements/form/end/dateTime/yearText/*"/> 
     501                          <xsl:copy-of select="/bedework/formElements/form/start/yearText/*"/> 
    583502                        </xsl:otherwise> 
    584503                      </xsl:choose> 
    585504                      <script language="JavaScript" type="text/javascript"> 
    586                       <xsl:comment> 
    587                         endDateDynCalWidget = new dynCalendar('endDateDynCalWidget', <xsl:value-of select="number(/bedework/formElements/form/start/yearText/input/@value)"/>, <xsl:value-of select="number(/bedework/formElements/form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(/bedework/formElements/form/start/day/select/option[@selected='selected']/@value)"/>, 'endDateCalWidgetCallback', '<xsl:value-of select="$resourcesRoot"/>/resources/'); 
    588                       </xsl:comment> 
     505                        <xsl:comment> 
     506                        startDateDynCalWidget = new dynCalendar('startDateDynCalWidget', <xsl:value-of select="number(/bedework/formElements/form/start/yearText/input/@value)"/>, <xsl:value-of select="number(/bedework/formElements/form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(/bedework/formElements/form/start/day/select/option[@selected='selected']/@value)"/>, 'startDateCalWidgetCallback', '<xsl:value-of select="$resourcesRoot"/>/resources/'); 
     507                        </xsl:comment> 
    589508                      </script> 
    590509                    </xsl:when> 
    591510                    <xsl:otherwise> 
    592                       <span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetEndDate" iconURL="{$resourcesRoot}/resources/calIcon.gif"> 
    593                         <xsl:attribute name="value"><xsl:value-of select="form/end/rfc3339DateTime"/></xsl:attribute> 
     511                      <span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetStartDate" iconURL="{$resourcesRoot}/resources/calIcon.gif"> 
     512                        <xsl:attribute name="value"><xsl:value-of select="form/start/rfc3339DateTime"/></xsl:attribute> 
    594513                        <xsl:text> </xsl:text> 
    595514                      </span> 
    596                       <input type="hidden" name="eventEndDate.year"> 
    597                         <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/yearText/input/@value"/></xsl:attribute> 
     515                      <input type="hidden" name="eventStartDate.year"> 
     516                        <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute> 
    598517                      </input> 
    599                       <input type="hidden" name="eventEndDate.month"> 
    600                         <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/month/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
     518                      <input type="hidden" name="eventStartDate.month"> 
     519                        <xsl:attribute name="value"><xsl:value-of select="form/start/month/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
    601520                      </input> 
    602                       <input type="hidden" name="eventEndDate.day"> 
    603                         <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/day/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
     521                      <input type="hidden" name="eventStartDate.day"> 
     522                        <xsl:attribute name="value"><xsl:value-of select="form/start/day/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
    604523                      </input> 
    605524                    </xsl:otherwise> 
    606525                  </xsl:choose> 
    607526                </div> 
    608                 <div class="{$timeFieldsClass}" id="endTimeFields"> 
    609                   <span id="calWidgetEndTimeHider" class="show"> 
    610                     <xsl:copy-of select="form/end/dateTime/hour/*"/> 
    611                     <xsl:copy-of select="form/end/dateTime/minute/*"/> 
    612                     <xsl:if test="form/end/dateTime/ampm"> 
    613                       <xsl:copy-of select="form/end/dateTime/ampm/*"/> 
     527                <div class="{$timeFieldsClass}" id="startTimeFields"> 
     528                  <span id="calWidgetStartTimeHider" class="show"> 
     529                    <xsl:copy-of select="form/start/hour/*"/> 
     530                    <xsl:copy-of select="form/start/minute/*"/> 
     531                    <xsl:if test="form/start/ampm"> 
     532                      <xsl:copy-of select="form/start/ampm/*"/> 
    614533                    </xsl:if> 
    615534                    <xsl:text> </xsl:text> 
    616                     <a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0" alt="bwClock"/></a> 
    617  
    618                     <select name="eventEndDate.tzid" id="endTzid" class="timezones"> 
     535                    <a href="javascript:bwClockLaunch('eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0" alt="bwClock"/></a> 
     536 
     537                    <select name="eventStartDate.tzid" id="startTzid" class="timezones"> 
    619538                      <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if> 
    620539                      <option value="-1">select timezone...</option> 
    621                       <xsl:variable name="endTzId" select="form/end/dateTime/tzid"/> 
     540                      <xsl:variable name="startTzId" select="form/start/tzid"/> 
    622541                      <xsl:for-each select="/bedework/timezones/timezone"> 
    623542                        <option> 
    624543                          <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> 
    625                             <xsl:if test="$endTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
     544                          <xsl:if test="$startTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
    626545                          <xsl:value-of select="name"/> 
    627546                        </option> 
     
    630549                  </span> 
    631550                </div> 
    632               </div><br/> 
    633               <div id="clock" class="invisible"> 
    634                 <xsl:call-template name="clock"/> 
    635551              </div> 
    636               <div class="dateFields"> 
     552              <div class="dateStartEndBox"> 
     553                <strong> 
     554                  <xsl:choose> 
     555                    <xsl:when test="form/entityType = '2'">Due:</xsl:when> 
     556                    <xsl:otherwise>End:</xsl:otherwise> 
     557                  </xsl:choose> 
     558                </strong> 
    637559                <xsl:choose> 
    638                   <xsl:when test="form/end/type='D'"> 
    639                     <input type="radio" name="eventEndType" value="D" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
     560                  <xsl:when test="form/end/type='E'"> 
     561                    <input type="radio" name="eventEndType" value="E" checked="checked" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    640562                  </xsl:when> 
    641563                  <xsl:otherwise> 
    642                     <input type="radio" name="eventEndType" value="D" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
     564                    <input type="radio" name="eventEndType" value="E" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    643565                  </xsl:otherwise> 
    644566                </xsl:choose> 
    645                 Duration 
    646                 <xsl:variable name="endDurationClass"> 
     567                Date 
     568                <xsl:variable name="endDateTimeClass"> 
    647569                  <xsl:choose> 
    648                     <xsl:when test="form/end/type='D'">shown</xsl:when> 
     570                    <xsl:when test="form/end/type='E'">shown</xsl:when> 
    649571                    <xsl:otherwise>invisible</xsl:otherwise> 
    650572                  </xsl:choose> 
    651573                </xsl:variable> 
    652                 <xsl:variable name="durationHrMinClass"> 
     574                <div class="{$endDateTimeClass}" id="endDateTime"> 
     575                  <div class="dateFields"> 
     576                    <xsl:choose> 
     577                      <xsl:when test="$portalFriendly = 'true'"> 
     578                        <xsl:copy-of select="/bedework/formElements/form/end/dateTime/month/*"/> 
     579                        <xsl:copy-of select="/bedework/formElements/form/end/dateTime/day/*"/> 
     580                        <xsl:choose> 
     581                          <xsl:when test="/bedework/creating = 'true'"> 
     582                            <xsl:copy-of select="/bedework/formElements/form/end/dateTime/year/*"/> 
     583                          </xsl:when> 
     584                          <xsl:otherwise> 
     585                            <xsl:copy-of select="/bedework/formElements/form/end/dateTime/yearText/*"/> 
     586                          </xsl:otherwise> 
     587                        </xsl:choose> 
     588                        <script language="JavaScript" type="text/javascript"> 
     589                        <xsl:comment> 
     590                          endDateDynCalWidget = new dynCalendar('endDateDynCalWidget', <xsl:value-of select="number(/bedework/formElements/form/start/yearText/input/@value)"/>, <xsl:value-of select="number(/bedework/formElements/form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(/bedework/formElements/form/start/day/select/option[@selected='selected']/@value)"/>, 'endDateCalWidgetCallback', '<xsl:value-of select="$resourcesRoot"/>/resources/'); 
     591                        </xsl:comment> 
     592                        </script> 
     593                      </xsl:when> 
     594                      <xsl:otherwise> 
     595                        <span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetEndDate" iconURL="{$resourcesRoot}/resources/calIcon.gif"> 
     596                          <xsl:attribute name="value"><xsl:value-of select="form/end/rfc3339DateTime"/></xsl:attribute> 
     597                          <xsl:text> </xsl:text> 
     598                        </span> 
     599                        <input type="hidden" name="eventEndDate.year"> 
     600                          <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/yearText/input/@value"/></xsl:attribute> 
     601                        </input> 
     602                        <input type="hidden" name="eventEndDate.month"> 
     603                          <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/month/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
     604                        </input> 
     605                        <input type="hidden" name="eventEndDate.day"> 
     606                          <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/day/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
     607                        </input> 
     608                      </xsl:otherwise> 
     609                    </xsl:choose> 
     610                  </div> 
     611                  <div class="{$timeFieldsClass}" id="endTimeFields"> 
     612                    <span id="calWidgetEndTimeHider" class="show"> 
     613                      <xsl:copy-of select="form/end/dateTime/hour/*"/> 
     614                      <xsl:copy-of select="form/end/dateTime/minute/*"/> 
     615                      <xsl:if test="form/end/dateTime/ampm"> 
     616                        <xsl:copy-of select="form/end/dateTime/ampm/*"/> 
     617                      </xsl:if> 
     618                      <xsl:text> </xsl:text> 
     619                      <a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0" alt="bwClock"/></a> 
     620 
     621                      <select name="eventEndDate.tzid" id="endTzid" class="timezones"> 
     622                        <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if> 
     623                        <option value="-1">select timezone...</option> 
     624                        <xsl:variable name="endTzId" select="form/end/dateTime/tzid"/> 
     625                        <xsl:for-each select="/bedework/timezones/timezone"> 
     626                          <option> 
     627                            <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> 
     628                              <xsl:if test="$endTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
     629                            <xsl:value-of select="name"/> 
     630                          </option> 
     631                        </xsl:for-each> 
     632                      </select> 
     633                    </span> 
     634                  </div> 
     635                </div><br/> 
     636                <div id="clock" class="invisible"> 
     637                  <xsl:call-template name="clock"/> 
     638                </div> 
     639                <div class="dateFields"> 
    653640                  <xsl:choose> 
    654                     <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 
    655                     <xsl:otherwise>shown</xsl:otherwise> 
    656                   </xsl:choose> 
    657                 </xsl:variable> 
    658                 <div class="{$endDurationClass}" id="endDuration"> 
    659                   <xsl:choose> 
    660                     <xsl:when test="form/end/duration/weeks/input/@value = '0'"> 
    661                     <!-- we are using day, hour, minute format --> 
    662                     <!-- must send either no week value or week value of 0 (zero) --> 
    663                       <div class="durationBox"> 
    664                         <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')" checked="checked"/> 
    665                         <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 
    666                         <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays"/>days 
    667                         <span id="durationHrMin" class="{$durationHrMinClass}"> 
    668                           <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 
    669                           <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours"/>hours 
    670                           <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 
    671                           <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes"/>minutes 
    672                         </span> 
    673                       </div> 
    674                       <span class="durationSpacerText">or</span> 
    675                       <div class="durationBox"> 
    676                         <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/> 
    677                         <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 
    678                         <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="disabled"/>weeks 
    679                       </div> 
     641                    <xsl:when test="form/end/type='D'"> 
     642                      <input type="radio" name="eventEndType" value="D" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    680643                    </xsl:when> 
    681644                    <xsl:otherwise> 
    682                       <!-- we are using week format --> 
    683                       <div class="durationBox"> 
    684                         <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/> 
    685                         <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 
    686                         <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="disabled"/>days 
    687                         <span id="durationHrMin" class="{$durationHrMinClass}"> 
    688                           <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 
    689                           <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="disabled"/>hours 
    690                           <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 
    691                           <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="disabled"/>minutes 
    692                         </span> 
    693                       </div> 
    694                       <span class="durationSpacerText">or</span> 
    695                       <div class="durationBox"> 
    696                         <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')" checked="checked"/> 
    697                         <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 
    698                         <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks"/>weeks 
    699                       </div> 
     645                      <input type="radio" name="eventEndType" value="D" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    700646                    </xsl:otherwise> 
    701647                  </xsl:choose> 
     648                  Duration 
     649                  <xsl:variable name="endDurationClass"> 
     650                    <xsl:choose> 
     651                      <xsl:when test="form/end/type='D'">shown</xsl:when> 
     652                      <xsl:otherwise>invisible</xsl:otherwise> 
     653                    </xsl:choose> 
     654                  </xsl:variable> 
     655                  <xsl:variable name="durationHrMinClass"> 
     656                    <xsl:choose> 
     657                      <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 
     658                      <xsl:otherwise>shown</xsl:otherwise> 
     659                    </xsl:choose> 
     660                  </xsl:variable> 
     661                  <div class="{$endDurationClass}" id="endDuration"> 
     662                    <xsl:choose> 
     663                      <xsl:when test="form/end/duration/weeks/input/@value = '0'"> 
     664                      <!-- we are using day, hour, minute format --> 
     665                      <!-- must send either no week value or week value of 0 (zero) --> 
     666                        <div class="durationBox"> 
     667                          <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')" checked="checked"/> 
     668                          <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 
     669                          <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays"/>days 
     670                          <span id="durationHrMin" class="{$durationHrMinClass}"> 
     671                            <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 
     672                            <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours"/>hours 
     673                            <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 
     674                            <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes"/>minutes 
     675                          </span> 
     676                        </div> 
     677                        <span class="durationSpacerText">or</span> 
     678                        <div class="durationBox"> 
     679                          <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/> 
     680                          <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 
     681                          <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="disabled"/>weeks 
     682                        </div> 
     683                      </xsl:when> 
     684                      <xsl:otherwise> 
     685                        <!-- we are using week format --> 
     686                        <div class="durationBox"> 
     687                          <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/> 
     688                          <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 
     689                          <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="disabled"/>days 
     690                          <span id="durationHrMin" class="{$durationHrMinClass}"> 
     691                            <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 
     692                            <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="disabled"/>hours 
     693                            <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 
     694                            <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="disabled"/>minutes 
     695                          </span> 
     696                        </div> 
     697                        <span class="durationSpacerText">or</span> 
     698                        <div class="durationBox"> 
     699                          <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')" checked="checked"/> 
     700                          <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 
     701                          <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks"/>weeks 
     702                        </div> 
     703                      </xsl:otherwise> 
     704                    </xsl:choose> 
     705                  </div> 
     706                </div><br/> 
     707                <div class="dateFields" id="noDuration"> 
     708                  <xsl:choose> 
     709                    <xsl:when test="form/end/type='N'"> 
     710                      <input type="radio" name="eventEndType" value="N" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
     711                    </xsl:when> 
     712                    <xsl:otherwise> 
     713                      <input type="radio" name="eventEndType" value="N" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
     714                    </xsl:otherwise> 
     715                  </xsl:choose> 
     716                  This 
     717                  <xsl:choose> 
     718                    <xsl:when test="form/entityType = '2'">task</xsl:when> 
     719                    <xsl:otherwise>event</xsl:otherwise> 
     720                  </xsl:choose> 
     721                  has no duration / end date 
    702722                </div> 
    703               </div><br/> 
    704               <div class="dateFields" id="noDuration"> 
    705                 <xsl:choose> 
    706                   <xsl:when test="form/end/type='N'"> 
    707                     <input type="radio" name="eventEndType" value="N" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    708                   </xsl:when> 
    709                   <xsl:otherwise> 
    710                     <input type="radio" name="eventEndType" value="N" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    711                   </xsl:otherwise> 
    712                 </xsl:choose> 
    713                 This 
    714                 <xsl:choose> 
    715                   <xsl:when test="form/entityType = '2'">task</xsl:when> 
    716                   <xsl:otherwise>event</xsl:otherwise> 
    717                 </xsl:choose> 
    718                 has no duration / end date 
    719723              </div> 
    720             </div> 
    721           </td> 
    722         </tr> 
    723  
    724         <!--  Percent Complete (only for Tasks)  --> 
    725         <xsl:if test="form/entityType = '2'"> 
    726           <tr> 
    727             <td class="fieldname"> 
    728               % Complete: 
    729             </td> 
    730             <td class="fieldval" align="left"> 
    731               <input type="text" name="event.percentComplete" size="3" maxlength="3"> 
    732                 <xsl:attribute name="value"><xsl:value-of select="form/percentComplete"/></xsl:attribute> 
    733               </input>% 
    734724            </td> 
    735725          </tr> 
    736         </xsl:if> 
    737  
    738         <!--  Transparency  --> 
    739         <!--  HIDE 
    740         <tr> 
    741           <td class="fieldname padMeTop"> 
    742             Effects free/busy: 
    743           </td> 
    744           <td align="left" class="padMeTop"> 
    745             <input type="radio" value="OPAQUE" name="transparency"> 
    746               <xsl:if test="form/transparency = 'OPAQUE'"> 
    747                 <xsl:attribute name="checked">checked</xsl:attribute> 
    748               </xsl:if> 
    749             </input> 
    750             yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
    751  
    752             <input type="radio" value="TRANSPARENT" name="transparency"> 
    753               <xsl:if test="form/transparency = 'TRANSPARENT'"> 
    754                 <xsl:attribute name="checked">checked</xsl:attribute> 
    755               </xsl:if> 
    756             </input> 
    757             no <span class="note">(transparent: event status does not affect your free/busy)</span><br/> 
    758           </td> 
    759         </tr> --> 
    760  
    761         <!--  Category  --> 
    762         <tr> 
    763           <td class="fieldname"> 
    764             Categories: 
    765           </td> 
    766           <td class="fieldval" align="left"> 
    767             <xsl:variable name="catCount" select="count(form/categories/all/category)"/> 
    768             <xsl:choose> 
    769               <xsl:when test="not(form/categories/all/category)"> 
    770                 no categories defined 
    771               </xsl:when> 
    772               <xsl:otherwise> 
    773                 <table cellpadding="0" id="allCategoryCheckboxes"> 
    774                   <tr> 
    775                     <td> 
    776                       <xsl:for-each select="form/categories/all/category[position() &lt;= ceiling($catCount div 2)]"> 
    777                         <input type="checkbox" name="categoryKey"> 
    778                           <xsl:attribute name="value"><xsl:value-of select="keyword"/></xsl:attribute> 
    779                           <xsl:if test="keyword = form/categories/current//category/keyword"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    780                           <xsl:value-of select="keyword"/> 
    781                         </input><br/> 
    782                       </xsl:for-each> 
    783                     </td> 
    784                     <td> 
    785                       <xsl:for-each select="form/categories/all/category[position() &gt; ceiling($catCount div 2)]"> 
    786                         <input type="checkbox" name="categoryKey"> 
    787                           <xsl:attribute name="value"><xsl:value-of select="keyword"/></xsl:attribute> 
    788                           <xsl:if test="keyword = form/categories/current//category/keyword"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    789                           <xsl:value-of select="keyword"/> 
    790                         </input><br/> 
    791                       </xsl:for-each> 
    792                     </td> 
    793                   </tr> 
    794                 </table> 
    795               </xsl:otherwise> 
    796             </xsl:choose> 
    797           </td> 
    798         </tr> 
    799       </table> 
    800     </div> 
    801  
    802     <!-- Details tab --> 
    803     <!-- ============== --> 
    804     <div id="bwEventTab-Details" class="invisible"> 
    805       <table cellspacing="0" class="common"> 
    806         <!--  Location  --> 
    807         <tr> 
    808           <td class="fieldname">Location:</td> 
    809           <td class="fieldval" align="left"> 
    810             <span class="std-text">choose: </span> 
    811             <span id="eventFormLocationList"> 
    812               <select name="locationUid"> 
    813                 <option value="">select...</option> 
    814                 <xsl:copy-of select="form/location/locationmenu/select/*"/> 
    815               </select> 
    816             </span> 
    817             <span class="std-text"> or add new: </span> 
    818             <input type="text" name="locationAddress.value" value="" /> 
    819           </td> 
    820         </tr> 
    821         <!--  Link (url associated with event)  --> 
    822         <tr> 
    823           <td class="fieldname">Event Link:</td> 
    824           <td class="fieldval"> 
    825             <xsl:variable name="link" select="form/link/input/@value"/> 
    826             <input type="text" name="event.link" size="80" value="{$link}"/> 
    827           </td> 
    828         </tr> 
    829         <!--  Description  --> 
    830         <tr> 
    831           <td class="fieldname">Description:</td> 
    832           <td class="fieldval"> 
    833             <xsl:choose> 
    834               <xsl:when test="normalize-space(form/desc/textarea) = ''"> 
    835                 <textarea name="description" cols="60" rows="4"> 
    836                   <xsl:text> </xsl:text> 
    837                 </textarea> 
    838                 <!-- keep this space to avoid browser 
    839                 rendering errors when the text area is empty --> 
    840               </xsl:when> 
    841               <xsl:otherwise> 
    842                 <textarea name="description" cols="60" rows="4"> 
    843                   <xsl:value-of select="form/desc/textarea"/> 
    844                 </textarea> 
    845               </xsl:otherwise> 
    846             </xsl:choose> 
    847           </td> 
    848         </tr> 
    849         <!--  Status  --> 
    850         <tr> 
    851           <td class="fieldname"> 
    852             Status: 
    853           </td> 
    854           <td class="fieldval"> 
    855             <input type="radio" name="eventStatus" value="CONFIRMED"> 
    856               <xsl:if test="form/status = 'CONFIRMED' or /bedework/creating = 'true' or form/status = ''"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    857             </input> 
    858             confirmed 
    859             <input type="radio" name="eventStatus" value="TENTATIVE"> 
    860               <xsl:if test="form/status = 'TENTATIVE'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    861             </input> 
    862             tentative 
    863             <input type="radio" name="eventStatus" value="CANCELLED"> 
    864               <xsl:if test="form/status = 'CANCELLED'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    865             </input> 
    866             cancelled 
    867           </td> 
    868         </tr> 
    869         <!--  Transparency  --> 
    870         <xsl:if test="entityType != '2'"><!-- no transparency for Tasks --> 
     726 
     727 
     728          <!--  Link (url associated with event)  --> 
    871729          <tr> 
    872             <td class="fieldname"> 
    873               Effects free/busy: 
     730            <td class="fieldname">Event Link:</td> 
     731            <td class="fieldval"> 
     732              <xsl:variable name="link" select="form/link/input/@value"/> 
     733              <input type="text" name="event.link" size="80" value="{$link}"/> 
    874734            </td> 
     735          </tr> 
     736          <!--  Description  --> 
     737          <tr> 
     738            <td class="fieldname">Description:</td> 
    875739            <td class="fieldval"> 
    876740              <xsl:choose> 
    877                 <xsl:when test="form/transparency = 'TRANSPARENT'"> 
    878                   <input type="radio" name="event.transparency" value="OPAQUE"/>yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
    879                   <input type="radio" name="event.transparency" value="TRANSPARENT" checked="checked"/>no <span class="note">(transparent: event status does not affect your free/busy)</span> 
     741                <xsl:when test="normalize-space(form/desc/textarea) = ''"> 
     742                  <textarea name="description" cols="60" rows="4"> 
     743                    <xsl:text> </xsl:text> 
     744                  </textarea> 
     745                  <!-- keep this space to avoid browser 
     746                  rendering errors when the text area is empty --> 
    880747                </xsl:when> 
    881748                <xsl:otherwise> 
    882                   <input type="radio" name="event.transparency" value="OPAQUE" checked="checked"/>yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
    883                   <input type="radio" name="event.transparency" value="TRANSPARENT"/>no <span class="note">(transparent: event status does not affect your free/busy)</span> 
     749                  <textarea name="description" cols="60" rows="4"> 
     750                    <xsl:value-of select="form/desc/textarea"/> 
     751                  </textarea> 
    884752                </xsl:otherwise> 
    885753              </xsl:choose> 
    886754            </td> 
    887755          </tr> 
    888         </xsl:if> 
    889       </table> 
    890     </div> 
    891  
    892  
    893     <!-- Location tab --> 
    894     <!-- ============== --> 
    895     <div id="bwEventTab-Location" class="invisible"> 
    896       move locs here 
    897     </div> 
    898  
    899     <!-- Contact tab --> 
    900     <!-- ============== --> 
    901     <div id="bwEventTab-Contact" class="invisible"> 
    902       move contacts here 
    903     </div> 
    904  
    905     <!-- Categories tab --> 
    906     <!-- ============== --> 
    907     <div id="bwEventTab-Categories" class="invisible"> 
    908       move cats here 
     756          <!--  Status  --> 
     757          <tr> 
     758            <td class="fieldname"> 
     759              Status: 
     760            </td> 
     761            <td class="fieldval"> 
     762              <input type="radio" name="eventStatus" value="CONFIRMED"> 
     763                <xsl:if test="form/status = 'CONFIRMED' or /bedework/creating = 'true' or form/status = ''"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
     764              </input> 
     765              confirmed 
     766              <input type="radio" name="eventStatus" value="TENTATIVE"> 
     767                <xsl:if test="form/status = 'TENTATIVE'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
     768              </input> 
     769              tentative 
     770              <input type="radio" name="eventStatus" value="CANCELLED"> 
     771                <xsl:if test="form/status = 'CANCELLED'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
     772              </input> 
     773              cancelled 
     774            </td> 
     775          </tr> 
     776        </table> 
     777      </div> 
     778 
     779      <!-- Location tab --> 
     780      <!-- ============== --> 
     781      <div id="bwEventTab-Location" class="invisible"> 
     782        <div class="instructions"> 
     783          <strong>Step 2:</strong> Enter your location.<br/> 
     784          <a href="javascript:setTab('eventFormTabs',0); show('bwEventTab-Details'); hide('bwEventTab-Location','bwEventTab-Categories','bwEventTab-Contact');"> 
     785            &lt;prev 
     786          </a> 
     787          <a href="javascript:setTab('eventFormTabs',2); show('bwEventTab-Contact'); hide('bwEventTab-Details','bwEventTab-Location','bwEventTab-Categories');"> 
     788            next&gt; 
     789          </a> 
     790        </div> 
     791        <span class="std-text">Choose: </span> 
     792        <span id="eventFormLocationList"> 
     793          <select name="locationUid"> 
     794            <option value="">select...</option> 
     795            <xsl:copy-of select="form/location/locationmenu/select/*"/> 
     796          </select> 
     797        </span> 
     798      </div> 
     799 
     800      <!-- Contact tab --> 
     801      <!-- ============== --> 
     802      <div id="bwEventTab-Contact" class="invisible"> 
     803        move contacts here 
     804      </div> 
     805 
     806      <!-- Categories tab --> 
     807      <!-- ============== --> 
     808      <div id="bwEventTab-Categories" class="invisible"> 
     809        <xsl:variable name="catCount" select="count(form/categories/all/category)"/> 
     810        <xsl:choose> 
     811          <xsl:when test="not(form/categories/all/category)"> 
     812            no categories defined 
     813          </xsl:when> 
     814          <xsl:otherwise> 
     815            <table cellpadding="0" id="allCategoryCheckboxes"> 
     816              <tr> 
     817                <td> 
     818                  <xsl:for-each select="form/categories/all/category[position() &lt;= ceiling($catCount div 2)]"> 
     819                    <input type="checkbox" name="categoryKey"> 
     820                      <xsl:attribute name="value"><xsl:value-of select="keyword"/></xsl:attribute> 
     821                      <xsl:if test="keyword = form/categories/current//category/keyword"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
     822                      <xsl:value-of select="keyword"/> 
     823                    </input><br/> 
     824                  </xsl:for-each> 
     825                </td> 
     826                <td> 
     827                  <xsl:for-each select="form/categories/all/category[position() &gt; ceiling($catCount div 2)]"> 
     828                    <input type="checkbox" name="categoryKey"> 
     829                      <xsl:attribute name="value"><xsl:value-of select="keyword"/></xsl:attribute> 
     830                      <xsl:if test="keyword = form/categories/current//category/keyword"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
     831                      <xsl:value-of select="keyword"/> 
     832                    </input><br/> 
     833                  </xsl:for-each> 
     834                </td> 
     835              </tr> 
     836            </table> 
     837          </xsl:otherwise> 
     838        </xsl:choose> 
     839      </div> 
    909840    </div> 
    910841