Changeset 1979

Show
Ignore:
Timestamp:
11/25/08 17:43:12
Author:
johnsa
Message:

user client: updates to add subscription UI (still work to be done)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/webadmin/portlet/resources/default/default/default.css

    r1195 r1979  
    22  background-color: white; 
    33  color: #000000; 
    4   margin: 0em; 
     4  margin: 0; 
     5  padding: 0; 
    56  font-family: Arial, Helvetica, sans-serif; 
    6   font-size: 100%
     7  font-size: 16px
    78  min-width: 680px; 
    89} 
     
    1920#header h1 { 
    2021  font-size: 1.4em; 
    21   margin: 0.5em 0.5em 0em 0em
     22  margin: 0.5em 0.5em 0 0
    2223} 
    2324#header img { 
     
    2526  border: 0; 
    2627} 
    27 #messages { 
    28   background-color: inherit; 
    29   color: #ff0; 
    30   font-weight: bold; 
    31   margin: 0.5em 0; 
    32 
    33 #messages p { 
    34   margin: 0; 
    35 
     28#messages, 
    3629#errors { 
    37   background-color: inherit; 
    38   color: #f99; 
    39   font-weight: bold; 
    40   margin: 0.5em 0; 
    41 
    42 #errors em { 
    43   background-color: inherit; 
    44   color: #ff9; 
    45 
     30  font-size: 0.8em; 
     31  margin: 0; 
     32  padding: 0.3em 0 0.3em 1em; 
     33  border-bottom: 1px solid Gray; 
     34  color: black; 
     35  background: #ff0 url(../../resources/glassFill-message.gif) repeat-x top; 
     36
     37#errors { 
     38  border: 2px solid red; 
     39
     40#errors li, 
     41#messages li { 
     42  list-style: none; 
     43
     44#messages p, 
    4645#errors p { 
    4746  margin: 0; 
    48 
    49 #adminLeftColumn { 
    50   float: left; 
    51 
    52 #adminRightColumn { 
    53   float: left; 
    54   margin: 1em 0 1em 3em; 
     47  padding: 2px 0; 
    5548} 
    5649#statusBarTable { 
    57   margin: 0em; 
    58   color: black; 
    59   background-color: #edc; 
     50  margin: 0; 
     51  color: #eee; 
     52  /*background-color: #edc;*/ 
     53  background-color: #5c7486; 
    6054  font-size: 0.8em; 
    6155  width: 100%; 
     56  border-bottom: 1px solid #999; 
    6257} 
    6358#statusBarTable td.rightCell { 
    6459  text-align: right; 
    6560  padding: 0.2em 1em 0.2em 0em; 
     61  white-space: nowrap; 
    6662} 
    6763#statusBarTable td.leftCell { 
    68   color: #666; 
    69   background-color: #edc; 
    7064  text-align: left; 
    7165  padding: 0.2em 0em 0.2em 1em; 
     66  white-space: nowrap; 
    7267} 
    7368#statusBarTable span.status { 
     
    7671#statusBarTable a:link, 
    7772#statusBarTable a:active, 
    78 #statusBarTable a:visited { 
     73#statusBarTable a:visited, 
     74#statusBarTable a:hover { 
     75  margin-right: 1em; 
    7976  text-decoration : none; 
    80   color: blue; 
     77  color: #eee; 
    8178  background-color: transparent; 
    8279} 
    8380#statusBarTable a:hover { 
     81  text-decoration: underline; 
     82} 
     83#statusBarTable #bwLogoutButton { 
     84  margin: 0 0 0 4px; 
     85} 
     86#bwAdminMenu { 
     87  margin: 0; 
     88  padding: 6px 0 4px 0; 
     89  color: #eee; 
     90  background-color: #ddd; 
     91  font-size: 0.9em; 
     92  border-bottom: 1px solid #999; 
     93} 
     94#bwAdminMenu li { 
     95  display: inline; 
     96  margin: 0; 
     97  /*color: #eee; 
     98  background: #009 url("../../resources/menuBgBlue.gif") repeat-x top;*/ 
     99  color: #777; 
     100  background-color: #eee; 
     101  padding-top: 6px; 
     102  padding-bottom: 4px; 
     103  padding-left: 1em; 
     104  padding-right: 1em; 
     105  border-bottom: 1px solid #999; 
     106  border-right: 1px solid #999; 
     107} 
     108#bwAdminMenu li.selected { 
     109  color: #333; 
     110  background: white url("../../resources/menuBgGray.gif") repeat-x top; 
     111  border-bottom: 1px solid white; 
     112} 
     113#bwAdminMenu a:link, 
     114#bwAdminMenu a:active, 
     115#bwAdminMenu a:hover, 
     116#bwAdminMenu a:visited { 
     117  color: #777; 
     118  background-color: transparent; 
    84119  text-decoration: none; 
    85   background-color: #ffe; 
    86   color: black; 
     120
     121#bwAdminMenu li.selected a:link, 
     122#bwAdminMenu li.selected a:active, 
     123#bwAdminMenu li.selected a:hover, 
     124#bwAdminMenu li.selected a:visited { 
     125  color: black; 
     126  background-color: transparent; 
     127  text-decoration: none; 
    87128} 
    88129#titleBar { 
     
    103144  margin: 0em; 
    104145  padding: 1em 0.2em 0em 0.2em; 
    105   font-size: 1.4em; 
     146  font-size: 1.3em; 
    106147} 
    107148#content h3 { 
     
    125166  text-align: left; 
    126167} 
     168/* mainMenuTable is deprecated */ 
    127169#mainMenuTable { 
    128170  margin-top: 0em; 
     
    161203  display: inline; 
    162204} 
     205/* mainMenu = manage events tab icons and links */ 
     206#mainMenu { 
     207  margin: 2em auto 4em auto; 
     208} 
     209#mainMenu td { 
     210  text-align: center; 
     211  vertical-align: middle; 
     212  padding: 1em 0.5em; 
     213} 
     214#mainMenu img { 
     215  text-align: center; 
     216} 
     217#mainMenu a:link, 
     218#mainMenu a:active, 
     219#mainMenu a:visited, 
     220#mainMenu a:hover { 
     221  display: block; 
     222  padding: 0.2em 1em 0.2em 1em; 
     223  text-decoration: none; 
     224  color: #483D8B; 
     225  background-color: transparent; 
     226} 
     227#mainMenuEventSearch { 
     228 
     229} 
    163230#searchForm { 
    164231  font-size: 0.8em; 
     
    215282  color: black; 
    216283} 
     284#calSuiteTitle { 
     285  border: 1px solid #666; 
     286  color: black; 
     287  background-color: #ffe; 
     288  padding: 0.5em; 
     289  margin: 1em 0; 
     290 
     291} 
    217292.adminMenu { 
    218   margin-top: 0em; 
    219   /*width: 100%;*/ 
    220293} 
    221294ul.adminMenu { 
    222   margin-top: 0; 
    223295} 
    224296ul.adminMenu li { 
     
    237309  background-color: #ff3; 
    238310} 
     311#bwSubmittedEventCommentBlock { 
     312  font-size: 0.9em; 
     313  padding: 1em; 
     314  border: 1px solid #ccc; 
     315  background-color: #ffe; 
     316  color: black; 
     317} 
     318#bwSubmittedBy { 
     319  float: right; 
     320} 
     321#bwSubmittedEventCommentBlock h4 { 
     322  display: inline; 
     323  font-size: 1.1em; 
     324} 
     325#bwSubmittedEventCommentBlock table { 
     326  float: left; 
     327  margin: 1em 1em 0 0; 
     328  padding: 0.5em; 
     329  border: 1px solid #ccc; 
     330} 
     331#bwSubmittedEventCommentBlock td { 
     332  padding: 0 3em 0 1em; 
     333} 
     334#bwSubmittedEventCommentBlock th { 
     335  padding: 0 3em 0 0; 
     336} 
     337#bwSubmittedEventCommentBlock p { 
     338  padding-top: 1em; 
     339  clear: both; 
     340} 
     341#bwSubmittedEventCommentBlock a.toggle { 
     342  padding-left: 1em; 
     343  font-size: 0.9em; 
     344} 
    239345#commonListTable { 
    240346  margin-bottom: 2em; 
     
    253359  background-color: #eee; 
    254360} 
     361#commonListTable td.date, 
     362#commonListTable td.calcat { 
     363  white-space: nowrap; 
     364} 
    255365.recurrenceEditLinks { 
    256366  font-style: italic; 
     
    297407  padding: 0.2em; 
    298408} 
    299 table.eventFormTable .dateFields { 
     409.dateFields { 
    300410  display: inline; 
    301411} 
    302 table.eventFormTable .timeFields { 
     412.timeFields { 
    303413  display: inline; 
    304414  margin-left: 1em; 
     
    312422  margin-bottom: 0.5em; 
    313423} 
    314 table.eventFormTable .dateStartEndBox { 
     424.dateStartEndBox { 
    315425  border: 1px solid #ccb; 
    316426  margin: 4px; 
     
    318428  white-space: nowrap; 
    319429} 
    320 table.eventFormTable .dateStartEndBox strong { 
     430.dateStartEndBox strong { 
    321431  display: block; 
    322432} 
     
    328438  width: 160px; 
    329439} 
    330 table.eventFormTable .shown { 
     440.shown { 
    331441  display: inline; 
    332442} 
    333 table.eventFormTable .invisible, 
    334443.invisible { 
    335444  display: none !important; 
     
    428537} 
    429538#clock { 
    430   position: relative; 
     539  position: absolute; 
     540  top: 160px; 
     541  margin: auto; 
     542
     543#startTimeFields img, 
     544#endTimeFields img { 
     545  vertical-align: middle; 
    431546} 
    432547#tztable { 
     
    436551  padding: 2px 4px; 
    437552} 
     553#recurringSwitch { 
     554  margin: 0; 
     555} 
    438556#recurrenceInfo { 
    439   font-size: 0.9em; 
    440   font-style: italic; 
    441   margin-bottom: 0.5em; 
    442 
    443 #recurrenceFields #recurrenceTable strong { 
     557  margin: 0; 
     558  padding: 1em; 
     559  border: 1px solid #ddd; 
     560  font-size: 0.9em; 
     561
     562#rrulesSwitch, 
     563#rrulesUiSwitch { 
     564  font-size: 0.8em; 
     565
     566#rrulesFields { 
     567  margin: 0; 
     568  padding: 0; 
     569
     570#rrulesTable { 
     571  border: 1px solid #ddd; 
     572  margin: 0; 
     573  padding: 0; 
     574
     575#rrulesTable strong { 
    444576  display: inline; 
    445577} 
    446 #recurrenceFields #recurrenceTable td.recurrenceFrequency { 
    447   padding: 0.5em 1em 0 0; 
    448 
    449 #recurrenceFields #recurrenceTable td.recurrenceRules { 
    450   padding: 0.5em 0 0.5em 1em; 
    451   border-left: 1px solid #ddd; 
    452 
    453 #recurrenceFields #recurrenceTable td.recurrenceUntil { 
     578#rrulesTable td#recurrenceFrequency { 
     579  padding: 0.5em 1em; 
     580  border-right: 1px solid #ddd; 
     581  white-space: nowrap; 
     582
     583#rrulesTable td#advancedRrules { 
     584  padding: 0.5em 1em 0.5em 1em; 
     585  border-top: 1px solid #ddd; 
     586
     587#rrulesTable td#recurrenceUntil { 
    454588  width: 100%; 
    455589  padding: 0.5em 0 0 1em; 
    456   border-left: 1px solid #ddd; 
    457 } 
    458 #recurrenceFields #recurrenceTable td.recurrenceRules #advancedRecurrenceRules { 
    459   display: block; 
    460   border-bottom: 1px solid #ddd; 
    461 } 
    462 #recurrenceFields #recurrenceTable td.recurrenceRules .rruleBlock { 
    463   margin: 0 0 0.5em 2em; 
    464590} 
    465591.chkBoxListItem { 
     
    468594  width: 3em; 
    469595} 
    470 #recurrenceFields #recurrenceTable br { 
     596#rrulesTable br { 
    471597  clear: both; 
    472598} 
    473 #recurrenceFields #recurrenceTable p { 
     599#rrulesTable p { 
    474600  margin: 0 0 0.5em 0; 
    475601} 
    476 #recurrenceFields #recurrenceTable p.weekRecurLinks { 
     602#rrulesTable p.weekRecurLinks { 
    477603  margin: 1em 0 1em 0; 
    478604} 
    479 #recurrenceFields #recurrenceTable .extraByMonthPosFields { 
     605#rrulesTable .extraByMonthPosFields { 
    480606  margin: 0 0 1em 2em; 
    481607  padding: 0; 
    482608} 
    483 #recurrenceFields #monthRecurFields div, 
    484 #recurrenceFields #yearRecurFields div { 
     609#rrulesTable #monthRecurFields div, 
     610#rrulesTable #yearRecurFields div { 
    485611  display: block; 
    486612  margin: 0 0 0.5em 0; 
    487613} 
    488 #recurrenceFields #dayMonthCheckBoxList, 
    489 #recurrenceFields #monthDaysCheckBoxList, 
    490 #recurrenceFields #yearWeeksCheckBoxList, 
    491 #recurrenceFields #yearMonthCheckBoxList, 
    492 #recurrenceFields #yearMonthDaysCheckBoxList, 
    493 #recurrenceFields #yearDaysCheckBoxList { 
     614#rrulesTable #dayMonthCheckBoxList, 
     615#rrulesTable #monthDaysCheckBoxList, 
     616#rrulesTable #yearWeeksCheckBoxList, 
     617#rrulesTable #yearMonthCheckBoxList, 
     618#rrulesTable #yearMonthDaysCheckBoxList, 
     619#rrulesTable #yearDaysCheckBoxList { 
    494620  margin: 0.5em 0 0.5em 2em; 
    495621  display: block; 
    496622  clear: both; 
     623  white-space: nowrap !important; 
     624} 
     625#recurrenceDatesButton input { 
     626  margin: 0; 
     627  font-size: 0.8em; 
     628} 
     629#rdatesFormFields { 
     630  font-size: 0.9em; 
     631  padding: 0.5em; 
     632} 
     633#rdatesFormFields p { 
     634  clear: both; 
     635  margin-top: 1em; 
     636} 
     637.rdatesTable { 
     638  font-size: 0.9em; 
     639  border: 1px solid #ddd; 
     640} 
     641.rdatesTable td { 
     642  padding: 0.5em 1em; 
     643} 
     644.rdatesTable td.trash { 
     645  text-align: right; 
     646} 
     647.rdatesTable td.note { 
     648  text-align: center; 
     649  font-size: 0.9em; 
     650} 
     651#bwCurrentRdates, 
     652#bwCurrentExdates, 
     653#bwCurrentRdatesNone, 
     654#bwCurrentExdatesNone { 
     655  float: left; 
     656  margin: 1em 2em 1em 0; 
     657} 
     658#bwCurrentRdates th, 
     659#bwCurrentRdates td, 
     660#bwCurrentExdates th, 
     661#bwCurrentExdates td { 
     662  text-align: left; 
     663  padding: 0 0.5em 0 0; 
     664} 
     665#bwDialogBox { 
     666  margin: 1em; 
     667  background: white; 
     668  color: black; 
     669} 
     670#bwDialogBox h4 { 
     671  padding: 4px; 
     672  margin: 0; 
     673  text-align: center; 
     674  color: #eee; 
     675  background: #233979 url(../../resources/glassFill-02.gif) repeat-x bottom; 
     676  border: 2px solid #233979; 
     677} 
     678#bwDialogBox #errors, 
     679#bwDialogBox #messages { 
     680  margin: 0; 
     681} 
     682#bwDialogBox table { 
     683  width: 100%; 
     684  margin: 1em 0; 
     685} 
     686#bwDialogBox table th { 
     687  padding: 2px; 
     688  text-align: center; 
     689  color: black; 
     690  background: #eee; 
    497691} 
    498692#contactEmailAlert { 
     
    507701} 
    508702#submitTable { 
     703  position: relative; /* allows for absolute positioning within the table, e.g. #pubishBox */ 
    509704  width: 96%; /* less than 100% helps avoid IE weirdness */ 
    510705  margin-top: 1em; 
    511706} 
     707#publishBox { 
     708  position: absolute; 
     709  padding: 1em; 
     710  background-color: #ffa; 
     711  color: black; 
     712  border: 1px solid #333; 
     713  width: 420px; 
     714  height: 60px; 
     715} 
     716#publishBoxCloseButton { 
     717  position: absolute; 
     718  top: 0; 
     719  right: 0; 
     720  margin: 0; 
     721  padding: 0; 
     722} 
    512723#sharingBox { 
    513   margin: 2em 0; 
     724  margin: 0; 
    514725  border-top: 1px solid #333; 
    515 
    516 #sharingBox h3 { 
    517   padding: 1em 0 0.5em 0.5em; 
    518 
     726  padding: 1em 1em 2em 1em; 
     727
     728#bwEventTab-Access #sharingBox { 
     729  border-top: none; 
     730
     731#sharingBox h3, 
    519732#sharingBox h5 { 
    520   padding: 1em 0 0.5em 0; 
     733  padding: 0 0 0.5em 0; 
    521734} 
    522735#sharingBox ul { 
     
    524737  margin: 0 1em; 
    525738} 
    526 #sharingBox table td, 
    527 #sharingBox table th { 
    528   white-space: nowrap; 
    529 
    530 #sharing td, 
    531 #sharing th.thin { 
    532   font-size: 0.8em; 
     739#sharingBox p { 
     740  font-size: 0.9em; 
    533741} 
    534742#shareForm { 
     
    536744  padding: 0; 
    537745} 
    538 #shareFormTable
    539   /* width: 96%; less than 100% helps avoid IE weirdness */ 
    540   border-right: 1px solid #666
    541 
    542 #shareFormTable tr.subhead th { 
    543   border-left: 1px solid #666; 
     746#shareFormTable td
     747  border: 1px solid #666; 
     748  padding: 0 0 0.5em 0
     749  vertical-align: top; 
     750
     751#shareFormTable h5 { 
    544752  background: #e5e5e5; 
    545753  color: black; 
     
    547755  padding: 4px; 
    548756} 
    549 #shareFormTable td { 
    550   border-bottom: 1px solid #666; 
    551   border-left: 1px solid #666; 
    552   padding: 1em; 
    553   vertical-align: top; 
     757#shareFormTable #accessRightsToggle { 
     758  float: right; 
     759  font-weight: normal; 
     760  font-size: 0.8em; 
     761
     762#shareFormTable .whoTypes { 
     763  margin: 1em; 
     764
     765#howTable { 
     766  border: none; 
     767  padding: 0; 
     768  margin: 0; 
     769  font-size: 0.8em; 
     770  width: 100%; 
     771
     772#howTable th { 
     773  color: white; 
     774  background-color: #999; 
     775  font-weight: normal; 
     776
     777#howTable td { 
     778  white-space: nowrap; 
     779  border-top: 1px dotted #ccc; 
     780  border-right: none; 
     781  border-left: none; 
     782  border-bottom: none; 
     783  text-align: center; 
     784
     785#howTable td.level1 { 
     786  text-align: left; 
     787  font-weight: bold; 
     788
     789#howTable td.level2 { 
     790  padding-left: 2em; 
     791  text-align: left; 
     792  font-weight: bold; 
     793
     794#howTable td.level3 { 
     795  padding-left: 4em; 
     796  text-align: left; 
     797
     798#howTable td.level4 { 
     799  padding-left: 6em; 
     800  text-align: left; 
     801
     802#howTable td.level5 { 
     803  padding-left: 8em; 
     804  text-align: left; 
    554805} 
    555806#howList { 
     
    621872  width: 300px; 
    622873} 
     874 
     875#calendarTable td.bwCalsForMove { 
     876  padding-top: 1em; 
     877  font-size: 0.8em; 
     878} 
    623879#subsTable td.cals { 
    624880  width: 200px; 
     
    680936  /*font-weight: bold;*/ 
    681937} 
    682 /*#calendarTree li ul li ul li { 
    683   font-weight: normal; 
    684 }*/ 
    685938#calendarTree li.folder { 
    686939  list-style-image: url(../../resources/catIcon.gif); 
     
    697950  color: black; 
    698951  background-color: #ff3; 
     952} 
     953#calendarTree img.bwPlusMinusIcon { 
     954  /* the arrangement below is required for cross-browser compatibility; 
     955     be cautious changing it (works IE7, FF2, Safari 3) */ 
     956  position: relative; 
     957  top: -2px; 
     958  margin: 0 25px 0 -35px; 
     959} 
     960#filterTable { 
     961  font-size: 0.9em; 
     962} 
     963#filterTable th { 
     964  vertical-align: top; 
     965  border: 1px solid #ddd; 
     966  color: black; 
     967  background-color: #ddd; 
     968} 
     969#filterTable td { 
     970  vertical-align: top; 
     971  border: 1px solid #ddd; 
     972  padding: 0.5em; 
     973} 
     974#filterTable .filterdef { 
     975  white-space: pre; 
     976  padding: 1em; 
     977  color: #8B4513; 
     978  background-color: transparent; 
    699979} 
    700980#statsTable { 
  • trunk/deployment/webadmin/portlet/resources/default/default/default.xsl

    r1887 r1979  
    11<?xml version="1.0" encoding="UTF-8"?> 
    22<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    3   <xsl:output 
    4       method="html" 
    5       indent="yes
    6       media-type="text/html" 
    7       doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" 
    8       doctype-system="http://www.w3.org/TR/html4/strict.dtd" 
    9       standalone="yes" 
    10       omit-xml-declaration="yes"/> 
    11    <xsl:strip-space elements="*"/> 
     3<xsl:output 
     4     method="html" 
     5     indent="no
     6     media-type="text/html" 
     7     doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" 
     8     doctype-system="http://www.w3.org/TR/html4/strict.dtd" 
     9     standalone="yes" 
     10     omit-xml-declaration="yes"/> 
     11 <xsl:strip-space elements="*"/> 
    1212 
    1313  <!-- ======================================== --> 
     
    4141 
    4242  <!-- DEFINE INCLUDES --> 
    43   <xsl:include href="/bedework-common/default/default/errors.xsl"/> 
    44   <xsl:include href="/bedework-common/default/default/messages.xsl"/> 
     43  <xsl:include href="../../../bedework-common/default/default/errors.xsl"/> 
     44  <xsl:include href="../../../bedework-common/default/default/messages.xsl"/> 
     45  <xsl:include href="../../../bedework-common/default/default/util.xsl"/> 
    4546 
    4647  <!-- DEFINE GLOBAL CONSTANTS --> 
     
    4950       this should be changed to point to a 
    5051       web server over https to avoid mixed content errors, e.g., 
    51   <xsl:variable name="resourcesRoot" select="'https://mywebserver.edu/myresourcesdir'"/
     52  <xsl:variable name="resourcesRoot">https://mywebserver.edu/myresourcesdir</xsl:variable
    5253    --> 
    5354  <xsl:variable name="resourcesRoot" select="/bedework/approot"/> 
     
    6667       we will probably change the way we create these before long (e.g. build them 
    6768       dynamically in the xslt). --> 
     69 
     70  <xsl:variable name="submissionsRootEncoded" select="/bedework/submissionsRoot/encoded"/> 
     71  <xsl:variable name="submissionsRootUnencoded" select="/bedework/submissionsRoot/unencoded"/> 
     72 
     73  <!-- primary navigation, menu tabs --> 
    6874  <xsl:variable name="setup" select="/bedework/urlPrefixes/setup/a/@href"/> 
     75  <xsl:variable name="initPendingTab" select="/bedework/urlPrefixes/initPendingTab/a/@href"/> 
     76  <xsl:variable name="showCalsuiteTab" select="/bedework/urlPrefixes/showCalsuiteTab/a/@href"/> 
     77  <xsl:variable name="showUsersTab" select="/bedework/urlPrefixes/showUsersTab/a/@href"/> 
     78  <xsl:variable name="showSystemTab" select="/bedework/urlPrefixes/showSystemTab/a/@href"/> 
    6979  <xsl:variable name="logout" select="/bedework/urlPrefixes/logout/a/@href"/> 
    7080  <xsl:variable name="search" select="/bedework/urlPrefixes/search/search/a/@href"/> 
    7181  <xsl:variable name="search-next" select="/bedework/urlPrefixes/search/next/a/@href"/> 
     82 
    7283  <!-- events --> 
    7384  <xsl:variable name="event-showEvent" select="/bedework/urlPrefixes/event/showEvent/a/@href"/> 
     
    7889  <xsl:variable name="event-initUpdateEvent" select="/bedework/urlPrefixes/event/initUpdateEvent/a/@href"/> 
    7990  <xsl:variable name="event-delete" select="/bedework/urlPrefixes/event/delete/a/@href"/> 
     91  <xsl:variable name="event-deletePending" select="/bedework/urlPrefixes/event/deletePending/a/@href"/> 
    8092  <xsl:variable name="event-fetchForDisplay" select="/bedework/urlPrefixes/event/fetchForDisplay/a/@href"/> 
    8193  <xsl:variable name="event-fetchForUpdate" select="/bedework/urlPrefixes/event/fetchForUpdate/a/@href"/> 
     94  <xsl:variable name="event-fetchForUpdatePending" select="/bedework/urlPrefixes/event/fetchForUpdatePending/a/@href"/> 
    8295  <xsl:variable name="event-update" select="/bedework/urlPrefixes/event/update/a/@href"/> 
     96  <xsl:variable name="event-updatePending" select="/bedework/urlPrefixes/event/updatePending/a/@href"/> 
    8397  <xsl:variable name="event-selectCalForEvent" select="/bedework/urlPrefixes/event/selectCalForEvent/a/@href"/> 
    8498  <xsl:variable name="event-initUpload" select="/bedework/urlPrefixes/event/initUpload/a/@href"/> 
     
    127141  <xsl:variable name="calendar-update" select="/bedework/urlPrefixes/calendar/update/a/@href"/> 
    128142  <xsl:variable name="calendar-setAccess" select="/bedework/urlPrefixes/calendar/setAccess/a/@href"/> 
     143  <xsl:variable name="calendar-openCloseMod" select="/bedework/urlPrefixes/calendar/calOpenCloseMod/a/@href"/> 
     144  <xsl:variable name="calendar-openCloseSelect" select="/bedework/urlPrefixes/calendar/calOpenCloseSelect/a/@href"/> 
     145  <xsl:variable name="calendar-openCloseDisplay" select="/bedework/urlPrefixes/calendar/calOpenCloseDisplay/a/@href"/> 
     146  <xsl:variable name="calendar-openCloseMove" select="/bedework/urlPrefixes/calendar/calOpenCloseMove/a/@href"/> 
     147  <xsl:variable name="calendar-move" select="/bedework/urlPrefixes/calendar/move/a/@href"/> 
    129148  <!-- subscriptions --> 
    130149  <xsl:variable name="subscriptions-fetch" select="/bedework/urlPrefixes/subscriptions/fetch/a/@href"/> 
     
    132151  <xsl:variable name="subscriptions-initAdd" select="/bedework/urlPrefixes/subscriptions/initAdd/a/@href"/> 
    133152  <xsl:variable name="subscriptions-subscribe" select="/bedework/urlPrefixes/subscriptions/subscribe/a/@href"/> 
     153  <xsl:variable name="subscriptions-openCloseMod" select="/bedework/urlPrefixes/subscriptions/subOpenCloseMod/a/@href"/> 
    134154  <!-- views --> 
    135155  <xsl:variable name="view-fetch" select="/bedework/urlPrefixes/view/fetch/a/@href"/> 
     
    153173  <xsl:variable name="timezones-initUpload" select="/bedework/urlPrefixes/timezones/initUpload/a/@href"/> 
    154174  <xsl:variable name="timezones-upload" select="/bedework/urlPrefixes/timezones/upload/a/@href"/> 
     175  <xsl:variable name="timezones-fix" select="/bedework/urlPrefixes/timezones/fix/a/@href"/> 
    155176  <xsl:variable name="stats-update" select="/bedework/urlPrefixes/stats/update/a/@href"/> 
    156177  <!-- authuser and prefs --> 
     
    177198  <xsl:variable name="admingroup-updateMembers" select="/bedework/urlPrefixes/admingroup/updateMembers/a/@href"/> 
    178199  <xsl:variable name="admingroup-switch" select="/bedework/urlPrefixes/admingroup/switch/a/@href"/> 
     200  <!-- filters --> 
     201  <xsl:variable name="filter-showAddForm" select="/bedework/urlPrefixes/filter/showAddForm/a/@href"/> 
     202  <xsl:variable name="filter-add" select="/bedework/urlPrefixes/filter/add/a/@href"/> 
     203  <xsl:variable name="filter-delete" select="/bedework/urlPrefixes/filter/delete/a/@href"/> 
     204 
    179205 
    180206  <!-- URL of the web application - includes web context --> 
     
    183209  <!-- Other generally useful global variables --> 
    184210  <xsl:variable name="publicCal">/cal</xsl:variable> 
     211 
     212  <!-- the following variable can be set to "true" or "false"; 
     213       to use jQuery widgets and fancier UI features, set to false - these are 
     214       not guaranteed to work in portals. Setting to true will make the 
     215       add/edit event form much faster, but will not support internationalization. --> 
     216  <xsl:variable name="portalFriendly">false</xsl:variable> 
    185217 
    186218  <!--==== MAIN TEMPLATE  ====--> 
     
    188220    <html lang="en"> 
    189221      <head> 
    190         <title>Calendar Admin: Events Calendar Administration</title> 
     222        <title>Calendar Admin: Public Events Administration</title> 
    191223        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
    192224        <link rel="stylesheet" href="{$resourcesRoot}/default/default/default.css"/> 
    193225        <link rel="stylesheet" href="{$resourcesRoot}/default/default/subColors.css"/> 
    194         <xsl:if test="/bedework/page='modEvent'"> 
    195           <script type="text/javascript" src="{$resourcesRoot}/resources/includes.js"></script> 
    196           <script type="text/javascript" src="{$resourcesRoot}/resources/bwClock.js"></script> 
     226        <xsl:if test="/bedework/page='modEvent' or /bedework/page='modEventPending'"> 
     227          <script type="text/javascript" src="{$resourcesRoot}/resources/bedework.js">&#160;</script> 
     228          <script type="text/javascript" src="{$resourcesRoot}/resources/bwClock.js">&#160;</script> 
    197229          <link rel="stylesheet" href="{$resourcesRoot}/resources/bwClock.css"/> 
    198           <script type="text/javascript" src="{$resourcesRoot}/resources/dynCalendarWidget.js"></script> 
    199           <link rel="stylesheet" href="{$resourcesRoot}/resources/dynCalendarWidget.css"/> 
    200           <script type="text/javascript" src="{$resourcesRoot}/resources/browserSniffer.js"></script> 
     230          <xsl:choose> 
     231            <xsl:when test="$portalFriendly = 'true'"> 
     232              <script type="text/javascript" src="{$resourcesRoot}/resources/dynCalendarWidget.js">&#160;</script> 
     233              <link rel="stylesheet" href="{$resourcesRoot}/resources/dynCalendarWidget.css"/> 
     234            </xsl:when> 
     235            <xsl:otherwise> 
     236              <script type="text/javascript" src="/bedework-common/javascript/jquery/jquery-1.2.6.min.js">&#160;</script> 
     237              <script type="text/javascript" src="/bedework-common/javascript/jquery/jquery-ui-1.5.2.min.js">&#160;</script> 
     238              <link rel="stylesheet" href="/bedework-common/javascript/jquery/bedeworkJqueryThemes.css"/> 
     239              <script type="text/javascript"> 
     240                <xsl:comment> 
     241                $.datepicker.setDefaults({ 
     242                  constrainInput: true, 
     243                  dateFormat: "yy-mm-dd", 
     244                  showOn: "both", 
     245                  buttonImage: "<xsl:value-of select='$resourcesRoot'/>/resources/calIcon.gif", 
     246                  buttonImageOnly: true, 
     247                  gotoCurrent: true, 
     248                  duration: "" 
     249                }); 
     250                </xsl:comment> 
     251              </script> 
     252              <!-- script type="text/javascript" src="/bedework-common/javascript/dojo/dojo.js">&#160;</script--> 
     253            </xsl:otherwise> 
     254          </xsl:choose> 
     255          <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkEventForm.js">&#160;</script> 
     256          <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkXProperties.js">&#160;</script> 
     257          <script type="text/javascript"> 
     258            <xsl:comment> 
     259            function initRXDates() { 
     260              // return string values to be loaded into javascript for rdates 
     261              <xsl:for-each select="/bedework/formElements/form/rdates/rdate"> 
     262                bwRdates.update('<xsl:value-of select="date"/>','<xsl:value-of select="time"/>',false,false,false,'<xsl:value-of select="tzid"/>'); 
     263              </xsl:for-each> 
     264              // return string values to be loaded into javascript for exdates 
     265              <xsl:for-each select="/bedework/formElements/form/exdates/rdate"> 
     266                bwExdates.update('<xsl:value-of select="date"/>','<xsl:value-of select="time"/>',false,false,false,'<xsl:value-of select="tzid"/>'); 
     267              </xsl:for-each> 
     268            } 
     269            function initXProperties() { 
     270              <xsl:for-each select="/bedework/formElements/form/xproperties/node()[text()]"> 
     271                bwXProps.init('<xsl:value-of select="name()"/>',[<xsl:for-each select="parameters/node()">['<xsl:value-of select="name()"/>','<xsl:value-of select="node()"/>']<xsl:if test="position() != last()">,</xsl:if></xsl:for-each>],'<xsl:call-template name="escapeApos"><xsl:with-param name="str"><xsl:value-of select="values/text"/></xsl:with-param></xsl:call-template>'); 
     272              </xsl:for-each> 
     273            } 
     274            </xsl:comment> 
     275          </script> 
     276        </xsl:if> 
     277        <xsl:if test="/bedework/page='modCalendar' or /bedework/page='modCalSuite'"> 
     278          <script type="text/javascript" src="{$resourcesRoot}/resources/bedework.js">&#160;</script> 
     279          <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkAccess.js">&#160;</script> 
    201280        </xsl:if> 
    202281        <xsl:if test="/bedework/page='upload' or /bedework/page='selectCalForEvent'"> 
    203           <script type="text/javascript" src="{$resourcesRoot}/resources/includes.js"></script> 
     282          <script type="text/javascript" src="{$resourcesRoot}/resources/bedework.js">&#160;</script> 
    204283        </xsl:if> 
    205284        <xsl:if test="/bedework/page='calendarDescriptions' or /bedework/page='displayCalendar'"> 
    206285          <link rel="stylesheet" href="{$resourcesRoot}/resources/calendarDescriptions.css"/> 
    207286        </xsl:if> 
     287        <xsl:if test="/bedework/page='addFilter'"> 
     288          <script type="text/javascript" src="{$resourcesRoot}/resources/bedework.js">&#160;</script> 
     289        </xsl:if> 
    208290        <link rel="icon" type="image/ico" href="{$resourcesRoot}/resources/bedework.ico" /> 
    209291        <script language="JavaScript" type="text/javascript"> 
    210292          <xsl:comment> 
    211         <![CDATA[ 
    212         // places the cursor in the first available form element when the page is loaded 
    213         // (if a form exists on the page) 
    214         function focusFirstElement() { 
    215           if (window.document.forms[0]) { 
    216             window.document.forms[0].elements[0].focus(); 
    217           } 
    218         }]]> 
    219         </xsl:comment> 
     293          <![CDATA[ 
     294          // places the cursor in the first available form element when the page is loaded 
     295          // (if a form exists on the page) 
     296          function focusFirstElement() { 
     297            if (window.document.forms[0]) { 
     298              for (i=0; i<window.document.forms[0].elements.length; i++) { 
     299                if (window.document.forms[0].elements[i].type != "submit" && 
     300                    window.document.forms[0].elements[i].type != "reset" ) { 
     301                  window.document.forms[0].elements[i].focus(); 
     302                  break; 
     303                } 
     304              } 
     305            } 
     306          }]]> 
     307          </xsl:comment> 
    220308        </script> 
    221309      </head> 
    222       <body onLoad="focusFirstElement()"> 
     310      <body> 
     311        <xsl:choose> 
     312          <xsl:when test="(/bedework/page='modEvent' or /bedework/page='modEventPending') and /bedework/formElements/recurrenceId=''"> 
     313            <xsl:attribute name="onload">initRXDates();initXProperties();focusFirstElement();</xsl:attribute> 
     314          </xsl:when> 
     315          <xsl:otherwise> 
     316            <xsl:attribute name="onload">focusFirstElement();</xsl:attribute> 
     317          </xsl:otherwise> 
     318        </xsl:choose> 
    223319        <xsl:choose> 
    224320          <xsl:when test="/bedework/page='selectCalForEvent'"> 
     
    229325            <div id="content"> 
    230326              <xsl:choose> 
     327                <xsl:when test="/bedework/page='tabPendingEvents'"> 
     328                  <xsl:call-template name="tabPendingEvents"/> 
     329                </xsl:when> 
     330                <xsl:when test="/bedework/page='tabCalsuite'"> 
     331                  <xsl:call-template name="tabCalsuite"/> 
     332                </xsl:when> 
     333                <xsl:when test="/bedework/page='tabUsers'"> 
     334                  <xsl:call-template name="tabUsers"/> 
     335                </xsl:when> 
     336                <xsl:when test="/bedework/page='tabSystem'"> 
     337                  <xsl:call-template name="tabSystem"/> 
     338                </xsl:when> 
    231339                <xsl:when test="/bedework/page='eventList'"> 
    232340                  <xsl:call-template name="eventList"/> 
    233341                </xsl:when> 
    234                 <xsl:when test="/bedework/page='modEvent'"> 
     342                <xsl:when test="/bedework/page='modEvent' or 
     343                               /bedework/page='modEventPending'"> 
    235344                  <xsl:apply-templates select="/bedework/formElements" mode="modEvent"/> 
    236345                </xsl:when> 
    237                 <xsl:when test="/bedework/page='displayEvent' or /bedework/page='deleteEventConfirm'"> 
     346                <xsl:when test="/bedework/page='displayEvent' or 
     347                                /bedework/page='deleteEventConfirm' or 
     348                                /bedework/page='deleteEventConfirmPending'"> 
    238349                  <xsl:apply-templates select="/bedework/event" mode="displayEvent"/> 
    239350                </xsl:when> 
     
    244355                  <xsl:call-template name="modContact"/> 
    245356                </xsl:when> 
    246                 <xsl:when test="/bedework/page='deleteContactConfirm' or /bedework/page='contactReferenced'"> 
     357                <xsl:when test="/bedework/page='deleteContactConfirm' or 
     358                                /bedework/page='contactReferenced'"> 
    247359                  <xsl:call-template name="deleteContactConfirm"/> 
    248360                </xsl:when> 
     
    265377                  <xsl:call-template name="deleteCategoryConfirm"/> 
    266378                </xsl:when> 
    267                 <xsl:when test="/bedework/page='calendarList' or /bedework/page='calendarDescriptions' or /bedework/page='displayCalendar' or /bedework/page='modCalendar' or /bedework/page='deleteCalendarConfirm' or /bedework/page='calendarReferenced'"> 
    268                   <xsl:apply-templates select="/bedework/calendars"/> 
     379                <xsl:when test="/bedework/page='calendarList' or 
     380                                /bedework/page='calendarDescriptions' or 
     381                                /bedework/page='displayCalendar' or 
     382                                /bedework/page='modCalendar' or 
     383                                /bedework/page='deleteCalendarConfirm' or 
     384                                /bedework/page='calendarReferenced'"> 
     385                  <xsl:apply-templates select="/bedework/calendars" mode="calendarCommon"/> 
    269386                </xsl:when> 
    270                 <xsl:when test="/bedework/page='subscriptions' or /bedework/page='modSubscription'"> 
     387                <xsl:when test="/bedework/page='moveCalendar'"> 
     388                  <xsl:call-template name="calendarMove"/> 
     389                </xsl:when> 
     390                <xsl:when test="/bedework/page='subscriptions' or 
     391                                /bedework/page='modSubscription'"> 
    271392                  <xsl:apply-templates select="/bedework/subscriptions"/> 
    272393                </xsl:when> 
     
    319440                  <xsl:call-template name="deleteAdminGroupConfirm"/> 
    320441                </xsl:when> 
     442                <xsl:when test="/bedework/page='addFilter'"> 
     443                  <xsl:call-template name="addFilter"/> 
     444                </xsl:when> 
    321445                <xsl:when test="/bedework/page='searchResult'"> 
    322446                  <xsl:call-template name="searchResult"/> 
     
    367491  </xsl:template> 
    368492 
     493 
     494  <!--==== HEADER TEMPLATES and NAVIGATION  ====--> 
     495 
     496  <xsl:template name="header"> 
     497    <div id="header"> 
     498      <a href="/bedework/"> 
     499        <img id="logo" 
     500            alt="logo" 
     501            src="{$resourcesRoot}/resources/bedeworkAdminLogo.gif" 
     502            width="217" 
     503            height="40" 
     504            border="0"/> 
     505      </a> 
     506      <!-- set the page heading: --> 
     507      <h1> 
     508        <xsl:choose> 
     509          <xsl:when test="/bedework/page='modEvent' or /bedework/page='eventList' or /bedework/page='displayEvent'"> 
     510            Manage Events 
     511          </xsl:when> 
     512          <xsl:when test="/bedework/page='contactList' or /bedework/page='modContact' or /bedework/page='deleteContactConfirm'"> 
     513            Manage Contacts 
     514          </xsl:when> 
     515          <xsl:when test="/bedework/page='locationList' or /bedework/page='modLocation' or /bedework/page='deleteLocationConfirm'"> 
     516            Manage Locations 
     517          </xsl:when> 
     518          <xsl:when test="/bedework/page='calendarList' or /bedework/page='modCalendar' or /bedework/page='calendarReferenced' or /bedework/page='deleteCalendarConfirm'"> 
     519            Manage Calendars 
     520          </xsl:when> 
     521          <xsl:when test="/bedework/page='calendarDescriptions' or /bedework/page='displayCalendar'"> 
     522            Public Calendars 
     523          </xsl:when> 
     524          <xsl:when test="/bedework/page='subscriptions' or /bedework/page='modSubscription'"> 
     525            Manage Subscriptions 
     526          </xsl:when> 
     527          <xsl:when test="/bedework/page='views' or /bedework/page='modView'"> 
     528            Manage Views 
     529          </xsl:when> 
     530          <xsl:when test="/bedework/page='modSyspars'"> 
     531            Manage System Preferences 
     532          </xsl:when> 
     533          <xsl:when test="/bedework/page='authUserList' or /bedework/page='modAuthUser'"> 
     534            Manage Administrative Roles 
     535          </xsl:when> 
     536          <xsl:when test="/bedework/page='chooseGroup'"> 
     537            Choose Administrative Group 
     538          </xsl:when> 
     539          <xsl:when test="/bedework/page='adminGroupList' or /bedework/page='modAdminGroup' or /bedework/page='modAdminGroup' or /bedework/page='modAdminGroupMembers'"> 
     540            Manage Administrative Groups 
     541          </xsl:when> 
     542          <xsl:when test="/bedework/page='noGroup'"> 
     543            No Administrative Group 
     544          </xsl:when> 
     545          <xsl:when test="/bedework/page='uploadTimezones'"> 
     546            Manage Time Zones 
     547          </xsl:when> 
     548          <xsl:when test="/bedework/page='noAccess'"> 
     549            Access Denied 
     550          </xsl:when> 
     551          <xsl:when test="/bedework/page='error'"> 
     552            Error 
     553          </xsl:when> 
     554          <xsl:otherwise> 
     555            Bedework Public Events Administration 
     556          </xsl:otherwise> 
     557        </xsl:choose> 
     558      </h1> 
     559    </div> 
     560    <xsl:call-template name="messagesAndErrors"/> 
     561    <table id="statusBarTable"> 
     562      <tr> 
     563        <td class="leftCell"> 
     564          <a href="{$setup}">Home</a> 
     565          <a href="{$publicCal}" target="calendar">Launch Calendar</a> 
     566          <a href="{$logout}" id="bwLogoutButton">Log Out</a> 
     567        </td> 
     568        <xsl:if test="/bedework/userInfo/user"> 
     569          <td class="rightCell"> 
     570            <xsl:if test="/bedework/currentCalSuite/name"> 
     571              Calendar Suite: 
     572              <span class="status"> 
     573                <xsl:value-of select="/bedework/currentCalSuite/name"/> 
     574              </span> 
     575              &#160; 
     576            </xsl:if> 
     577            Logged in as: 
     578            <span class="status"> 
     579              <xsl:value-of select="/bedework/userInfo/currentUser"/> 
     580            </span> 
     581            &#160; 
     582            <xsl:if test="/bedework/userInfo/group"> 
     583              Group: 
     584              <span class="status"> 
     585                <xsl:value-of select="/bedework/userInfo/group"/> 
     586              </span> 
     587            </xsl:if> 
     588          </td> 
     589        </xsl:if> 
     590      </tr> 
     591    </table> 
     592    <xsl:if test="/bedework/userInfo/group"> 
     593      <!-- user has selected a group, so show menu tabs --> 
     594      <ul id="bwAdminMenu"> 
     595        <li> 
     596          <xsl:if test="/bedework/tab = 'main'"> 
     597            <xsl:attribute name="class">selected</xsl:attribute> 
     598          </xsl:if> 
     599          <a href="{$setup}&amp;listAllEvents=false">Main Menu</a> 
     600        </li> 
     601        <li> 
     602          <xsl:if test="/bedework/tab = 'pending'"> 
     603            <xsl:attribute name="class">selected</xsl:attribute> 
     604          </xsl:if> 
     605          <a href="{$initPendingTab}&amp;calPath={$submissionsRootEncoded}&amp;listAllEvents=true">Pending Events</a> 
     606        </li> 
     607        <xsl:if test="/bedework/currentCalSuite/currentAccess/current-user-privilege-set/privilege/write or /bedework/userInfo/superUser='true'"> 
     608          <li> 
     609            <xsl:if test="/bedework/tab = 'calsuite'"> 
     610              <xsl:attribute name="class">selected</xsl:attribute> 
     611            </xsl:if> 
     612            <a href="{$showCalsuiteTab}">Calendar Suite</a> 
     613          </li> 
     614        </xsl:if> 
     615        <xsl:if test="/bedework/userInfo/superUser='true'"> 
     616          <li> 
     617            <xsl:if test="/bedework/tab = 'users'"> 
     618              <xsl:attribute name="class">selected</xsl:attribute> 
     619            </xsl:if> 
     620            <a href="{$showUsersTab}">Users</a> 
     621          </li> 
     622          <li> 
     623            <xsl:if test="/bedework/tab = 'system'"> 
     624              <xsl:attribute name="class">selected</xsl:attribute> 
     625            </xsl:if> 
     626            <a href="{$showSystemTab}">System</a> 
     627          </li> 
     628        </xsl:if> 
     629      </ul> 
     630    </xsl:if> 
     631  </xsl:template> 
     632 
     633  <xsl:template name="messagesAndErrors"> 
     634    <xsl:if test="/bedework/message"> 
     635      <ul id="messages"> 
     636        <xsl:for-each select="/bedework/message"> 
     637          <li><xsl:apply-templates select="."/></li> 
     638        </xsl:for-each> 
     639      </ul> 
     640    </xsl:if> 
     641    <xsl:if test="/bedework/error"> 
     642      <ul id="errors"> 
     643        <xsl:for-each select="/bedework/error"> 
     644          <li><xsl:apply-templates select="."/></li> 
     645        </xsl:for-each> 
     646      </ul> 
     647    </xsl:if> 
     648  </xsl:template> 
     649 
    369650  <!--==============================================--> 
    370651  <!--==============================================--> 
     
    373654  <!--==============================================--> 
    374655 
    375   <!--+++++++++++++++ Main Menu ++++++++++++++++++++--> 
     656  <!--+++++++++++++++ Main Menu Tab ++++++++++++++++++++--> 
    376657  <xsl:template name="mainMenu"> 
    377     <div id="adminLeftColumn"> 
    378       <h2 class="menuTitle">Main Menu</h2> 
    379       <table id="mainMenuTable"> 
    380         <tr> 
    381           <th>Events</th> 
    382           <td> 
    383             <a id="addEventLink" href="{$event-initAddEvent}"> 
    384               Add 
    385             </a> 
    386           </td> 
    387           <td> 
    388             <a href="{$event-initUpdateEvent}"> 
    389               Edit / Delete 
    390             </a> 
    391           </td> 
    392           <!-- 
    393           Disable direct selection by ID; we'll need to find another way 
    394           of quickly getting to events: search and grid views should be implemented. --> 
    395           <!-- 
    396           <td> 
    397             Event ID: 
    398             <xsl:copy-of select="/bedework/formElements/*"/> 
    399           </td>--> 
    400         </tr> 
    401         <tr> 
    402           <th>Contacts</th> 
    403           <td> 
    404             <a id="addContactLink" href="{$contact-initAdd}"> 
    405               Add 
    406             </a> 
    407           </td> 
    408           <td> 
    409             <a href="{$contact-initUpdate}"> 
    410               Edit / Delete 
    411             </a> 
    412           </td> 
    413         </tr> 
    414         <tr> 
    415           <th>Locations</th> 
    416           <td> 
    417             <a id="addLocationLink" href="{$location-initAdd}"> 
    418               Add 
    419             </a> 
    420           </td> 
    421           <td> 
    422             <a href="{$location-initUpdate}"> 
    423               Edit / Delete 
    424             </a> 
    425           </td> 
    426         </tr> 
    427         <tr> 
    428           <th>Categories</th> 
    429           <td> 
    430             <a id="addCategoryLink" href="{$category-initAdd}"> 
    431               Add 
    432             </a> 
    433           </td> 
    434           <td> 
    435             <a href="{$category-initUpdate}"> 
    436               Edit / Delete 
    437             </a> 
    438           </td> 
    439         </tr> 
    440       </table> 
    441  
     658 
     659    <table id="mainMenu"> 
     660      <tr> 
     661        <td> 
     662          <a id="addEventLink" href="{$event-initAddEvent}"> 
     663            <img src="{$resourcesRoot}/resources/bwAdminAddEventIcon.jpg" width="140" height="140" alt="Add Event" border="0"/> 
     664            <br/>Add Event 
     665          </a> 
     666        </td> 
     667        <td> 
     668          <a id="addContactLink" href="{$contact-initAdd}"> 
     669            <img src="{$resourcesRoot}/resources/bwAdminAddContactIcon.jpg" width="100" height="100" alt="Add Event" border="0"/> 
     670            <br/>Add Contact 
     671          </a> 
     672        </td> 
     673        <td> 
     674          <a id="addLocationLink" href="{$location-initAdd}"> 
     675            <img src="{$resourcesRoot}/resources/bwAdminAddLocationIcon.jpg" width="100" height="100" alt="Add Event" border="0"/> 
     676            <br/>Add Location 
     677          </a> 
     678        </td> 
     679        <td> 
     680          <a id="addCategoryLink" href="{$category-initAdd}"> 
     681            <img src="{$resourcesRoot}/resources/bwAdminAddCategoryIcon.jpg" width="100" height="100" alt="Add Event" border="0"/> 
     682            <br/>Add Category 
     683          </a> 
     684        </td> 
     685      </tr> 
     686      <tr> 
     687        <td> 
     688          <a href="{$event-initUpdateEvent}"> 
     689            <img src="{$resourcesRoot}/resources/bwAdminManageEventsIcon.jpg" width="100" height="73" alt="Manage Events" border="0"/> 
     690            <br/>Manage Events 
     691          </a> 
     692        </td> 
     693        <td> 
     694          <a href="{$contact-initUpdate}"> 
     695            <img src="{$resourcesRoot}/resources/bwAdminManageContactsIcon.jpg" width="100" height="73" alt="Manage Events" border="0"/> 
     696            <br/>Manage Contacts 
     697          </a> 
     698        </td> 
     699        <td> 
     700          <a href="{$location-initUpdate}"> 
     701            <img src="{$resourcesRoot}/resources/bwAdminManageLocsIcon.jpg" width="100" height="73" alt="Manage Events" border="0"/> 
     702            <br/>Manage Locations 
     703          </a> 
     704        </td> 
     705        <td> 
     706          <a href="{$category-initUpdate}"> 
     707            <img src="{$resourcesRoot}/resources/bwAdminManageCatsIcon.jpg" width="100" height="73" alt="Manage Events" border="0"/> 
     708            <br/>Manage Categories 
     709          </a> 
     710        </td> 
     711      </tr> 
     712    </table> 
     713 
     714    <!-- 
     715    <h2 class="menuTitle">Main Menu</h2> 
     716    <table id="mainMenuTable"> 
     717      <tr> 
     718        <th>Events</th> 
     719        <td> 
     720          <a id="addEventLink" href="{$event-initAddEvent}"> 
     721            Add 
     722          </a> 
     723        </td> 
     724        <td> 
     725          <a href="{$event-initUpdateEvent}"> 
     726            Edit / Delete 
     727          </a> 
     728        </td> 
     729        <!- - 
     730        Disable direct selection by ID; we'll need to find another way 
     731        of quickly getting to events: search and grid views should be implemented. - - > 
     732        <!- - 
     733        <td> 
     734          Event ID: 
     735          <xsl:copy-of select="/bedework/formElements/*"/> 
     736        </td>- - > 
     737      </tr> 
     738      <tr> 
     739        <th>Contacts</th> 
     740        <td> 
     741          <a id="addContactLink" href="{$contact-initAdd}"> 
     742            Add 
     743          </a> 
     744        </td> 
     745        <td> 
     746          <a href="{$contact-initUpdate}"> 
     747            Edit / Delete 
     748          </a> 
     749        </td> 
     750      </tr> 
     751      <tr> 
     752        <th>Locations</th> 
     753        <td> 
     754          <a id="addLocationLink" href="{$location-initAdd}"> 
     755            Add 
     756          </a> 
     757        </td> 
     758        <td> 
     759          <a href="{$location-initUpdate}"> 
     760            Edit / Delete 
     761          </a> 
     762        </td> 
     763      </tr> 
     764      <tr> 
     765        <th>Categories</th> 
     766        <td> 
     767          <a id="addCategoryLink" href="{$category-initAdd}"> 
     768            Add 
     769          </a> 
     770        </td> 
     771        <td> 
     772          <a href="{$category-initUpdate}"> 
     773            Edit / Delete 
     774          </a> 
     775        </td> 
     776      </tr> 
     777    </table> 
     778    --> 
     779    <div id="mainMenuEventSearch"> 
    442780      <h4 class="menuTitle">Event search:</h4> 
    443781      <form name="searchForm" method="post" action="{$search}" id="searchForm"> 
     
    453791        </div> 
    454792      </form> 
    455  
    456793    </div> 
    457  
    458     <div id="adminRightColumn"> 
    459       <xsl:if test="/bedework/currentCalSuite/currentAccess/current-user-privilege-set/privilege/write or /bedework/userInfo/superUser='true'"> 
    460         <h4 class="menuTitle"> 
    461           Manage calendar suite: 
    462           <em><xsl:value-of select="/bedework/currentCalSuite/name"/> 
    463           </em> 
    464         </h4> 
    465         <ul class="adminMenu"> 
     794  </xsl:template> 
     795 
     796  <!--+++++++++++++++ Pending Events Tab ++++++++++++++++++++--> 
     797  <xsl:template name="tabPendingEvents"> 
     798    <h2>Pending Events</h2> 
     799    <p>The following events were submitted to the calendar:</p> 
     800    <xsl:call-template name="eventListCommon"> 
     801      <xsl:with-param name="pending">true</xsl:with-param> 
     802    </xsl:call-template> 
     803  </xsl:template> 
     804 
     805  <!--+++++++++++++++ Calendar Suite Tab ++++++++++++++++++++--> 
     806  <xsl:template name="tabCalsuite"> 
     807    <xsl:if test="/bedework/currentCalSuite/currentAccess/current-user-privilege-set/privilege/write or /bedework/userInfo/superUser='true'"> 
     808      <h2> 
     809        Manage Current Calendar Suite 
     810      </h2> 
     811      <div id="calSuiteTitle"> 
     812        Calendar Suite: 
     813        <strong><xsl:value-of select="/bedework/currentCalSuite/name"/></strong> 
     814        <xsl:text> </xsl:text> 
     815        <a href="{$admingroup-switch}" class="fieldInfo">change</a> 
     816      </div> 
     817      <ul class="adminMenu"> 
     818        <li> 
     819          <a href="{$subscriptions-fetch}" title="subscriptions to calendars"> 
     820            Manage subscriptions 
     821          </a> 
     822        </li> 
     823        <li> 
     824          <a href="{$view-fetch}" title="collections of subscriptions"> 
     825            Manage views 
     826          </a> 
     827        </li> 
     828        <li> 
     829          <a href="{$calsuite-fetchPrefsForUpdate}" title="calendar suite defaults such as viewperiod and view"> 
     830            Manage preferences 
     831          </a> 
     832        </li> 
     833      </ul> 
     834    </xsl:if> 
     835  </xsl:template> 
     836 
     837  <!--+++++++++++++++ User/Group Tab ++++++++++++++++++++--> 
     838  <xsl:template name="tabUsers"> 
     839    <xsl:if test="/bedework/userInfo/superUser='true'"> 
     840      <h2>Manage Users &amp; Groups</h2> 
     841      <ul class="adminMenu"> 
     842        <xsl:if test="/bedework/userInfo/userMaintOK='true'"> 
    466843          <li> 
    467             <a href="{$calendar-fetch}"> 
    468               Manage calendar
     844            <a href="{$authuser-initUpdate}"> 
     845              Manage admin role
    469846            </a> 
    470847          </li> 
     848        </xsl:if> 
     849        <xsl:if test="/bedework/userInfo/adminGroupMaintOk='true'"> 
    471850          <li> 
    472             <a href="{$subscriptions-fetch}"> 
    473               Manage subscription
     851            <a href="{$admingroup-initUpdate}"> 
     852              Manage admin group
    474853            </a> 
    475854          </li> 
     855        </xsl:if> 
     856        <li> 
     857          <a href="{$admingroup-switch}"> 
     858            Change group... 
     859          </a> 
     860        </li> 
     861        <xsl:if test="/bedework/userInfo/userMaintOK='true'"> 
    476862          <li> 
    477             <a href="{$view-fetch}"> 
    478               Manage views 
    479             </a> 
     863            <form action="{$prefs-fetchForUpdate}" method="post"> 
     864              Edit user preferences (enter userid):<br/> 
     865              <input type="text" name="user" size="15"/> 
     866              <input type="submit" name="getPrefs" value="go"/> 
     867            </form> 
    480868          </li> 
    481           <li> 
    482             <a href="{$calsuite-fetchPrefsForUpdate}"> 
    483               Manage preferences 
    484             </a> 
    485           </li> 
    486           <li> 
    487             <a href="{$event-initUpload}"> 
    488               Upload iCAL file 
    489             </a> 
    490           </li> 
    491         </ul> 
    492       </xsl:if> 
    493  
    494       <xsl:if test="/bedework/userInfo/contentAdminUser='true'"> 
    495         <h4 class="menuTitle">Manage users:</h4> 
    496         <ul class="adminMenu"> 
    497           <xsl:if test="/bedework/userInfo/userMaintOK='true'"> 
     869        </xsl:if> 
     870      </ul> 
     871    </xsl:if> 
     872  </xsl:template> 
     873 
     874  <!--+++++++++++++++ System Tab ++++++++++++++++++++--> 
     875  <xsl:template name="tabSystem"> 
     876    <xsl:if test="/bedework/userInfo/superUser='true'"> 
     877      <h2>Manage System</h2> 
     878      <ul class="adminMenu"> 
     879        <li> 
     880          <a href="{$calendar-fetch}"> 
     881            Manage calendars 
     882          </a> 
     883        </li> 
     884        <li> 
     885          <a href="{$calsuite-fetch}"> 
     886            Manage calendar suites 
     887          </a> 
     888        </li> 
     889        <li> 
     890          <a href="{$filter-showAddForm}"> 
     891            Manage CalDAV filters 
     892          </a> 
     893        </li> 
     894        <li> 
     895          <a href="{$event-initUpload}"> 
     896            Upload iCAL file 
     897          </a> 
     898        </li> 
     899      </ul> 
     900      <ul class="adminMenu"> 
     901        <li> 
     902          <a href="{$system-fetch}"> 
     903            Manage system preferences 
     904          </a> 
     905        </li> 
     906        <li> 
     907          <a href="{$timezones-initUpload}"> 
     908            Manage system timezones 
     909          </a> 
     910        </li> 
     911      </ul> 
     912      <ul class="adminMenu"> 
     913        <li> 
     914          Statistics: 
     915          <ul> 
    498916            <li> 
    499               <a href="{$authuser-initUpdate}"> 
    500                 Manage public event administrators 
     917              <a href="{$stats-update}&amp;fetch=yes"> 
     918                admin web client 
    501919              </a> 
    502920            </li> 
    503           </xsl:if> 
    504           <xsl:if test="/bedework/userInfo/adminGroupMaintOk='true'"> 
    505921            <li> 
    506               <a href="{$admingroup-initUpdate}"> 
    507                 Manage admin groups 
     922              <a href="{$publicCal}/stats.do" target="pubClient"> 
     923                public web client 
    508924              </a> 
    509925            </li> 
    510           </xsl:if> 
    511           <li> 
    512             <a href="{$admingroup-switch}"> 
    513               Choose/change group... 
    514             </a> 
    515           </li> 
    516           <xsl:if test="/bedework/userInfo/userMaintOK='true'"> 
    517             <li> 
    518               <form action="{$prefs-fetchForUpdate}" method="post"> 
    519                 Edit user preferences (enter userid):<br/> 
    520                 <input type="text" name="user" size="15"/> 
    521                 <input type="submit" name="getPrefs" value="go"/> 
    522               </form> 
    523             </li> 
    524           </xsl:if> 
    525         </ul> 
    526       </xsl:if> 
    527  
    528       <xsl:if test="/bedework/userInfo/superUser='true'"> 
    529         <h4 class="menuTitle">Super user features:</h4> 
    530         <ul class="adminMenu"> 
    531           <li> 
    532             <a href="{$calsuite-fetch}"> 
    533               Manage calendar suites 
    534             </a> 
    535           </li> 
    536           <li> 
    537             <a href="{$system-fetch}"> 
    538               Manage system preferences 
    539             </a> 
    540           </li> 
    541           <li> 
    542             <a href="{$timezones-initUpload}"> 
    543               Upload and replace system timezones 
    544             </a> 
    545           </li> 
    546           <li> 
    547             System statistics: 
    548             <ul> 
    549               <li> 
    550                 <a href="{$stats-update}&amp;fetch=yes"> 
    551                   admin web client 
    552                 </a> 
    553               </li> 
    554               <li> 
    555                 <a href="{$publicCal}/stats.do" target="pubClient"> 
    556                   public web client 
    557                 </a> 
    558               </li> 
    559             </ul> 
    560           </li> 
    561         </ul> 
    562       </xsl:if> 
    563     </div> 
     926          </ul> 
     927        </li> 
     928      </ul> 
     929    </xsl:if> 
    564930  </xsl:template> 
    565931 
     
    572938    </p> 
    573939 
    574     <form name="peForm" method="post" action="{$event-initUpdateEvent}"> 
     940    <form name="calForm" method="post" action="{$event-initUpdateEvent}"> 
    575941      <table> 
    576942        <tr> 
     
    588954    </form> 
    589955 
     956    <xsl:call-template name="eventListCommon"/> 
     957  </xsl:template> 
     958 
     959  <xsl:template name="eventListCommon"> 
     960    <xsl:param name="pending">false</xsl:param> 
    590961    <table id="commonListTable"> 
    591962      <tr> 
    592963        <th>Title</th> 
    593         <th>Start Date</th> 
    594         <th>End Date</th> 
    595         <th>Calendar</th> 
     964        <th>Start</th> 
     965        <th>End</th> 
     966        <xsl:choose> 
     967          <xsl:when test="$pending = 'true'"> 
     968            <th>Categories</th> 
     969          </xsl:when> 
     970          <xsl:otherwise> 
     971            <th>Calendar</th> 
     972          </xsl:otherwise> 
     973        </xsl:choose> 
    596974        <th>Description</th> 
    597975      </tr> 
     
    604982        <tr> 
    605983          <td> 
    606             <a href="{$event-fetchForUpdate}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    607               <xsl:value-of select="summary"/> 
    608             </a> 
     984            <xsl:choose> 
     985              <xsl:when test="$pending = 'true'"> 
     986                <a href="{$event-fetchForUpdatePending}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     987                  <xsl:choose> 
     988                    <xsl:when test="summary != ''"> 
     989                      <xsl:value-of select="summary"/> 
     990                    </xsl:when> 
     991                    <xsl:otherwise> 
     992                      <em>no title</em> 
     993                    </xsl:otherwise> 
     994                  </xsl:choose> 
     995                </a> 
     996              </xsl:when> 
     997              <xsl:otherwise> 
     998                <a href="{$event-fetchForUpdate}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     999                  <xsl:choose> 
     1000                    <xsl:when test="summary != ''"> 
     1001                      <xsl:value-of select="summary"/> 
     1002                    </xsl:when> 
     1003                    <xsl:otherwise> 
     1004                      <em>no title</em> 
     1005                    </xsl:otherwise> 
     1006                  </xsl:choose> 
     1007                </a> 
     1008              </xsl:otherwise> 
     1009            </xsl:choose> 
    6091010          </td> 
    6101011          <td class="date"> 
    611             <xsl:value-of select="start/longdate"/>, 
     1012            <xsl:value-of select="start/shortdate"/> 
     1013            <xsl:text> </xsl:text> 
    6121014            <xsl:value-of select="start/time"/> 
    6131015          </td> 
    6141016          <td class="date"> 
    615             <xsl:value-of select="end/longdate"/>, 
     1017            <xsl:value-of select="end/shortdate"/> 
     1018            <xsl:text> </xsl:text> 
    6161019            <xsl:value-of select="end/time"/> 
    6171020          </td> 
    618           <td> 
    619             <xsl:value-of select="calendar/name"/> 
     1021          <td class="calcat"> 
     1022            <xsl:choose> 
     1023              <xsl:when test="$pending = 'true'"> 
     1024                <xsl:for-each select="categories/category"> 
     1025                  <xsl:value-of select="word"/><br/> 
     1026                </xsl:for-each> 
     1027              </xsl:when> 
     1028              <xsl:otherwise> 
     1029                <xsl:value-of select="calendar/name"/> 
     1030              </xsl:otherwise> 
     1031            </xsl:choose> 
    6201032          </td> 
    6211033          <td> 
    6221034            <xsl:value-of select="description"/> 
    623             <xsl:if test="recurring = 'true'"> 
     1035            <xsl:if test="recurring = 'true' or recurrenceId != ''"> 
    6241036              <div class="recurrenceEditLinks"> 
    6251037                Recurring event. 
     
    6481060    <h2>Event Information</h2> 
    6491061 
    650     <xsl:variable name="modEventAction" select="form/@action"/> 
    651     <form name="peForm" method="post" action="{$modEventAction}" onsubmit="setRecurrence(this)"> 
     1062    <!-- if a submitted event has comments, display them --> 
     1063    <xsl:if test="form/xproperties/node()[name()='X-BEDEWORK-LOCATION' or name()='X-BEDEWORK-CONTACT' or name()='X-BEDEWORK-CATEGORIES' or name()='X-BEDEWORK-SUBMIT-COMMENT']"> 
     1064      <script type="text/javascript"> 
     1065        bwSubmitComment = new bwSubmitComment( 
     1066          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/values/text"/></xsl:call-template>', 
     1067          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/parameters/node()[name()='X-BEDEWORK-PARAM-SUBADDRESS']"/></xsl:call-template>', 
     1068          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-LOCATION']/parameters/node()[name()='X-BEDEWORK-PARAM-URL']"/></xsl:call-template>', 
     1069          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/values/text"/></xsl:call-template>', 
     1070          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-PHONE']"/></xsl:call-template>', 
     1071          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-URL']"/></xsl:call-template>', 
     1072          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CONTACT']/parameters/node()[name()='X-BEDEWORK-PARAM-EMAIL']"/></xsl:call-template>', 
     1073          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-CATEGORIES']/values/text"/></xsl:call-template>', 
     1074          '<xsl:call-template name="escapeApos"><xsl:with-param name="str" select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/values/text"/></xsl:call-template>'); 
     1075      </script> 
     1076 
     1077      <div id="bwSubmittedEventCommentBlock"> 
     1078        <div id="bwSubmittedBy">Submitted by <xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTEDBY']/values/text"/></div> 
     1079        <h4>Comments from Submitter</h4> 
     1080        <a href="javascript:toggleVisibility('bwSubmittedEventComment','visible');" class="toggle">show/hide</a> 
     1081        <a href="javascript:bwSubmitComment.launch();" class="toggle">pop-up</a> 
     1082        <div id="bwSubmittedEventComment"> 
     1083          <xsl:if test="/bedework/page = 'modEvent'"><xsl:attribute name="class">invisible</xsl:attribute></xsl:if> 
     1084        </div> 
     1085      </div> 
     1086      <script type="text/javascript"> 
     1087        bwSubmitComment.display('bwSubmittedEventComment'); 
     1088      </script> 
     1089    </xsl:if> 
     1090 
     1091    <xsl:variable name="submitter"> 
     1092      <xsl:choose> 
     1093        <xsl:when test="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTEDBY']"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMITTEDBY']/values/text"/></xsl:when> 
     1094        <xsl:otherwise><xsl:value-of select="/bedework/userInfo/currentUser"/> for <xsl:value-of select="/bedework/userInfo/group"/> (<xsl:value-of select="/bedework/userInfo/user"/>)</xsl:otherwise> 
     1095      </xsl:choose> 
     1096    </xsl:variable> 
     1097    <form name="eventForm" method="post" onsubmit="setEventFields(this,{$portalFriendly},'{$submitter}')"> 
     1098      <xsl:choose> 
     1099        <xsl:when test="/bedework/page = 'modEventPending'"> 
     1100          <xsl:attribute name="action"><xsl:value-of select="$event-updatePending"/></xsl:attribute> 
     1101        </xsl:when> 
     1102        <xsl:otherwise> 
     1103          <xsl:attribute name="action"><xsl:value-of select="$event-update"/></xsl:attribute> 
     1104        </xsl:otherwise> 
     1105      </xsl:choose> 
     1106 
     1107      <xsl:call-template name="submitEventButtons"/> 
     1108 
    6521109      <table class="eventFormTable"> 
    6531110        <tr> 
     
    6591116          </td> 
    6601117        </tr> 
    661         <tr> 
    662           <td class="fieldName"> 
    663             Calendar:** 
    664           </td> 
    665           <td> 
    666             <xsl:if test="form/calendar/preferred/select/option"> 
    667               <select name="prefCalendarId"> 
    668                 <option value="-1"> 
    669                   Select preferred: 
     1118        <xsl:if test="not(starts-with(form/calendar/path,$submissionsRootUnencoded))"> 
     1119          <tr> 
     1120            <td class="fieldName"> 
     1121              Calendar:** 
     1122            </td> 
     1123            <td> 
     1124              <xsl:if test="form/calendar/preferred/select/option"> 
     1125                <select name="prefCalendarId"> 
     1126                  <option> 
     1127                    <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> 
     1128                    Select preferred: 
     1129                  </option> 
     1130                  <xsl:for-each select="form/calendar/preferred/select/option"> 
     1131                    <xsl:sort select="." order="ascending"/> 
     1132                    <option> 
     1133                      <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> 
     1134                      <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
     1135                      <xsl:choose> 
     1136                        <xsl:when test="starts-with(node(),/bedework/submissionsRoot/unencoded)"> 
     1137                          submitted events 
     1138                        </xsl:when> 
     1139                        <xsl:otherwise> 
     1140                          <xsl:value-of select="substring-after(node(),'/public/')"/> 
     1141                        </xsl:otherwise> 
     1142                      </xsl:choose> 
     1143                    </option> 
     1144                  </xsl:for-each> 
     1145                </select><br/> 
     1146                or Calendar (all): 
     1147              </xsl:if> 
     1148              <select name="calendarId"> 
     1149                <option> 
     1150                  <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> 
     1151                  Select: 
    6701152                </option> 
    671                 <xsl:copy-of select="form/calendar/preferred/select/*"/> 
     1153                <xsl:for-each select="form/calendar/all/select/option"> 
     1154                  <xsl:sort select="." order="ascending"/> 
     1155                  <option> 
     1156                    <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> 
     1157                    <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
     1158                    <xsl:choose> 
     1159                      <xsl:when test="starts-with(node(),/bedework/submissionsRoot/unencoded)"> 
     1160                        submitted events 
     1161                      </xsl:when> 
     1162                      <xsl:otherwise> 
     1163                        <xsl:value-of select="substring-after(node(),'/public/')"/> 
     1164                      </xsl:otherwise> 
     1165                    </xsl:choose> 
     1166                  </option> 
     1167                </xsl:for-each> 
    6721168              </select> 
    673               or Calendar (all): 
    674             </xsl:if> 
    675             <select name="calendarId"> 
    676               <option value="-1"> 
    677                 Select: 
    678               </option> 
    679               <xsl:copy-of select="form/calendar/all/select/*"/> 
    680             </select> 
    681             <xsl:text> </xsl:text> 
    682             <span id="calDescriptionsLink"> 
    683               <a href="javascript:launchSimpleWindow('{$calendar-fetchDescriptions}')">calendar descriptions</a> 
    684             </span> 
    685           </td> 
    686         </tr> 
     1169              <xsl:text> </xsl:text> 
     1170              <span id="calDescriptionsLink"> 
     1171                <a href="javascript:launchSimpleWindow('{$calendar-fetchDescriptions}')">calendar descriptions</a> 
     1172              </span> 
     1173            </td> 
     1174          </tr> 
     1175        </xsl:if> 
    6871176 
    6881177        <tr> 
     
    7121201              </xsl:otherwise> 
    7131202            </xsl:choose> 
    714             all day (anniversary) 
     1203            all day 
    7151204 
    7161205            <!-- floating event: no timezone (and not UTC) --> 
     
    7491238              <div class="dateFields"> 
    7501239                <span class="startDateLabel">Date </span> 
    751                 <xsl:copy-of select="form/start/month/*"/> 
    752                 <xsl:copy-of select="form/start/day/*"/> 
    7531240                <xsl:choose> 
    754                   <xsl:when test="/bedework/creating = 'true'"> 
    755                     <xsl:copy-of select="form/start/year/*"/> 
     1241                  <xsl:when test="$portalFriendly = 'true'"> 
     1242                    <xsl:copy-of select="form/start/month/*"/> 
     1243                    <xsl:copy-of select="form/start/day/*"/> 
     1244                    <xsl:choose> 
     1245                      <xsl:when test="/bedework/creating = 'true'"> 
     1246                        <xsl:copy-of select="form/start/year/*"/> 
     1247                      </xsl:when> 
     1248                      <xsl:otherwise> 
     1249                        <xsl:copy-of select="form/start/yearText/*"/> 
     1250                      </xsl:otherwise> 
     1251                    </xsl:choose> 
     1252                    <script language="JavaScript" type="text/javascript"> 
     1253                      <xsl:comment> 
     1254                      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/'); 
     1255                      </xsl:comment> 
     1256                    </script> 
    7561257                  </xsl:when> 
    7571258                  <xsl:otherwise> 
    758                     <xsl:copy-of select="form/start/yearText/*"/> 
     1259                    <!-- span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetStartDate" iconURL="{$resourcesRoot}/resources/calIcon.gif"> 
     1260                      <xsl:attribute name="value"><xsl:value-of select="form/start/rfc3339DateTime"/></xsl:attribute> 
     1261                      <xsl:text> </xsl:text> 
     1262                    </span--> 
     1263                    <input type="text" name="bwEventWidgetStartDate" id="bwEventWidgetStartDate" size="10"/> 
     1264                    <script language="JavaScript" type="text/javascript"> 
     1265                      <xsl:comment> 
     1266                      $("#bwEventWidgetStartDate").datepicker({ 
     1267                        defaultDate: new Date(<xsl:value-of select="form/start/yearText/input/@value"/>, <xsl:value-of select="number(form/start/month/select/option[@selected = 'selected']/@value) - 1"/>, <xsl:value-of select="form/start/day/select/option[@selected = 'selected']/@value"/>) 
     1268                      }).attr("readonly", "readonly"); 
     1269                      $("#bwEventWidgetStartDate").val('<xsl:value-of select="substring-before(form/start/rfc3339DateTime,'T')"/>'); 
     1270                      //alert($("#bwEventWidgetStartDate").datepicker("getDate")); 
     1271                      </xsl:comment> 
     1272                    </script> 
     1273                    <input type="hidden" name="eventStartDate.year"> 
     1274                      <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute> 
     1275                    </input> 
     1276                    <input type="hidden" name="eventStartDate.month"> 
     1277                      <xsl:attribute name="value"><xsl:value-of select="form/start/month/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
     1278                    </input> 
     1279                    <input type="hidden" name="eventStartDate.day"> 
     1280                      <xsl:attribute name="value"><xsl:value-of select="form/start/day/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
     1281                    </input> 
    7591282                  </xsl:otherwise> 
    7601283                </xsl:choose> 
    7611284              </div> 
    762               <script language="JavaScript" type="text/javascript"> 
    763                 <xsl:comment> 
    764                 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/'); 
    765                 </xsl:comment> 
    766               </script> 
    767               <!--<img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>--> 
    7681285              <div class="{$timeFieldsClass}" id="startTimeFields"> 
    7691286                <span id="calWidgetStartTimeHider" class="show"> 
     
    7951312              <xsl:choose> 
    7961313                <xsl:when test="form/end/type='E'"> 
    797                   <input type="radio" name="eventEndType" value="E" checked="checked" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
     1314                  <input type="radio" name="eventEndType" id="bwEndDateTimeButton" value="E" checked="checked" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    7981315                </xsl:when> 
    7991316                <xsl:otherwise> 
    800                   <input type="radio" name="eventEndType" value="E" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
     1317                  <input type="radio" name="eventEndType" id="bwEndDateTimeButton" value="E" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    8011318                </xsl:otherwise> 
    8021319              </xsl:choose> 
     
    8101327              <div class="{$endDateTimeClass}" id="endDateTime"> 
    8111328                <div class="dateFields"> 
    812                   <xsl:copy-of select="form/end/dateTime/month/*"/> 
    813                   <xsl:copy-of select="form/end/dateTime/day/*"/> 
    8141329                  <xsl:choose> 
    815                     <xsl:when test="/bedework/creating = 'true'"> 
    816                       <xsl:copy-of select="form/end/dateTime/year/*"/> 
     1330                    <xsl:when test="$portalFriendly = 'true'"> 
     1331                      <xsl:copy-of select="form/end/dateTime/month/*"/> 
     1332                      <xsl:copy-of select="form/end/dateTime/day/*"/> 
     1333                      <xsl:choose> 
     1334                        <xsl:when test="/bedework/creating = 'true'"> 
     1335                          <xsl:copy-of select="form/end/dateTime/year/*"/> 
     1336                        </xsl:when> 
     1337                        <xsl:otherwise> 
     1338                          <xsl:copy-of select="form/end/dateTime/yearText/*"/> 
     1339                        </xsl:otherwise> 
     1340                      </xsl:choose> 
     1341                      <script language="JavaScript" type="text/javascript"> 
     1342                        <xsl:comment> 
     1343                        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/'); 
     1344                      </xsl:comment> 
     1345                      </script> 
    8171346                    </xsl:when> 
    8181347                    <xsl:otherwise> 
    819                       <xsl:copy-of select="form/end/dateTime/yearText/*"/> 
     1348                      <!-- span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetEndDate" iconURL="{$resourcesRoot}/resources/calIcon.gif"> 
     1349                        <xsl:attribute name="value"><xsl:value-of select="form/end/rfc3339DateTime"/></xsl:attribute> 
     1350                        <xsl:text> </xsl:text> 
     1351                      </span--> 
     1352                      <input type="text" name="bwEventWidgetEndDate" id="bwEventWidgetEndDate" size="10"/> 
     1353                      <script language="JavaScript" type="text/javascript"> 
     1354                        <xsl:comment> 
     1355                        $("#bwEventWidgetEndDate").datepicker({ 
     1356                          defaultDate: new Date(<xsl:value-of select="form/end/dateTime/yearText/input/@value"/>, <xsl:value-of select="number(form/end/dateTime/month/select/option[@selected = 'selected']/@value) - 1"/>, <xsl:value-of select="form/end/dateTime/day/select/option[@selected = 'selected']/@value"/>) 
     1357                        }).attr("readonly", "readonly"); 
     1358                        $("#bwEventWidgetEndDate").val('<xsl:value-of select="substring-before(form/end/rfc3339DateTime,'T')"/>'); 
     1359                        </xsl:comment> 
     1360                      </script> 
     1361                      <input type="hidden" name="eventEndDate.year"> 
     1362                        <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/yearText/input/@value"/></xsl:attribute> 
     1363                      </input> 
     1364                      <input type="hidden" name="eventEndDate.month"> 
     1365                        <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/month/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
     1366                      </input> 
     1367                      <input type="hidden" name="eventEndDate.day"> 
     1368                        <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/day/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
     1369                      </input> 
    8201370                    </xsl:otherwise> 
    8211371                  </xsl:choose> 
    8221372                </div> 
    823                 <script language="JavaScript" type="text/javascript"> 
    824                   <xsl:comment> 
    825                   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/'); 
    826                 </xsl:comment> 
    827                 </script> 
    828                 <!--<img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>--> 
    8291373                <div class="{$timeFieldsClass}" id="endTimeFields"> 
    8301374                  <span id="calWidgetEndTimeHider" class="show"> 
     
    9461490          </td> 
    9471491          <td> 
    948             <!-- Output descriptive recurrence information.  Probably not 
    949                complete yet. Replace all freq strings so can be internationalized. --> 
    950           <xsl:if test="form/recurrence"> 
    951             <div id="recurrenceInfo"> 
    952               Every 
    953               <xsl:choose> 
    954                 <xsl:when test="form/recurrence/interval &gt; 1"> 
    955                   <xsl:value-of select="form/recurrence/interval"/> 
    956                 </xsl:when> 
    957               </xsl:choose> 
    958               <xsl:text> </xsl:text> 
    959               <xsl:choose> 
    960                 <xsl:when test="form/recurrence/freq = 'HOURLY'">hour</xsl:when> 
    961                 <xsl:when test="form/recurrence/freq = 'DAILY'">day</xsl:when> 
    962                 <xsl:when test="form/recurrence/freq = 'WEEKLY'">week</xsl:when> 
    963                 <xsl:when test="form/recurrence/freq = 'MONTHLY'">month</xsl:when> 
    964                 <xsl:when test="form/recurrence/freq = 'YEARLY'">year</xsl:when> 
    965               </xsl:choose><xsl:if test="form/recurrence/interval &gt; 1">s</xsl:if> 
    966               <xsl:text> </xsl:text> 
    967  
    968               <xsl:if test="form/recurrence/byday"> 
    969                 <xsl:for-each select="form/recurrence/byday/pos"> 
    970                   <xsl:if test="position() != 1"> and </xsl:if> 
    971                   on 
    972                   <xsl:choose> 
    973                     <xsl:when test="@val='1'"> 
    974                       the first 
    975                     </xsl:when> 
    976                     <xsl:when test="@val='2'"> 
    977                       the second 
    978                     </xsl:when> 
    979                     <xsl:when test="@val='3'"> 
    980                       the third 
    981                     </xsl:when> 
    982                     <xsl:when test="@val='4'"> 
    983                       the fourth 
    984                     </xsl:when> 
    985                     <xsl:when test="@val='5'"> 
    986                       the fifth 
    987                     </xsl:when> 
    988                     <xsl:when test="@val='-1'"> 
    989                       the last 
    990                     </xsl:when> 
    991                     <!-- don't output "every" --> 
    992                     <!--<xsl:otherwise> 
    993                       every 
    994                     </xsl:otherwise>--> 
    995                   </xsl:choose> 
    996                   <xsl:for-each select="day"> 
    997                     <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 
    998                     <xsl:variable name="dayVal" select="."/> 
    999                     <xsl:variable name="dayPos"> 
    1000                       <xsl:for-each select="/bedework/recurdayvals/val"> 
    1001                         <xsl:if test="node() = $dayVal"><xsl:value-of select="position()"/></xsl:if> 
    1002                       </xsl:for-each> 
    1003                     </xsl:variable> 
    1004                     <xsl:value-of select="/bedework/shortdaynames/val[position() = $dayPos]"/> 
    1005                     <xsl:if test="position() != last()">, </xsl:if> 
    1006                   </xsl:for-each> 
    1007                 </xsl:for-each> 
    1008               </xsl:if> 
    1009  
    1010               <xsl:if test="form/recurrence/bymonth"> 
    1011                 in 
    1012                 <xsl:for-each select="form/recurrence/bymonth/val"> 
    1013                   <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 
    1014                   <xsl:variable name="monthNum" select="number(.)"/> 
    1015                   <xsl:value-of select="/bedework/monthlabels/val[position() = $monthNum]"/> 
    1016                   <xsl:if test="position() != last()">, </xsl:if> 
    1017                 </xsl:for-each> 
    1018               </xsl:if> 
    1019  
    1020               <xsl:if test="form/recurrence/bymonthday"> 
    1021                 on the 
    1022                 <xsl:apply-templates select="form/recurrence/bymonthday/val" mode="weekMonthYearNumbers"/> 
    1023                 day<xsl:if test="form/recurrence/bymonthday/val[position()=2]">s</xsl:if> of the month 
    1024               </xsl:if> 
    1025  
    1026               <xsl:if test="form/recurrence/byyearday"> 
    1027                 on the 
    1028                 <xsl:apply-templates select="form/recurrence/byyearday/val" mode="weekMonthYearNumbers"/> 
    1029                 day<xsl:if test="form/recurrence/byyearday/val[position()=2]">s</xsl:if> of the year 
    1030               </xsl:if> 
    1031  
    1032               <xsl:if test="form/recurrence/byweekno"> 
    1033                 in the 
    1034                 <xsl:apply-templates select="form/recurrence/byweekno/val" mode="weekMonthYearNumbers"/> 
    1035                 week<xsl:if test="form/recurrence/byweekno/val[position()=2]">s</xsl:if> of the year 
    1036               </xsl:if> 
    1037  
    1038               repeating 
    1039               <xsl:choose> 
    1040                 <xsl:when test="form/recurrence/count = '-1'">forever</xsl:when> 
    1041                 <xsl:when test="form/recurrence/until"> 
    1042                   <xsl:value-of select="form/recurrence/until"/> 
    1043                 </xsl:when> 
    1044                 <xsl:otherwise> 
    1045                   <xsl:value-of select="form/recurrence/count"/> 
    1046                   time<xsl:if test="form/recurrence/count &gt; 1">s</xsl:if> 
    1047                 </xsl:otherwise> 
    1048               </xsl:choose> 
    1049             </div> 
    1050           </xsl:if> 
    1051  
    1052  
    1053           <!-- recurrence rules --> 
    10541492            <xsl:choose> 
    10551493              <xsl:when test="recurrenceId != ''"> 
     
    10611499              <xsl:otherwise> 
    10621500                <!-- has recurrenceId, so is master --> 
    1063                 <input type="checkbox" name="recurrenceFlag" onclick="swapRecurrence(this)" value="on"/> 
    1064                 <xsl:choose> 
    1065                   <xsl:when test="/bedework/creating = 'true'"> 
    1066                     set recurrence rules 
    1067                   </xsl:when> 
    1068                   <xsl:otherwise> 
    1069                     change recurrence 
    1070                   </xsl:otherwise> 
    1071                 </xsl:choose> 
    1072                 <span id="recurrenceUiSwitch" class="invisible"> 
    1073                   <input type="checkbox" name="recurrenceUiSwitch" value="simple" onchange="swapVisible(this,'advancedRecurrenceRules')"/> 
    1074                   show advanced recurrence rules 
    1075                 </span> 
    1076  
    1077                 <!-- set these dynamically when form is submitted --> 
    1078                 <input type="hidden" name="interval" value=""/> 
    1079                 <input type="hidden" name="count" value=""/> 
    1080                 <input type="hidden" name="until" value=""/> 
    1081                 <input type="hidden" name="byday" value=""/> 
    1082                 <input type="hidden" name="bymonthday" value=""/> 
    1083                 <input type="hidden" name="bymonth" value=""/> 
    1084                 <input type="hidden" name="byweekno" value=""/> 
    1085                 <input type="hidden" name="byyearday" value=""/> 
    1086                 <input type="hidden" name="wkst" value=""/> 
    1087                 <input type="hidden" name="setpos" value=""/> 
    1088  
     1501 
     1502                <div id="recurringSwitch"> 
     1503                  <!-- set or remove "recurring" and show or hide all recurrence fields: --> 
     1504                  <input type="radio" name="recurring" value="true" onclick="swapRecurrence(this)"> 
     1505                    <xsl:if test="form/recurringEntity = 'true'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
     1506                  </input> event recurs 
     1507                  <input type="radio" name="recurring" value="false" onclick="swapRecurrence(this)"> 
     1508                    <xsl:if test="form/recurringEntity = 'false'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
     1509                  </input> event does not recur 
     1510                </div> 
     1511 
     1512                <!-- wrapper for all recurrence fields (rrules and rdates): --> 
    10891513                <div id="recurrenceFields" class="invisible"> 
    1090                   <table id="recurrenceTable" cellspacing="0"> 
     1514                  <xsl:if test="form/recurringEntity = 'true'"><xsl:attribute name="class">visible</xsl:attribute></xsl:if> 
     1515 
     1516                  <h4>Recurrence Rules</h4> 
     1517                  <!-- show or hide rrules fields when editing: --> 
     1518                  <xsl:if test="form/recurrence"> 
     1519                    <input type="checkbox" name="rrulesFlag" onclick="swapRrules(this)" value="on"/> 
     1520                    <span id="rrulesSwitch"> 
     1521                      change recurrence rules 
     1522                    </span> 
     1523                  </xsl:if> 
     1524                  <span id="rrulesUiSwitch"> 
     1525                    <xsl:if test="form/recurrence"> 
     1526                      <xsl:attribute name="class">invisible</xsl:attribute> 
     1527                    </xsl:if> 
     1528                    <input type="checkbox" name="rrulesUiSwitch" value="advanced" onchange="swapVisible(this,'advancedRrules')"/> 
     1529                    show advanced recurrence rules 
     1530                  </span> 
     1531 
     1532                  <xsl:if test="form/recurrence"> 
     1533                    <!-- Output descriptive recurrence rules information.  Probably not 
     1534                         complete yet. Replace all strings so can be 
     1535                         more easily internationalized. --> 
     1536                    <div id="recurrenceInfo"> 
     1537                      Every 
     1538                      <xsl:choose> 
     1539                        <xsl:when test="form/recurrence/interval &gt; 1"> 
     1540                          <xsl:value-of select="form/recurrence/interval"/> 
     1541                        </xsl:when> 
     1542                      </xsl:choose> 
     1543                      <xsl:text> </xsl:text> 
     1544                      <xsl:choose> 
     1545                        <xsl:when test="form/recurrence/freq = 'HOURLY'">hour</xsl:when> 
     1546                        <xsl:when test="form/recurrence/freq = 'DAILY'">day</xsl:when> 
     1547                        <xsl:when test="form/recurrence/freq = 'WEEKLY'">week</xsl:when> 
     1548                        <xsl:when test="form/recurrence/freq = 'MONTHLY'">month</xsl:when> 
     1549                        <xsl:when test="form/recurrence/freq = 'YEARLY'">year</xsl:when> 
     1550                      </xsl:choose><xsl:if test="form/recurrence/interval &gt; 1">s</xsl:if> 
     1551                      <xsl:text> </xsl:text> 
     1552 
     1553                      <xsl:if test="form/recurrence/byday"> 
     1554                        <xsl:for-each select="form/recurrence/byday/pos"> 
     1555                          <xsl:if test="position() != 1"> and </xsl:if> 
     1556                          on 
     1557                          <xsl:choose> 
     1558                            <xsl:when test="@val='1'"> 
     1559                              the first 
     1560                            </xsl:when> 
     1561                            <xsl:when test="@val='2'"> 
     1562                              the second 
     1563                            </xsl:when> 
     1564                            <xsl:when test="@val='3'"> 
     1565                              the third 
     1566                            </xsl:when> 
     1567                            <xsl:when test="@val='4'"> 
     1568                              the fourth 
     1569                            </xsl:when> 
     1570                            <xsl:when test="@val='5'"> 
     1571                              the fifth 
     1572                            </xsl:when> 
     1573                            <xsl:when test="@val='-1'"> 
     1574                              the last 
     1575                            </xsl:when> 
     1576                            <!-- don't output "every" --> 
     1577                            <!--<xsl:otherwise> 
     1578                              every 
     1579                            </xsl:otherwise>--> 
     1580                          </xsl:choose> 
     1581                          <xsl:for-each select="day"> 
     1582                            <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 
     1583                            <xsl:variable name="dayVal" select="."/> 
     1584                            <xsl:variable name="dayPos"> 
     1585                              <xsl:for-each select="/bedework/recurdayvals/val"> 
     1586                                <xsl:if test="node() = $dayVal"><xsl:value-of select="position()"/></xsl:if> 
     1587                              </xsl:for-each> 
     1588                            </xsl:variable> 
     1589                            <xsl:value-of select="/bedework/shortdaynames/val[position() = $dayPos]"/> 
     1590                            <xsl:if test="position() != last()">, </xsl:if> 
     1591                          </xsl:for-each> 
     1592                        </xsl:for-each> 
     1593                      </xsl:if> 
     1594 
     1595                      <xsl:if test="form/recurrence/bymonth"> 
     1596                        in 
     1597                        <xsl:for-each select="form/recurrence/bymonth/val"> 
     1598                          <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 
     1599                          <xsl:variable name="monthNum" select="number(.)"/> 
     1600                          <xsl:value-of select="/bedework/monthlabels/val[position() = $monthNum]"/> 
     1601                          <xsl:if test="position() != last()">, </xsl:if> 
     1602                        </xsl:for-each> 
     1603                      </xsl:if> 
     1604 
     1605                      <xsl:if test="form/recurrence/bymonthday"> 
     1606                        on the 
     1607                        <xsl:apply-templates select="form/recurrence/bymonthday/val" mode="weekMonthYearNumbers"/> 
     1608                        day<xsl:if test="form/recurrence/bymonthday/val[position()=2]">s</xsl:if> of the month 
     1609                      </xsl:if> 
     1610 
     1611                      <xsl:if test="form/recurrence/byyearday"> 
     1612                        on the 
     1613                        <xsl:apply-templates select="form/recurrence/byyearday/val" mode="weekMonthYearNumbers"/> 
     1614                        day<xsl:if test="form/recurrence/byyearday/val[position()=2]">s</xsl:if> of the year 
     1615                      </xsl:if> 
     1616 
     1617                      <xsl:if test="form/recurrence/byweekno"> 
     1618                        in the 
     1619                        <xsl:apply-templates select="form/recurrence/byweekno/val" mode="weekMonthYearNumbers"/> 
     1620                        week<xsl:if test="form/recurrence/byweekno/val[position()=2]">s</xsl:if> of the year 
     1621                      </xsl:if> 
     1622 
     1623                      repeating 
     1624                      <xsl:choose> 
     1625                        <xsl:when test="form/recurrence/count = '-1'">forever</xsl:when> 
     1626                        <xsl:when test="form/recurrence/until"> 
     1627                          until <xsl:value-of select="substring(form/recurrence/until,1,4)"/>-<xsl:value-of select="substring(form/recurrence/until,5,2)"/>-<xsl:value-of select="substring(form/recurrence/until,7,2)"/> 
     1628                        </xsl:when> 
     1629                        <xsl:otherwise> 
     1630                          <xsl:value-of select="form/recurrence/count"/> 
     1631                          time<xsl:if test="form/recurrence/count &gt; 1">s</xsl:if> 
     1632                        </xsl:otherwise> 
     1633                      </xsl:choose> 
     1634                    </div> 
     1635                  </xsl:if> 
     1636 
     1637                  <!-- set these dynamically when form is submitted --> 
     1638                  <input type="hidden" name="interval" value=""/> 
     1639                  <input type="hidden" name="count" value=""/> 
     1640                  <input type="hidden" name="until" value=""/> 
     1641                  <input type="hidden" name="byday" value=""/> 
     1642                  <input type="hidden" name="bymonthday" value=""/> 
     1643                  <input type="hidden" name="bymonth" value=""/> 
     1644                  <input type="hidden" name="byweekno" value=""/> 
     1645                  <input type="hidden" name="byyearday" value=""/> 
     1646                  <input type="hidden" name="wkst" value=""/> 
     1647                  <input type="hidden" name="setpos" value=""/> 
     1648 
     1649                  <!-- wrapper for rrules: --> 
     1650                  <table id="rrulesTable" cellspacing="0"> 
     1651                  <xsl:if test="form/recurrence"> 
     1652                    <xsl:attribute name="class">invisible</xsl:attribute> 
     1653                  </xsl:if> 
    10911654                    <tr> 
    1092                       <td class="recurrenceFrequency" rowspan="2"> 
    1093                         <strong>Frequency:</strong><br/> 
    1094                         <!-- "freq" is used to determine if a recurrence should be created; test for "NONE" --> 
    1095                         <input type="radio" name="freq" value="NONE" onclick="showRecurrence(this.value)" checked="checked"/>none<br/> 
    1096                         <!--<input type="radio" name="freq" value="HOURLY" onclick="showRecurrence(this.value)"/>hourly<br/>--> 
    1097                         <input type="radio" name="freq" value="DAILY" onclick="showRecurrence(this.value)"/>daily<br/> 
    1098                         <input type="radio" name="freq" value="WEEKLY" onclick="showRecurrence(this.value)"/>weekly<br/> 
    1099                         <input type="radio" name="freq" value="MONTHLY" onclick="showRecurrence(this.value)"/>monthly<br/> 
    1100                         <input type="radio" name="freq" value="YEARLY" onclick="showRecurrence(this.value)"/>yearly 
     1655                      <td id="recurrenceFrequency" rowspan="2"> 
     1656                        <em>Frequency:</em><br/> 
     1657                        <input type="radio" name="freq" value="NONE" onclick="showRrules(this.value)" checked="checked"/>none<br/> 
     1658                        <!--<input type="radio" name="freq" value="HOURLY" onclick="showRrules(this.value)"/>hourly<br/>--> 
     1659                        <input type="radio" name="freq" value="DAILY" onclick="showRrules(this.value)"/>daily<br/> 
     1660                        <input type="radio" name="freq" value="WEEKLY" onclick="showRrules(this.value)"/>weekly<br/> 
     1661                        <input type="radio" name="freq" value="MONTHLY" onclick="showRrules(this.value)"/>monthly<br/> 
     1662                        <input type="radio" name="freq" value="YEARLY" onclick="showRrules(this.value)"/>yearly 
    11011663                      </td> 
    1102                       <td class="recurrenceRules"
    1103                         <!-- none --
     1664                      <!-- recurrence count, until, forever --
     1665                      <td id="recurrenceUntil"
    11041666                        <div id="noneRecurrenceRules"> 
    1105                           <p>does not recur</p> 
     1667                          no recurrence rules 
    11061668                        </div> 
    1107                         <span id="advancedRecurrenceRules" class="invisible"> 
    1108                           <!-- hourly --> 
    1109                           <div id="hourlyRecurrenceRules" class="invisible"> 
    1110                             <p> 
    1111                               <strong>Interval:</strong> 
    1112                               every 
    1113                               <input type="text" name="hourlyInterval" size="2" value="1"> 
    1114                                 <xsl:if test="form/recurrence/interval"> 
    1115                                   <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    1116                                 </xsl:if> 
    1117                               </input> 
    1118                               hour(s) 
    1119                             </p> 
    1120                           </div> 
    1121                           <!-- daily --> 
    1122                           <div id="dailyRecurrenceRules" class="invisible"> 
    1123                             <p> 
    1124                               <strong>Interval:</strong> 
    1125                               every 
    1126                               <input type="text" name="dailyInterval" size="2" value="1"> 
    1127                                 <xsl:if test="form/recurrence/interval"> 
    1128                                   <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    1129                                 </xsl:if> 
    1130                               </input> 
    1131                               day(s) 
    1132                             </p> 
    1133                             <p> 
    1134                               <input type="checkbox" name="swapDayMonthCheckBoxList" value="" onclick="swapVisible(this,'dayMonthCheckBoxList')"/> 
    1135                               in these months: 
    1136                               <div id="dayMonthCheckBoxList" class="invisible"> 
    1137                                 <xsl:for-each select="/bedework/monthlabels/val"> 
    1138                                   <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 
    1139                                   <span class="chkBoxListItem"> 
    1140                                     <input type="checkbox" name="dayMonths"> 
    1141                                       <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute> 
    1142                                     </input> 
    1143                                     <xsl:value-of select="."/> 
    1144                                   </span> 
    1145                                   <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 
    1146                                 </xsl:for-each> 
    1147                               </div> 
    1148                             </p> 
    1149                           </div> 
    1150                           <!-- weekly --> 
    1151                           <div id="weeklyRecurrenceRules" class="invisible"> 
    1152                             <p> 
    1153                               <strong>Interval:</strong> 
    1154                               every 
    1155                               <input type="text" name="weeklyInterval" size="2" value="1"> 
    1156                                 <xsl:if test="form/recurrence/interval"> 
    1157                                   <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    1158                                 </xsl:if> 
    1159                               </input> 
    1160                               week(s) on: 
    1161                             </p> 
    1162                             <p> 
    1163                               <div id="weekRecurFields"> 
    1164                                 <xsl:call-template name="byDayChkBoxList"> 
    1165                                   <xsl:with-param name="name">byDayWeek</xsl:with-param> 
    1166                                 </xsl:call-template> 
    1167                               </div> 
    1168                             </p> 
    1169                             <p class="weekRecurLinks"> 
    1170                               <a href="javascript:recurSelectWeekdays('weekRecurFields')">select weekdays</a> | 
    1171                               <a href="javascript:recurSelectWeekends('weekRecurFields')">select weekends</a> 
    1172                             </p> 
    1173                             <p> 
    1174                               Week start: 
    1175                               <select name="weekWkst"> 
    1176                                 <xsl:for-each select="/bedework/shortdaynames/val"> 
    1177                                   <xsl:variable name="pos" select="position()"/> 
    1178                                   <option> 
    1179                                     <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 
    1180                                     <xsl:value-of select="."/> 
    1181                                   </option> 
    1182                                 </xsl:for-each> 
    1183                               </select> 
    1184                             </p> 
    1185                           </div> 
    1186                           <!-- monthly --> 
    1187                           <div id="monthlyRecurrenceRules" class="invisible"> 
    1188                             <p> 
    1189                               <strong>Interval:</strong> 
    1190                               every 
    1191                               <input type="text" name="monthlyInterval" size="2" value="1"> 
    1192                                 <xsl:if test="form/recurrence/interval"> 
    1193                                   <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    1194                                 </xsl:if> 
    1195                               </input> 
    1196                               month(s) 
    1197                             </p> 
    1198                             <div id="monthRecurFields"> 
    1199                               <div id="monthRecurFields1"> 
    1200                                 on 
    1201                                 <select name="bymonthposPos1" width="7em" onchange="changeClass('monthRecurFields2','shown')"> 
    1202                                   <xsl:call-template name="recurrenceDayPosOptions"/> 
    1203                                 </select> 
    1204                                 <xsl:call-template name="byDayChkBoxList"/> 
    1205                               </div> 
    1206                               <xsl:call-template name="buildRecurFields"> 
    1207                                 <xsl:with-param name="current">2</xsl:with-param> 
    1208                                 <xsl:with-param name="total">10</xsl:with-param> 
    1209                                 <xsl:with-param name="name">month</xsl:with-param> 
     1669                        <div id="recurrenceUntilRules" class="invisible"> 
     1670                          <em>Repeat:</em> 
     1671                          <p> 
     1672                            <input type="radio" name="recurCountUntil" value="forever"> 
     1673                              <xsl:if test="not(form/recurring) or form/recurring/count = '-1'"> 
     1674                                <xsl:attribute name="checked">checked</xsl:attribute> 
     1675                              </xsl:if> 
     1676                            </input> 
     1677                            forever 
     1678                            <input type="radio" name="recurCountUntil" value="count" id="recurCount"> 
     1679                              <xsl:if test="form/recurring/count != '-1'"> 
     1680                                <xsl:attribute name="checked">checked</xsl:attribute> 
     1681                              </xsl:if> 
     1682                            </input> 
     1683                            <input type="text" value="1" size="2" name="countHolder"  onfocus="selectRecurCountUntil('recurCount')"> 
     1684                              <xsl:if test="form/recurring/count and form/recurring/count != '-1'"> 
     1685                                <xsl:attribute name="value"><xsl:value-of select="form/recurring/count"/></xsl:attribute> 
     1686                              </xsl:if> 
     1687                            </input> 
     1688                            time(s) 
     1689                            <input type="radio" name="recurCountUntil" value="until" id="recurUntil"> 
     1690                              <xsl:if test="form/recurring/until"> 
     1691                                <xsl:attribute name="checked">checked</xsl:attribute> 
     1692                              </xsl:if> 
     1693                            </input> 
     1694                            until 
     1695                            <span id="untilHolder"> 
     1696                              <!-- span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetUntilDate" iconURL="{$resourcesRoot}/resources/calIcon.gif"> 
     1697                                <xsl:attribute name="value"><xsl:value-of select="form/start/rfc3339DateTime"/></xsl:attribute> 
     1698                                <xsl:text> </xsl:text> 
     1699                              </span --> 
     1700                              <input type="hidden" name="bwEventUntilDate" id="bwEventUntilDate" size="10"/> 
     1701                              <input type="text" name="bwEventWidgetUntilDate" id="bwEventWidgetUntilDate" size="10" onfocus="selectRecurCountUntil('recurUntil')"/> 
     1702                              <script language="JavaScript" type="text/javascript"> 
     1703                                <xsl:comment> 
     1704                                $("#bwEventWidgetUntilDate").datepicker({ 
     1705                                  <xsl:choose> 
     1706                                    <xsl:when test="form/recurrence/until"> 
     1707                                      defaultDate: new Date(<xsl:value-of select="substring(form/recurrence/until,1,4)"/>, <xsl:value-of select="number(substring(form/recurrence/until,5,2)) - 1"/>, <xsl:value-of select="substring(form/recurrence/until,7,2)"/>), 
     1708                                    </xsl:when> 
     1709                                    <xsl:otherwise> 
     1710                                      defaultDate: new Date(<xsl:value-of select="form/start/yearText/input/@value"/>, <xsl:value-of select="number(form/start/month/select/option[@selected = 'selected']/@value) - 1"/>, <xsl:value-of select="form/start/day/select/option[@selected = 'selected']/@value"/>), 
     1711                                    </xsl:otherwise> 
     1712                                  </xsl:choose> 
     1713                                  altField: "#bwEventUntilDate", 
     1714                                  altFormat: "yymmdd" 
     1715                                }).attr("readonly", "readonly"); 
     1716                                $("#bwEventWidgetUntilDate").val('<xsl:value-of select="substring-before(form/start/rfc3339DateTime,'T')"/>'); 
     1717                                </xsl:comment> 
     1718                              </script> 
     1719                            </span> 
     1720                          </p> 
     1721                        </div> 
     1722                      </td> 
     1723                    </tr> 
     1724                    <tr> 
     1725                      <td id="advancedRrules" class="invisible"> 
     1726                        <!-- hourly --> 
     1727                        <div id="hourlyRecurrenceRules" class="invisible"> 
     1728                          <p> 
     1729                            <em>Interval:</em> 
     1730                            every 
     1731                            <input type="text" name="hourlyInterval" size="2" value="1"> 
     1732                              <xsl:if test="form/recurrence/interval"> 
     1733                                <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
     1734                              </xsl:if> 
     1735                            </input> 
     1736                            hour(s) 
     1737                          </p> 
     1738                        </div> 
     1739                        <!-- daily --> 
     1740                        <div id="dailyRecurrenceRules" class="invisible"> 
     1741                          <p> 
     1742                            <em>Interval:</em> 
     1743                            every 
     1744                            <input type="text" name="dailyInterval" size="2" value="1"> 
     1745                              <xsl:if test="form/recurrence/interval"> 
     1746                                <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
     1747                              </xsl:if> 
     1748                            </input> 
     1749                            day(s) 
     1750                          </p> 
     1751                          <p> 
     1752                            <input type="checkbox" name="swapDayMonthCheckBoxList" value="" onclick="swapVisible(this,'dayMonthCheckBoxList')"/> 
     1753                            in these months: 
     1754                            <div id="dayMonthCheckBoxList" class="invisible"> 
     1755                              <xsl:for-each select="/bedework/monthlabels/val"> 
     1756                                <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 
     1757                                <span class="chkBoxListItem"> 
     1758                                  <input type="checkbox" name="dayMonths"> 
     1759                                    <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute> 
     1760                                  </input> 
     1761                                  <xsl:value-of select="."/> 
     1762                                </span> 
     1763                                <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 
     1764                              </xsl:for-each> 
     1765                            </div> 
     1766                          </p> 
     1767                          <!--<p> 
     1768                            <input type="checkbox" name="swapDaySetPos" value="" onclick="swapVisible(this,'daySetPos')"/> 
     1769                            limit to: 
     1770                            <div id="daySetPos" class="invisible"> 
     1771                            </div> 
     1772                          </p>--> 
     1773                        </div> 
     1774                        <!-- weekly --> 
     1775                        <div id="weeklyRecurrenceRules" class="invisible"> 
     1776                          <p> 
     1777                            <em>Interval:</em> 
     1778                            every 
     1779                            <input type="text" name="weeklyInterval" size="2" value="1"> 
     1780                              <xsl:if test="form/recurrence/interval"> 
     1781                                <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
     1782                              </xsl:if> 
     1783                            </input> 
     1784                            week(s) on: 
     1785                          </p> 
     1786                          <p> 
     1787                            <div id="weekRecurFields"> 
     1788                              <xsl:call-template name="byDayChkBoxList"> 
     1789                                <xsl:with-param name="name">byDayWeek</xsl:with-param> 
    12101790                              </xsl:call-template> 
    12111791                            </div> 
    1212                             <p> 
    1213                               <input type="checkbox" name="swapMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'monthDaysCheckBoxList')"/> 
    1214                               on these days:<br/> 
    1215                               <div id="monthDaysCheckBoxList" class="invisible"> 
    1216                                 <xsl:call-template name="buildCheckboxList"> 
    1217                                   <xsl:with-param name="current">1</xsl:with-param> 
    1218                                   <xsl:with-param name="end">31</xsl:with-param> 
    1219                                   <xsl:with-param name="name">monthDayBoxes</xsl:with-param> 
    1220                                 </xsl:call-template> 
    1221                               </div> 
    1222                             </p> 
     1792                          </p> 
     1793                          <p class="weekRecurLinks"> 
     1794                            <a href="javascript:recurSelectWeekdays('weekRecurFields')">select weekdays</a> | 
     1795                            <a href="javascript:recurSelectWeekends('weekRecurFields')">select weekends</a> 
     1796                          </p> 
     1797                          <p> 
     1798                            Week start: 
     1799                            <select name="weekWkst"> 
     1800                              <xsl:for-each select="/bedework/shortdaynames/val"> 
     1801                                <xsl:variable name="pos" select="position()"/> 
     1802                                <option> 
     1803                                  <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 
     1804                                  <xsl:value-of select="."/> 
     1805                                </option> 
     1806                              </xsl:for-each> 
     1807                            </select> 
     1808                          </p> 
     1809                        </div> 
     1810                        <!-- monthly --> 
     1811                        <div id="monthlyRecurrenceRules" class="invisible"> 
     1812                          <p> 
     1813                            <em>Interval:</em> 
     1814                            every 
     1815                            <input type="text" name="monthlyInterval" size="2" value="1"> 
     1816                              <xsl:if test="form/recurrence/interval"> 
     1817                                <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
     1818                              </xsl:if> 
     1819                            </input> 
     1820                            month(s) 
     1821                          </p> 
     1822                          <div id="monthRecurFields"> 
     1823                            <div id="monthRecurFields1"> 
     1824                              on 
     1825                              <select name="bymonthposPos1" width="7em" onchange="changeClass('monthRecurFields2','shown')"> 
     1826                                <xsl:call-template name="recurrenceDayPosOptions"/> 
     1827                              </select> 
     1828                              <xsl:call-template name="byDayChkBoxList"/> 
     1829                            </div> 
     1830                            <xsl:call-template name="buildRecurFields"> 
     1831                              <xsl:with-param name="current">2</xsl:with-param> 
     1832                              <xsl:with-param name="total">10</xsl:with-param> 
     1833                              <xsl:with-param name="name">month</xsl:with-param> 
     1834                            </xsl:call-template> 
    12231835                          </div> 
    1224                           <!-- yearly --> 
    1225                           <div id="yearlyRecurrenceRules" class="invisible"> 
    1226                             <p> 
    1227                               <strong>Interval:</strong> 
    1228                               every 
    1229                               <input type="text" name="yearlyInterval" size="2" value="1"> 
    1230                                 <xsl:if test="form/recurrence/interval"> 
    1231                                   <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    1232                                 </xsl:if> 
    1233                               </input> 
    1234                               years(s) 
    1235                             </p> 
    1236                             <div id="yearRecurFields"> 
    1237                               <div id="yearRecurFields1"> 
    1238                                 on 
    1239                                 <select name="byyearposPos1" width="7em" onchange="changeClass('yearRecurFields2','shown')"> 
    1240                                   <xsl:call-template name="recurrenceDayPosOptions"/> 
    1241                                 </select> 
    1242                                 <xsl:call-template name="byDayChkBoxList"/> 
    1243                               </div> 
    1244                               <xsl:call-template name="buildRecurFields"> 
    1245                                 <xsl:with-param name="current">2</xsl:with-param> 
    1246                                 <xsl:with-param name="total">10</xsl:with-param> 
    1247                                 <xsl:with-param name="name">year</xsl:with-param> 
     1836                          <p> 
     1837                            <input type="checkbox" name="swapMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'monthDaysCheckBoxList')"/> 
     1838                            on these days:<br/> 
     1839                            <div id="monthDaysCheckBoxList" class="invisible"> 
     1840                              <xsl:call-template name="buildCheckboxList"> 
     1841                                <xsl:with-param name="current">1</xsl:with-param> 
     1842                                <xsl:with-param name="end">31</xsl:with-param> 
     1843                                <xsl:with-param name="name">monthDayBoxes</xsl:with-param> 
    12481844                              </xsl:call-template> 
    12491845                            </div> 
    1250                             <p> 
    1251                               <input type="checkbox" name="swapYearMonthCheckBoxList" value="" onclick="swapVisible(this,'yearMonthCheckBoxList')"/> 
    1252                               in these months: 
    1253                               <div id="yearMonthCheckBoxList" class="invisible"> 
    1254                                 <xsl:for-each select="/bedework/monthlabels/val"> 
    1255                                   <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 
    1256                                   <span class="chkBoxListItem"> 
    1257                                     <input type="checkbox" name="yearMonths"> 
    1258                                       <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute> 
    1259                                     </input> 
    1260                                     <xsl:value-of select="."/> 
    1261                                   </span> 
    1262                                   <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 
    1263                                 </xsl:for-each> 
    1264                               </div> 
    1265                             </p> 
    1266                             <p> 
    1267                               <input type="checkbox" name="swapYearMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'yearMonthDaysCheckBoxList')"/> 
    1268                               on these days of the month:<br/> 
    1269                               <div id="yearMonthDaysCheckBoxList" class="invisible"> 
    1270                                 <xsl:call-template name="buildCheckboxList"> 
    1271                                   <xsl:with-param name="current">1</xsl:with-param> 
    1272                                   <xsl:with-param name="end">31</xsl:with-param> 
    1273                                   <xsl:with-param name="name">yearMonthDayBoxes</xsl:with-param> 
    1274                                 </xsl:call-template> 
    1275                               </div> 
    1276                             </p> 
    1277                             <p> 
    1278                               <input type="checkbox" name="swapYearWeeksCheckBoxList" value="" onclick="swapVisible(this,'yearWeeksCheckBoxList')"/> 
    1279                               in these weeks of the year:<br/> 
    1280                               <div id="yearWeeksCheckBoxList" class="invisible"> 
    1281                                 <xsl:call-template name="buildCheckboxList"> 
    1282                                   <xsl:with-param name="current">1</xsl:with-param> 
    1283                                   <xsl:with-param name="end">53</xsl:with-param> 
    1284                                   <xsl:with-param name="name">yearWeekBoxes</xsl:with-param> 
    1285                                 </xsl:call-template> 
    1286                               </div> 
    1287                             </p> 
    1288                             <p> 
    1289                               <input type="checkbox" name="swapYearDaysCheckBoxList" value="" onclick="swapVisible(this,'yearDaysCheckBoxList')"/> 
    1290                               on these days of the year:<br/> 
    1291                               <div id="yearDaysCheckBoxList" class="invisible"> 
    1292                                 <xsl:call-template name="buildCheckboxList"> 
    1293                                   <xsl:with-param name="current">1</xsl:with-param> 
    1294                                   <xsl:with-param name="end">366</xsl:with-param> 
    1295                                   <xsl:with-param name="name">yearDayBoxes</xsl:with-param> 
    1296                                 </xsl:call-template> 
    1297                               </div> 
    1298                             </p> 
    1299                             <p> 
    1300                               Week start: 
    1301                               <select name="yearWkst"> 
    1302                                 <xsl:for-each select="/bedework/shortdaynames/val"> 
    1303                                   <xsl:variable name="pos" select="position()"/> 
    1304                                   <option> 
    1305                                     <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 
    1306                                     <xsl:value-of select="."/> 
    1307                                   </option> 
    1308                                 </xsl:for-each> 
     1846                          </p> 
     1847                        </div> 
     1848                        <!-- yearly --> 
     1849                        <div id="yearlyRecurrenceRules" class="invisible"> 
     1850                          <p> 
     1851                            <em>Interval:</em> 
     1852                            every 
     1853                            <input type="text" name="yearlyInterval" size="2" value="1"> 
     1854                              <xsl:if test="form/recurrence/interval"> 
     1855                                <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
     1856                              </xsl:if> 
     1857                            </input> 
     1858                            years(s) 
     1859                          </p> 
     1860                          <div id="yearRecurFields"> 
     1861                            <div id="yearRecurFields1"> 
     1862                              on 
     1863                              <select name="byyearposPos1" width="7em" onchange="changeClass('yearRecurFields2','shown')"> 
     1864                                <xsl:call-template name="recurrenceDayPosOptions"/> 
    13091865                              </select> 
    1310                             </p> 
     1866                              <xsl:call-template name="byDayChkBoxList"/> 
     1867                            </div> 
     1868                            <xsl:call-template name="buildRecurFields"> 
     1869                              <xsl:with-param name="current">2</xsl:with-param> 
     1870                              <xsl:with-param name="total">10</xsl:with-param> 
     1871                              <xsl:with-param name="name">year</xsl:with-param> 
     1872                            </xsl:call-template> 
    13111873                          </div> 
    1312                         </span> 
    1313                       </td> 
    1314                     </tr> 
    1315                     <!-- recurrence count, until, forever --> 
    1316                     <tr> 
    1317                       <td class="recurrenceUntil"> 
    1318                          <div id="recurrenceUntilRules" class="invisible"> 
    1319                            <strong>Repeat:</strong> 
    1320                            <p> 
    1321                              <div class="dateFields"> 
    1322                                <input type="radio" name="recurCountUntil" value="until" id="recurUntil"> 
    1323                                  <xsl:if test="form/recurring/until"> 
    1324                                    <xsl:attribute name="checked">checked</xsl:attribute> 
    1325                                  </xsl:if> 
    1326                                </input> 
    1327                                until 
    1328                                <select name="untilMonth" onfocus="selectRecurCountUntil('recurUntil')"> 
    1329                                  <xsl:for-each select="form/start/month/select/option"> 
    1330                                    <xsl:copy-of select="."/> 
    1331                                  </xsl:for-each> 
    1332                                </select> 
    1333                                <select name="untilDay" onfocus="selectRecurCountUntil('recurUntil')"> 
    1334                                  <xsl:for-each select="form/start/day/select/option"> 
    1335                                    <xsl:copy-of select="."/> 
    1336                                  </xsl:for-each> 
    1337                                </select> 
    1338                                <xsl:choose> 
    1339                                  <xsl:when test="/bedework/creating = 'true'"> 
    1340                                    <select name="untilYear" onfocus="selectRecurCountUntil('recurUntil')"> 
    1341                                      <xsl:for-each select="form/start/year/select/option"> 
    1342                                        <xsl:copy-of select="."/> 
    1343                                      </xsl:for-each> 
    1344                                    </select> 
    1345                                  </xsl:when> 
    1346                                  <xsl:otherwise> 
    1347                                    <input type="text" name="untilYear" size="4"  onfocus="selectRecurCountUntil('recurUntil')"> 
    1348                                      <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute> 
    1349                                    </input> 
    1350                                  </xsl:otherwise> 
    1351                                </xsl:choose> 
    1352                              </div> 
    1353                              <script language="JavaScript" type="text/javascript"> 
    1354                              <xsl:comment> 
    1355                                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/'); 
    1356                              </xsl:comment> 
    1357                              </script> 
    1358                            </p> 
    1359                            <p> 
    1360                              <input type="radio" name="recurCountUntil" value="forever"> 
    1361                                <xsl:if test="not(form/recurring) or form/recurring/count = '-1'"> 
    1362                                  <xsl:attribute name="checked">checked</xsl:attribute> 
    1363                                </xsl:if> 
    1364                              </input> 
    1365                              forever 
    1366                              &#160; 
    1367                              <input type="radio" name="recurCountUntil" value="count" id="recurCount"> 
    1368                                <xsl:if test="form/recurring/count != '-1'"> 
    1369                                  <xsl:attribute name="checked">checked</xsl:attribute> 
    1370                                </xsl:if> 
    1371                              </input> 
    1372                              <input type="text" value="1" size="2" name="countHolder"  onfocus="selectRecurCountUntil('recurCount')"> 
    1373                                <xsl:if test="form/recurring/count and form/recurring/count != '-1'"> 
    1374                                  <xsl:attribute name="value"><xsl:value-of select="form/recurring/count"/></xsl:attribute> 
    1375                                </xsl:if> 
    1376                              </input> 
    1377                              times 
    1378                            </p> 
    1379                          </div> 
     1874                          <p> 
     1875                            <input type="checkbox" name="swapYearMonthCheckBoxList" value="" onclick="swapVisible(this,'yearMonthCheckBoxList')"/> 
     1876                            in these months: 
     1877                            <div id="yearMonthCheckBoxList" class="invisible"> 
     1878                              <xsl:for-each select="/bedework/monthlabels/val"> 
     1879                                <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 
     1880                                <span class="chkBoxListItem"> 
     1881                                  <input type="checkbox" name="yearMonths"> 
     1882                                    <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute> 
     1883                                  </input> 
     1884                                  <xsl:value-of select="."/> 
     1885                                </span> 
     1886                                <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 
     1887                              </xsl:for-each> 
     1888                            </div> 
     1889                          </p> 
     1890                          <p> 
     1891                            <input type="checkbox" name="swapYearMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'yearMonthDaysCheckBoxList')"/> 
     1892                            on these days of the month:<br/> 
     1893                            <div id="yearMonthDaysCheckBoxList" class="invisible"> 
     1894                              <xsl:call-template name="buildCheckboxList"> 
     1895                                <xsl:with-param name="current">1</xsl:with-param> 
     1896                                <xsl:with-param name="end">31</xsl:with-param> 
     1897                                <xsl:with-param name="name">yearMonthDayBoxes</xsl:with-param> 
     1898                              </xsl:call-template> 
     1899                            </div> 
     1900                          </p> 
     1901                          <p> 
     1902                            <input type="checkbox" name="swapYearWeeksCheckBoxList" value="" onclick="swapVisible(this,'yearWeeksCheckBoxList')"/> 
     1903                            in these weeks of the year:<br/> 
     1904                            <div id="yearWeeksCheckBoxList" class="invisible"> 
     1905                              <xsl:call-template name="buildCheckboxList"> 
     1906                                <xsl:with-param name="current">1</xsl:with-param> 
     1907                                <xsl:with-param name="end">53</xsl:with-param> 
     1908                                <xsl:with-param name="name">yearWeekBoxes</xsl:with-param> 
     1909                              </xsl:call-template> 
     1910                            </div> 
     1911                          </p> 
     1912                          <p> 
     1913                            <input type="checkbox" name="swapYearDaysCheckBoxList" value="" onclick="swapVisible(this,'yearDaysCheckBoxList')"/> 
     1914                            on these days of the year:<br/> 
     1915                            <div id="yearDaysCheckBoxList" class="invisible"> 
     1916                              <xsl:call-template name="buildCheckboxList"> 
     1917                                <xsl:with-param name="current">1</xsl:with-param> 
     1918                                <xsl:with-param name="end">366</xsl:with-param> 
     1919                                <xsl:with-param name="name">yearDayBoxes</xsl:with-param> 
     1920                              </xsl:call-template> 
     1921                            </div> 
     1922                          </p> 
     1923                          <p> 
     1924                            Week start: 
     1925                            <select name="yearWkst"> 
     1926                              <xsl:for-each select="/bedework/shortdaynames/val"> 
     1927                                <xsl:variable name="pos" select="position()"/> 
     1928                                <option> 
     1929                                  <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 
     1930                                  <xsl:value-of select="."/> 
     1931                                </option> 
     1932                              </xsl:for-each> 
     1933                            </select> 
     1934                          </p> 
     1935                        </div> 
    13801936                      </td> 
    13811937                    </tr> 
    13821938                  </table> 
     1939                  <h4> 
     1940                    Recurrence and Exception Dates 
     1941                  </h4> 
     1942                  <div id="raContent"> 
     1943                    <div class="dateStartEndBox" id="rdatesFormFields"> 
     1944                      <!-- 
     1945                      <input type="checkbox" name="dateOnly" id="rdateDateOnly" onclick="swapRdateAllDay(this)" value="true"/> 
     1946                      all day 
     1947                      <input type="checkbox" name="floating" id="rdateFloating" onclick="swapRdateFloatingTime(this)" value="true"/> 
     1948                      floating 
     1949                      store time as coordinated universal time (UTC) 
     1950                      <input type="checkbox" name="storeUTC" id="rdateStoreUTC" onclick="swapRdateStoreUTC(this)" value="true"/> 
     1951                      store as UTC<br/>--> 
     1952                      <div class="dateFields"> 
     1953                        <!-- input name="eventRdate.date" 
     1954                               dojoType="dropdowndatepicker" 
     1955                               formatLength="medium" 
     1956                               value="today" 
     1957                               saveFormat="yyyyMMdd" 
     1958                               id="bwEventWidgeRdate" 
     1959                               iconURL="{$resourcesRoot}/resources/calIcon.gif"/--> 
     1960                        <input type="text" name="eventRdate.date" id="bwEventWidgetRdate" size="10"/> 
     1961                        <script language="JavaScript" type="text/javascript"> 
     1962                          <xsl:comment> 
     1963                          $("#bwEventWidgetRdate").datepicker({ 
     1964                            defaultDate: new Date(<xsl:value-of select="form/start/yearText/input/@value"/>, <xsl:value-of select="number(form/start/month/select/option[@selected = 'selected']/@value) - 1"/>, <xsl:value-of select="form/start/day/select/option[@selected = 'selected']/@value"/>), 
     1965                            dateFormat: "yymmdd" 
     1966                          }).attr("readonly", "readonly"); 
     1967                          $("#bwEventWidgetRdate").val('<xsl:value-of select="substring-before(form/start/rfc3339DateTime,'T')"/>'); 
     1968                          </xsl:comment> 
     1969                        </script> 
     1970                      </div> 
     1971                      <div id="rdateTimeFields" class="timeFields"> 
     1972                       <select name="eventRdate.hour"> 
     1973                          <option value="00">00</option> 
     1974                          <option value="01">01</option> 
     1975                          <option value="02">02</option> 
     1976                          <option value="03">03</option> 
     1977                          <option value="04">04</option> 
     1978                          <option value="05">05</option> 
     1979                          <option value="06">06</option> 
     1980                          <option value="07">07</option> 
     1981                          <option value="08">08</option> 
     1982                          <option value="09">09</option> 
     1983                          <option value="10">10</option> 
     1984                          <option value="11">11</option> 
     1985                          <option value="12" selected="selected">12</option> 
     1986                          <option value="13">13</option> 
     1987                          <option value="14">14</option> 
     1988                          <option value="15">15</option> 
     1989                          <option value="16">16</option> 
     1990                          <option value="17">17</option> 
     1991                          <option value="18">18</option> 
     1992                          <option value="19">19</option> 
     1993                          <option value="20">20</option> 
     1994                          <option value="21">21</option> 
     1995                          <option value="22">22</option> 
     1996                          <option value="23">23</option> 
     1997                        </select> 
     1998                        <select name="eventRdate.minute"> 
     1999                          <option value="00" selected="selected">00</option> 
     2000                          <option value="05">05</option> 
     2001                          <option value="10">10</option> 
     2002                          <option value="15">15</option> 
     2003                          <option value="20">20</option> 
     2004                          <option value="25">25</option> 
     2005                          <option value="30">30</option> 
     2006                          <option value="35">35</option> 
     2007                          <option value="40">40</option> 
     2008                          <option value="45">45</option> 
     2009                          <option value="50">50</option> 
     2010                          <option value="55">55</option> 
     2011                        </select> 
     2012                       <xsl:text> </xsl:text> 
     2013 
     2014                        <select name="tzid" id="rdateTzid" class="timezones"> 
     2015                          <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if> 
     2016                          <option value="">select timezone...</option> 
     2017                          <xsl:variable name="rdateTzId" select="/bedework/now/defaultTzid"/> 
     2018                          <xsl:for-each select="/bedework/timezones/timezone"> 
     2019                            <option> 
     2020                              <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> 
     2021                              <xsl:if test="$rdateTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
     2022                              <xsl:value-of select="name"/> 
     2023                            </option> 
     2024                          </xsl:for-each> 
     2025                        </select> 
     2026                      </div> 
     2027                      <xsl:text> </xsl:text> 
     2028                      <!--bwRdates.update() accepts: date, time, allDay, floating, utc, tzid--> 
     2029                      <input type="button" name="rdate" value="add recurrence" onclick="bwRdates.update(this.form['eventRdate.date'].value,this.form['eventRdate.hour'].value + this.form['eventRdate.minute'].value,false,false,false,this.form.tzid.value)"/> 
     2030                      <input type="button" name="exdate" value="add exception" onclick="bwExdates.update(this.form['eventRdate.date'].value,this.form['eventRdate.hour'].value + this.form['eventRdate.minute'].value,false,false,false,this.form.tzid.value)"/> 
     2031 
     2032                      <input type="hidden" name="rdates" value="" id="bwRdatesField" /> 
     2033                      <!-- if there are no recurrence dates, the following table will show --> 
     2034                      <table cellspacing="0" class="invisible" id="bwCurrentRdatesNone"> 
     2035                        <tr><th>Recurrence Dates</th></tr> 
     2036                        <tr><td>No recurrence dates</td></tr> 
     2037                      </table> 
     2038 
     2039                      <!-- if there are recurrence dates, the following table will show --> 
     2040                      <table cellspacing="0" class="invisible" id="bwCurrentRdates"> 
     2041                        <tr> 
     2042                          <th colspan="4">Recurrence Dates</th> 
     2043                        </tr> 
     2044                        <tr class="colNames"> 
     2045                          <td>Date</td> 
     2046                          <td>Time</td> 
     2047                          <td>TZid</td> 
     2048                          <td></td> 
     2049                        </tr> 
     2050                      </table> 
     2051 
     2052                      <input type="hidden" name="exdates" value="" id="bwExdatesField" /> 
     2053                      <!-- if there are no exception dates, the following table will show --> 
     2054                      <table cellspacing="0" class="invisible" id="bwCurrentExdatesNone"> 
     2055                        <tr><th>Exception Dates</th></tr> 
     2056                        <tr><td>No exception dates</td></tr> 
     2057                      </table> 
     2058 
     2059                      <!-- if there are exception dates, the following table will show --> 
     2060                      <table cellspacing="0" class="invisible" id="bwCurrentExdates"> 
     2061                        <tr> 
     2062                          <th colspan="4">Exception Dates</th> 
     2063                        </tr> 
     2064                        <tr class="colNames"> 
     2065                          <td>Date</td> 
     2066                          <td>Time</td> 
     2067                          <td>TZid</td> 
     2068                          <td></td> 
     2069                        </tr> 
     2070                      </table> 
     2071                      <p> 
     2072                        Exception dates may also be created by deleting an instance 
     2073                        of a recurring event. 
     2074                      </p> 
     2075                    </div> 
     2076                  </div> 
    13832077                </div> 
    13842078              </xsl:otherwise> 
     
    13942088            <xsl:choose> 
    13952089              <xsl:when test="form/status = 'TENTATIVE'"> 
    1396                 <input type="radio" name="event.status" value="CONFIRMED"/>confirmed <input type="radio" name="event.status" value="TENTATIVE" checked="checked"/>tentative <input type="radio" name="event.status" value="CANCELLED"/>cancelled 
     2090                <input type="radio" name="eventStatus" value="CONFIRMED"/>confirmed <input type="radio" name="eventStatus" value="TENTATIVE" checked="checked"/>tentative <input type="radio" name="eventStatus" value="CANCELLED"/>cancelled 
    13972091              </xsl:when> 
    13982092              <xsl:when test="form/status = 'CANCELLED'"> 
    1399                 <input type="radio" name="event.status" value="CONFIRMED"/>confirmed <input type="radio" name="event.status" value="TENTATIVE"/>tentative <input type="radio" name="event.status" value="CANCELLED" checked="checked"/>cancelled 
     2093                <input type="radio" name="eventStatus" value="CONFIRMED"/>confirmed <input type="radio" name="eventStatus" value="TENTATIVE"/>tentative <input type="radio" name="eventStatus" value="CANCELLED" checked="checked"/>cancelled 
    14002094              </xsl:when> 
    14012095              <xsl:otherwise> 
    1402                 <input type="radio" name="event.status" value="CONFIRMED" checked="checked"/>confirmed <input type="radio" name="event.status" value="TENTATIVE"/>tentative <input type="radio" name="event.status" value="CANCELLED"/>cancelled 
     2096                <input type="radio" name="eventStatus" value="CONFIRMED" checked="checked"/>confirmed <input type="radio" name="eventStatus" value="TENTATIVE"/>tentative <input type="radio" name="eventStatus" value="CANCELLED"/>cancelled 
    14032097              </xsl:otherwise> 
    14042098            </xsl:choose> 
     2099          </td> 
     2100        </tr> 
     2101        <!--  Transparency  --> 
     2102        <tr> 
     2103          <td class="fieldName"> 
     2104            Effects free/busy: 
     2105          </td> 
     2106          <td align="left" class="padMeTop"> 
     2107            <input type="radio" value="OPAQUE" name="transparency"> 
     2108              <xsl:if test="form/transparency = 'OPAQUE'"> 
     2109                <xsl:attribute name="checked">checked</xsl:attribute> 
     2110              </xsl:if> 
     2111            </input> 
     2112            yes (opaque) 
     2113 
     2114            <input type="radio" value="TRANSPARENT" name="transparency"> 
     2115              <xsl:if test="form/transparency = 'TRANSPARENT'"> 
     2116                <xsl:attribute name="checked">checked</xsl:attribute> 
     2117              </xsl:if> 
     2118            </input> 
     2119            no (transparent) 
    14052120          </td> 
    14062121        </tr> 
     
    14222137        <tr> 
    14232138          <td class="optional"> 
    1424             Price
     2139            Cost
    14252140          </td> 
    14262141          <td> 
     
    14332148        <tr> 
    14342149          <td class="optional"> 
    1435             URL: 
     2150            Event URL: 
    14362151          </td> 
    14372152          <td> 
     
    14412156          </td> 
    14422157        </tr> 
     2158        <!-- Image Url --> 
     2159        <tr> 
     2160          <td class="optional"> 
     2161            Image URL: 
     2162          </td> 
     2163          <td> 
     2164            <input type="text" name="xBwImageHolder" value="" class="edit" size="30"> 
     2165              <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-IMAGE']/values/text"/></xsl:attribute> 
     2166            </input> 
     2167            <xsl:text> </xsl:text> 
     2168            <span class="fieldInfo">(optional: to include an image with the event description)</span> 
     2169          </td> 
     2170        </tr> 
    14432171        <!-- Location --> 
    14442172        <tr> 
     
    14492177            <xsl:if test="form/location/preferred/select/option"> 
    14502178              <select name="prefLocationId" id="eventFormPrefLocationList"> 
    1451                 <option value="-1"> 
     2179                <option value=""> 
    14522180                  Select preferred: 
    14532181                </option> 
     
    14572185            </xsl:if> 
    14582186            <select name="allLocationId" id="eventFormLocationList"> 
    1459               <option value="-1"> 
     2187              <option value=""> 
    14602188                Select: 
    14612189              </option> 
     
    15082236            <xsl:if test="form/contact/preferred/select/option"> 
    15092237              <select name="prefContactId" id="eventFormContactList"> 
    1510                 <option value="-1"> 
     2238                <option value=""> 
    15112239                  Select preferred: 
    15122240                </option>option> 
     
    15162244            </xsl:if> 
    15172245            <select name="allContactId" id="eventFormPrefContactList"> 
    1518               <option value="-1"> 
     2246              <option value=""> 
    15192247                Select: 
    15202248              </option> 
     
    15392267                  <td> 
    15402268                    <xsl:for-each select="form/categories/preferred/category[position() &lt;= ceiling($catCount div 2)]"> 
     2269                      <!-- <xsl:sort select="keyword" order="ascending"/> --> 
    15412270                      <input type="checkbox" name="categoryKey"> 
    15422271                        <xsl:attribute name="value"><xsl:value-of select="keyword"/></xsl:attribute> 
     
    15502279                  <td> 
    15512280                    <xsl:for-each select="form/categories/preferred/category[position() &gt; ceiling($catCount div 2)]"> 
     2281                      <!-- <xsl:sort select="keyword" order="ascending"/> --> 
    15522282                      <input type="checkbox" name="categoryKey"> 
    15532283                        <xsl:attribute name="value"><xsl:value-of select="keyword"/></xsl:attribute> 
     
    16142344              find a location or contact at all, you can add a new one from the 
    16152345              <a href="{$setup}">main menu</a>.</strong> 
    1616               Only administrators can create categories, however. 
     2346              Only administrators can create calendars, however. 
    16172347              To make sure you've used the 
    1618               correct category, please see the 
     2348              correct calendar, please see the 
    16192349              <a href="" target="_blank">Calendar Definitions</a> 
    16202350            </span> 
     
    16702400        </xsl:if> 
    16712401      </table> 
    1672  
    1673       <table border="0" id="submitTable"> 
    1674         <tr> 
    1675           <xsl:choose> 
    1676             <xsl:when test="/bedework/creating='true'"> 
    1677               <td> 
    1678                 <input type="submit" name="addEvent" value="Add Event"/> 
    1679                 <input type="submit" name="cancelled" value="Cancel"/> 
    1680                 <input type="reset" value="Clear"/> 
    1681               </td> 
    1682             </xsl:when> 
    1683             <xsl:otherwise> 
    1684               <td> 
    1685                 <input type="submit" name="updateEvent" value="Update Event"/> 
    1686                 <input type="submit" name="cancelled" value="Cancel"/> 
    1687                 <input type="submit" name="copy" value="Duplicate Event"/> 
    1688               </td> 
    1689               <td align="right"> 
    1690                 <input type="submit" name="delete" value="Delete Event"/> 
    1691               </td> 
    1692             </xsl:otherwise> 
    1693           </xsl:choose> 
    1694         </tr> 
    1695       </table> 
     2402      <xsl:if test="not(starts-with(form/calendar/path,$submissionsRootUnencoded))"> 
     2403        <!-- don't create two instances of the submit buttons on pending events; 
     2404             the publishing buttons require numerous unique ids --> 
     2405        <xsl:call-template name="submitEventButtons"/> 
     2406      </xsl:if> 
    16962407    </form> 
     2408  </xsl:template> 
     2409 
     2410  <xsl:template name="submitEventButtons"> 
     2411    <table border="0" id="submitTable"> 
     2412      <tr> 
     2413        <xsl:choose> 
     2414          <xsl:when test="starts-with(form/calendar/path,$submissionsRootUnencoded)"> 
     2415            <td> 
     2416              <div id="publishBox" class="invisible"> 
     2417                <div id="publishBoxCloseButton"> 
     2418                  <a href="javascript:resetPublishBox('calendarId')"> 
     2419                    <img src="{$resourcesRoot}/resources/closeIcon.gif" width="20" height="20" alt="close" border="0"/> 
     2420                  </a> 
     2421                </div> 
     2422                <strong>Select a calendar in which to publish this event:</strong><br/> 
     2423                <select name="calendarId" id="calendarId"> 
     2424                  <option> 
     2425                    <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> 
     2426                    Select: 
     2427                  </option> 
     2428                  <xsl:for-each select="form/calendar/all/select/option"> 
     2429                    <xsl:sort select="." order="ascending"/> 
     2430                    <option> 
     2431                      <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> 
     2432                      <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
     2433                      <xsl:choose> 
     2434                        <xsl:when test="starts-with(node(),/bedework/submissionsRoot/unencoded)"> 
     2435                          submitted events 
     2436                        </xsl:when> 
     2437                        <xsl:otherwise> 
     2438                          <xsl:value-of select="substring-after(node(),'/public/')"/> 
     2439                        </xsl:otherwise> 
     2440                      </xsl:choose> 
     2441                    </option> 
     2442                  </xsl:for-each> 
     2443                </select> 
     2444                <input type="submit" name="publishEvent" value="Publish" onclick="changeClass('publishBox','invisible')"/> 
     2445                <xsl:if test="$portalFriendly = 'false'"> 
     2446                  <br/> 
     2447                  <span id="calDescriptionsLink"> 
     2448                    <a href="javascript:launchSimpleWindow('{$calendar-fetchDescriptions}')">calendar descriptions</a> 
     2449                  </span> 
     2450                </xsl:if> 
     2451              </div> 
     2452              <input type="submit" name="updateSubmitEvent" value="Update Event"/> 
     2453              <input type="button" name="publishEvent" value="Publish Event" onclick="changeClass('publishBox','visible')"/> 
     2454              <input type="submit" name="cancel" value="Cancel"/> 
     2455            </td> 
     2456            <td align="right"> 
     2457              <input type="submit" name="delete" value="Delete Event"/> 
     2458            </td> 
     2459          </xsl:when> 
     2460          <xsl:otherwise> 
     2461            <xsl:choose> 
     2462              <xsl:when test="/bedework/creating='true'"> 
     2463                <td> 
     2464                  <input type="submit" name="addEvent" value="Add Event"/> 
     2465                  <input type="submit" name="cancelled" value="Cancel"/> 
     2466                </td> 
     2467              </xsl:when> 
     2468              <xsl:otherwise> 
     2469                <td> 
     2470                  <input type="submit" name="updateEvent" value="Update Event"/> 
     2471                  <input type="submit" name="cancelled" value="Cancel"/> 
     2472                  <xsl:if test="form/recurringEntity != 'true' and recurrenceId = ''"> 
     2473                    <!-- cannot duplicate recurring events for now --> 
     2474                    <input type="submit" name="copy" value="Copy Event"/> 
     2475                  </xsl:if> 
     2476                </td> 
     2477                <td align="right"> 
     2478                  <input type="submit" name="delete" value="Delete Event"/> 
     2479                </td> 
     2480              </xsl:otherwise> 
     2481            </xsl:choose> 
     2482          </xsl:otherwise> 
     2483        </xsl:choose> 
     2484      </tr> 
     2485    </table> 
    16972486  </xsl:template> 
    16982487 
     
    17982587      <!-- Bedework 24-Hour Clock time selection widget 
    17992588           used with resources/bwClock.js and resources/bwClock.css --> 
     2589      <xsl:variable name="hour24" select="/bedework/hour24"/><!-- true or false --> 
    18002590      <div id="bwClockClock"> 
    1801         <img id="clockMap" src="{$resourcesRoot}/resources/clockMap.gif" width="368" height="368" border="0" alt="" usemap="#bwClockMap" /> 
     2591        <img id="clockMap" src="{$resourcesRoot}/resources/clockMap.gif" width="368" height="368" border="0" alt="bwClock" usemap="#bwClockMap" /> 
    18022592      </div> 
    18032593      <div id="bwClockCover"> 
     2594        &#160; 
    18042595        <!-- this is a special effect div used simply to cover the pixelated edge 
    1805              where the clock meets the clock box title --></div> 
     2596             where the clock meets the clock box title --> 
     2597      </div> 
    18062598      <div id="bwClockBox"> 
    18072599        <h2> 
     
    18132605        <div id="bwClockTime"> 
    18142606          select time 
     2607        </div> 
     2608        <div id="bwClockSwitch"> 
     2609          switch 
    18152610        </div> 
    18162611        <div id="bwClockCloseText"> 
     
    18332628        <area shape="poly" alt="minute 00:15" title="minute 00:15" coords="216,178, 216,196, 261,206, 261,159" href="javascript:bwClockUpdateDateTimeForm('minute','15')" /> 
    18342629        <area shape="poly" alt="minute 00:10" title="minute 00:10" coords="209,164, 216,178, 261,159, 240,126" href="javascript:bwClockUpdateDateTimeForm('minute','10')" /> 
    1835         <area shape="poly" alt="minute 00:05" title="minute 00:05" coords="196,155, 209,164, 238,126, 206,107" href="javascript:bwClockUpdateDateTimeForm('minute','05')" /> 
    1836         <area shape="poly" alt="minute 00:00" title="minute 00:00" coords="169,155, 196,155, 206,105, 156,105" href="javascript:bwClockUpdateDateTimeForm('minute','00')" /> 
    1837         <area shape="poly" alt="11 PM, 2300 hour" title="11 PM, 2300 hour" coords="150,102, 172,96, 158,1, 114,14" href="javascript:bwClockUpdateDateTimeForm('hour','23')" /> 
    1838         <area shape="poly" alt="10 PM, 2200 hour" title="10 PM, 2200 hour" coords="131,114, 150,102, 114,14, 74,36" href="javascript:bwClockUpdateDateTimeForm('hour','22')" /> 
    1839         <area shape="poly" alt="9 PM, 2100 hour" title="9 PM, 2100 hour" coords="111,132, 131,114, 74,36, 40,69" href="javascript:bwClockUpdateDateTimeForm('hour','21')" /> 
    1840         <area shape="poly" alt="8 PM, 2000 hour" title="8 PM, 2000 hour" coords="101,149, 111,132, 40,69, 15,113" href="javascript:bwClockUpdateDateTimeForm('hour','20')" /> 
    1841         <area shape="poly" alt="7 PM, 1900 hour" title="7 PM, 1900 hour" coords="95,170, 101,149, 15,113, 1,159" href="javascript:bwClockUpdateDateTimeForm('hour','19')" /> 
    1842         <area shape="poly" alt="6 PM, 1800 hour" title="6 PM, 1800 hour" coords="95,196, 95,170, 0,159, 0,204" href="javascript:bwClockUpdateDateTimeForm('hour','18')" /> 
    1843         <area shape="poly" alt="5 PM, 1700 hour" title="5 PM, 1700 hour" coords="103,225, 95,196, 1,205, 16,256" href="javascript:bwClockUpdateDateTimeForm('hour','17')" /> 
    1844         <area shape="poly" alt="4 PM, 1600 hour" title="4 PM, 1600 hour" coords="116,245, 103,225, 16,256, 41,298" href="javascript:bwClockUpdateDateTimeForm('hour','16')" /> 
    1845         <area shape="poly" alt="3 PM, 1500 hour" title="3 PM, 1500 hour" coords="134,259, 117,245, 41,298, 76,332" href="javascript:bwClockUpdateDateTimeForm('hour','15')" /> 
    1846         <area shape="poly" alt="2 PM, 1400 hour" title="2 PM, 1400 hour" coords="150,268, 134,259, 76,333, 121,355" href="javascript:bwClockUpdateDateTimeForm('hour','14')" /> 
    1847         <area shape="poly" alt="1 PM, 1300 hour" title="1 PM, 1300 hour" coords="169,273, 150,268, 120,356, 165,365" href="javascript:bwClockUpdateDateTimeForm('hour','13')" /> 
    1848         <area shape="poly" alt="Noon, 1200 hour" title="Noon, 1200 hour" coords="193,273, 169,273, 165,365, 210,364" href="javascript:bwClockUpdateDateTimeForm('hour','12')" /> 
    1849         <area shape="poly" alt="11 AM, 1100 hour" title="11 AM, 1100 hour" coords="214,270, 193,273, 210,363, 252,352" href="javascript:bwClockUpdateDateTimeForm('hour','11')" /> 
    1850         <area shape="poly" alt="10 AM, 1000 hour" title="10 AM, 1000 hour" coords="232,259, 214,270, 252,352, 291,330" href="javascript:bwClockUpdateDateTimeForm('hour','10')" /> 
    1851         <area shape="poly" alt="9 AM, 0900 hour" title="9 AM, 0900 hour" coords="251,240, 232,258, 291,330, 323,301" href="javascript:bwClockUpdateDateTimeForm('hour','09')" /> 
    1852         <area shape="poly" alt="8 AM, 0800 hour" title="8 AM, 0800 hour" coords="263,219, 251,239, 323,301, 349,261" href="javascript:bwClockUpdateDateTimeForm('hour','08')" /> 
    1853         <area shape="poly" alt="7 AM, 0700 hour" title="7 AM, 0700 hour" coords="269,194, 263,219, 349,261, 363,212" href="javascript:bwClockUpdateDateTimeForm('hour','07')" /> 
    1854         <area shape="poly" alt="6 AM, 0600 hour" title="6 AM, 0600 hour" coords="269,172, 269,193, 363,212, 363,155" href="javascript:bwClockUpdateDateTimeForm('hour','06')" /> 
    1855         <area shape="poly" alt="5 AM, 0500 hour" title="5 AM, 0500 hour" coords="263,150, 269,172, 363,155, 351,109" href="javascript:bwClockUpdateDateTimeForm('hour','05')" /> 
    1856         <area shape="poly" alt="4 AM, 0400 hour" title="4 AM, 0400 hour" coords="251,130, 263,150, 351,109, 325,68" href="javascript:bwClockUpdateDateTimeForm('hour','04')" /> 
    1857         <area shape="poly" alt="3 AM, 0300 hour" title="3 AM, 0300 hour" coords="234,112, 251,130, 325,67, 295,37" href="javascript:bwClockUpdateDateTimeForm('hour','03')" /> 
    1858         <area shape="poly" alt="2 AM, 0200 hour" title="2 AM, 0200 hour" coords="221,102, 234,112, 295,37, 247,11" href="javascript:bwClockUpdateDateTimeForm('hour','02')" /> 
    1859         <area shape="poly" alt="1 AM, 0100 hour" title="1 AM, 0100 hour" coords="196,96, 221,102, 247,10, 209,-1, 201,61, 206,64, 205,74, 199,75" href="javascript:bwClockUpdateDateTimeForm('hour','01')" /> 
    1860         <area shape="poly" alt="Midnight, 0000 hour" title="Midnight, 0000 hour" coords="172,96, 169,74, 161,73, 161,65, 168,63, 158,-1, 209,-1, 201,61, 200,62, 206,64, 205,74, 198,75, 196,96, 183,95" href="javascript:bwClockUpdateDateTimeForm('hour','00')" /> 
     2630        <area shape="poly" alt="minute 00:05" title="minute 00:05" coords="196,155, 209,164, 238,126, 206,107" href="javascript:bwClockUpdateDateTimeForm('minute','5')" /> 
     2631        <area shape="poly" alt="minute 00:00" title="minute 00:00" coords="169,155, 196,155, 206,105, 156,105" href="javascript:bwClockUpdateDateTimeForm('minute','0')" /> 
     2632        <area shape="poly" alt="11 PM, 2300 hour" title="11 PM, 2300 hour" coords="150,102, 172,96, 158,1, 114,14" href="javascript:bwClockUpdateDateTimeForm('hour','23',{$hour24})" /> 
     2633        <area shape="poly" alt="10 PM, 2200 hour" title="10 PM, 2200 hour" coords="131,114, 150,102, 114,14, 74,36" href="javascript:bwClockUpdateDateTimeForm('hour','22',{$hour24})" /> 
     2634        <area shape="poly" alt="9 PM, 2100 hour" title="9 PM, 2100 hour" coords="111,132, 131,114, 74,36, 40,69" href="javascript:bwClockUpdateDateTimeForm('hour','21',{$hour24})" /> 
     2635        <area shape="poly" alt="8 PM, 2000 hour" title="8 PM, 2000 hour" coords="101,149, 111,132, 40,69, 15,113" href="javascript:bwClockUpdateDateTimeForm('hour','20',{$hour24})" /> 
     2636        <area shape="poly" alt="7 PM, 1900 hour" title="7 PM, 1900 hour" coords="95,170, 101,149, 15,113, 1,159" href="javascript:bwClockUpdateDateTimeForm('hour','19',{$hour24})" /> 
     2637        <area shape="poly" alt="6 PM, 1800 hour" title="6 PM, 1800 hour" coords="95,196, 95,170, 0,159, 0,204" href="javascript:bwClockUpdateDateTimeForm('hour','18',{$hour24})" /> 
     2638        <area shape="poly" alt="5 PM, 1700 hour" title="5 PM, 1700 hour" coords="103,225, 95,196, 1,205, 16,256" href="javascript:bwClockUpdateDateTimeForm('hour','17',{$hour24})" /> 
     2639        <area shape="poly" alt="4 PM, 1600 hour" title="4 PM, 1600 hour" coords="116,245, 103,225, 16,256, 41,298" href="javascript:bwClockUpdateDateTimeForm('hour','16',{$hour24})" /> 
     2640        <area shape="poly" alt="3 PM, 1500 hour" title="3 PM, 1500 hour" coords="134,259, 117,245, 41,298, 76,332" href="javascript:bwClockUpdateDateTimeForm('hour','15',{$hour24})" /> 
     2641        <area shape="poly" alt="2 PM, 1400 hour" title="2 PM, 1400 hour" coords="150,268, 134,259, 76,333, 121,355" href="javascript:bwClockUpdateDateTimeForm('hour','14',{$hour24})" /> 
     2642        <area shape="poly" alt="1 PM, 1300 hour" title="1 PM, 1300 hour" coords="169,273, 150,268, 120,356, 165,365" href="javascript:bwClockUpdateDateTimeForm('hour','13',{$hour24})" /> 
     2643        <area shape="poly" alt="Noon, 1200 hour" title="Noon, 1200 hour" coords="193,273, 169,273, 165,365, 210,364" href="javascript:bwClockUpdateDateTimeForm('hour','12',{$hour24})" /> 
     2644        <area shape="poly" alt="11 AM, 1100 hour" title="11 AM, 1100 hour" coords="214,270, 193,273, 210,363, 252,352" href="javascript:bwClockUpdateDateTimeForm('hour','11',{$hour24})" /> 
     2645        <area shape="poly" alt="10 AM, 1000 hour" title="10 AM, 1000 hour" coords="232,259, 214,270, 252,352, 291,330" href="javascript:bwClockUpdateDateTimeForm('hour','10',{$hour24})" /> 
     2646        <area shape="poly" alt="9 AM, 0900 hour" title="9 AM, 0900 hour" coords="251,240, 232,258, 291,330, 323,301" href="javascript:bwClockUpdateDateTimeForm('hour','9',{$hour24})" /> 
     2647        <area shape="poly" alt="8 AM, 0800 hour" title="8 AM, 0800 hour" coords="263,219, 251,239, 323,301, 349,261" href="javascript:bwClockUpdateDateTimeForm('hour','8',{$hour24})" /> 
     2648        <area shape="poly" alt="7 AM, 0700 hour" title="7 AM, 0700 hour" coords="269,194, 263,219, 349,261, 363,212" href="javascript:bwClockUpdateDateTimeForm('hour','7',{$hour24})" /> 
     2649        <area shape="poly" alt="6 AM, 0600 hour" title="6 AM, 0600 hour" coords="269,172, 269,193, 363,212, 363,155" href="javascript:bwClockUpdateDateTimeForm('hour','6',{$hour24})" /> 
     2650        <area shape="poly" alt="5 AM, 0500 hour" title="5 AM, 0500 hour" coords="263,150, 269,172, 363,155, 351,109" href="javascript:bwClockUpdateDateTimeForm('hour','5',{$hour24})" /> 
     2651        <area shape="poly" alt="4 AM, 0400 hour" title="4 AM, 0400 hour" coords="251,130, 263,150, 351,109, 325,68" href="javascript:bwClockUpdateDateTimeForm('hour','4',{$hour24})" /> 
     2652        <area shape="poly" alt="3 AM, 0300 hour" title="3 AM, 0300 hour" coords="234,112, 251,130, 325,67, 295,37" href="javascript:bwClockUpdateDateTimeForm('hour','3',{$hour24})" /> 
     2653        <area shape="poly" alt="2 AM, 0200 hour" title="2 AM, 0200 hour" coords="221,102, 234,112, 295,37, 247,11" href="javascript:bwClockUpdateDateTimeForm('hour','2',{$hour24})" /> 
     2654        <area shape="poly" alt="1 AM, 0100 hour" title="1 AM, 0100 hour" coords="196,96, 221,102, 247,10, 209,-1, 201,61, 206,64, 205,74, 199,75" href="javascript:bwClockUpdateDateTimeForm('hour','1',{$hour24})" /> 
     2655        <area shape="poly" alt="Midnight, 0000 hour" title="Midnight, 0000 hour" coords="172,96, 169,74, 161,73, 161,65, 168,63, 158,-1, 209,-1, 201,61, 200,62, 206,64, 205,74, 198,75, 196,96, 183,95" href="javascript:bwClockUpdateDateTimeForm('hour','0',{$hour24})" /> 
    18612656      </map> 
    18622657    </div> 
    18632658  </xsl:template> 
    18642659 
    1865   <xsl:template match="event" mode="displayEvent"> 
     2660 <xsl:template match="event" mode="displayEvent"> 
    18662661    <xsl:variable name="calPath" select="calendar/path"/> 
    18672662    <xsl:variable name="guid" select="guid"/> 
     
    18692664 
    18702665    <xsl:choose> 
    1871       <xsl:when test="/bedework/page='deleteEventConfirm'"> 
    1872  
     2666      <xsl:when test="/bedework/page='deleteEventConfirm' or /bedework/page='deleteEventConfirmPending'"> 
    18732667        <h2>Ok to delete this event?</h2> 
    18742668        <p style="width: 400px;">Note: we do not encourage deletion of old but correct events; we prefer to keep 
     
    18762670           that are truly erroneous.</p> 
    18772671        <p id="confirmButtons"> 
    1878           <form action="{$event-delete}" method="post"> 
     2672          <form method="post"> 
     2673            <xsl:choose> 
     2674              <xsl:when test="/bedework/page = 'deleteEventConfirmPending'"> 
     2675                <xsl:attribute name="action"><xsl:value-of select="$event-deletePending"/></xsl:attribute> 
     2676              </xsl:when> 
     2677              <xsl:otherwise> 
     2678                <xsl:attribute name="action"><xsl:value-of select="$event-delete"/></xsl:attribute> 
     2679              </xsl:otherwise> 
     2680            </xsl:choose> 
    18792681            <input type="submit" name="cancelled" value="Cancel"/> 
    18802682            <input type="submit" name="delete" value="Delete"/> 
     
    19892791          <xsl:variable name="mailto" select="email"/> 
    19902792          <a href="mailto:{$mailto}"><xsl:value-of select="email"/></a> 
    1991           <xsl:variable name="link" select="link"/> 
    1992           <a href="mailto:{$link}"><xsl:value-of select="link"/></a> 
     2793          <xsl:variable name="contactLink" select="link"/> 
     2794          <a href="mailto:{$contactLink}"><xsl:value-of select="contact/link"/></a> 
    19932795        </td> 
    19942796      </tr> 
     
    21172919                <input type="submit" name="addContact" value="Add Contact"/> 
    21182920                <input type="submit" name="cancelled" value="Cancel"/> 
    2119                 <input type="reset" value="Clear"/> 
    21202921              </td> 
    21212922            </xsl:when> 
     
    21242925                <input type="submit" name="updateContact" value="Update Contact"/> 
    21252926                <input type="submit" name="cancelled" value="Cancel"/> 
    2126                 <input type="reset" value="Reset"/> 
    21272927              </td> 
    21282928              <td align="right"> 
     
    22523052                <input type="submit" name="addLocation" value="Add Location"/> 
    22533053                <input type="submit" name="cancelled" value="Cancel"/> 
    2254                 <input type="reset" value="Clear"/> 
    22553054              </td> 
    22563055            </xsl:when> 
     
    22593058                <input type="submit" name="updateLocation" value="Update Location"/> 
    22603059                <input type="submit" name="cancelled" value="Cancel"/> 
    2261                 <input type="reset" value="Reset"/> 
    22623060              </td> 
    22633061              <td align="right"> 
     
    23573155              </td> 
    23583156              <td> 
    2359                 <textarea name="categoryDesc.value" rows="3" cols="60"> 
    2360                 </textarea> 
     3157                <textarea name="categoryDesc.value" rows="3" cols="60"></textarea> 
    23613158              </td> 
    23623159            </tr> 
     
    23673164                <input type="submit" name="addCategory" value="Add Category"/> 
    23683165                <input type="submit" name="cancelled" value="Cancel"/> 
    2369                 <input type="reset" value="Clear"/> 
    23703166              </td> 
    23713167            </tr> 
     
    24033199                <input type="submit" name="updateCategory" value="Update Category"/> 
    24043200                <input type="submit" name="cancelled" value="Cancel"/> 
    2405                 <input type="reset" value="Reset"/> 
    24063201              </td> 
    24073202              <td align="right"> 
     
    24473242 
    24483243<!--+++++++++++++++ Calendars ++++++++++++++++++++--> 
    2449   <xsl:template match="calendars"
     3244  <xsl:template match="calendars" mode="calendarCommon"
    24503245    <table id="calendarTable"> 
    24513246      <tr> 
     
    24983293    </xsl:variable> 
    24993294    <li class="{$itemClass}"> 
     3295      <xsl:if test="calendarCollection='false'"> 
     3296        <!-- test the open state of the folder; if it's open, 
     3297             build a URL to close it and vice versa --> 
     3298        <xsl:choose> 
     3299          <xsl:when test="open = 'true'"> 
     3300            <a href="{$calendar-openCloseMod}&amp;calPath={$calPath}&amp;open=false"> 
     3301              <img src="{$resourcesRoot}/resources/minus.gif" width="9" height="9" alt="close" border="0" class="bwPlusMinusIcon"/> 
     3302            </a> 
     3303          </xsl:when> 
     3304          <xsl:otherwise> 
     3305            <a href="{$calendar-openCloseMod}&amp;calPath={$calPath}&amp;open=true"> 
     3306              <img src="{$resourcesRoot}/resources/plus.gif" width="9" height="9" alt="open" border="0" class="bwPlusMinusIcon"/> 
     3307            </a> 
     3308          </xsl:otherwise> 
     3309        </xsl:choose> 
     3310      </xsl:if> 
    25003311      <a href="{$calendar-fetchForUpdate}&amp;calPath={$calPath}" title="update"> 
    25013312        <xsl:value-of select="name"/> 
     
    25253336    </xsl:variable> 
    25263337    <li class="{$itemClass}"> 
     3338      <xsl:if test="calendarCollection='false'"> 
     3339        <!-- test the open state of the folder; if it's open, 
     3340             build a URL to close it and vice versa --> 
     3341        <xsl:choose> 
     3342          <xsl:when test="open = 'true'"> 
     3343            <a href="{$calendar-openCloseDisplay}&amp;calPath={$calPath}&amp;open=false"> 
     3344              <img src="{$resourcesRoot}/resources/minus.gif" width="9" height="9" alt="close" border="0" class="bwPlusMinusIcon"/> 
     3345            </a> 
     3346          </xsl:when> 
     3347          <xsl:otherwise> 
     3348            <a href="{$calendar-openCloseDisplay}&amp;calPath={$calPath}&amp;open=true"> 
     3349              <img src="{$resourcesRoot}/resources/plus.gif" width="9" height="9" alt="open" border="0" class="bwPlusMinusIcon"/> 
     3350            </a> 
     3351          </xsl:otherwise> 
     3352        </xsl:choose> 
     3353      </xsl:if> 
    25273354      <a href="{$calendar-fetchForDisplay}&amp;calPath={$calPath}" title="display"> 
    25283355        <xsl:value-of select="name"/> 
     
    25373364  </xsl:template> 
    25383365 
     3366  <xsl:template match="calendar" mode="listForMove"> 
     3367    <xsl:variable name="calPath" select="encodedPath"/> 
     3368    <xsl:if test="calendarCollection='false'"> 
     3369      <li class="folder"> 
     3370        <!-- test the open state of the folder; if it's open, 
     3371             build a URL to close it and vice versa --> 
     3372        <xsl:choose> 
     3373          <xsl:when test="open = 'true'"> 
     3374            <a href="{$calendar-openCloseMove}&amp;newCalPath={$calPath}&amp;open=false"> 
     3375              <img src="{$resourcesRoot}/resources/minus.gif" width="9" height="9" alt="close" border="0" class="bwPlusMinusIcon"/> 
     3376            </a> 
     3377          </xsl:when> 
     3378          <xsl:otherwise> 
     3379            <a href="{$calendar-openCloseMove}&amp;newCalPath={$calPath}&amp;open=true"> 
     3380              <img src="{$resourcesRoot}/resources/plus.gif" width="9" height="9" alt="open" border="0" class="bwPlusMinusIcon"/> 
     3381            </a> 
     3382          </xsl:otherwise> 
     3383        </xsl:choose> 
     3384        <a href="{$calendar-update}&amp;newCalPath={$calPath}" title="update"> 
     3385          <xsl:value-of select="name"/> 
     3386        </a> 
     3387        <xsl:if test="calendar"> 
     3388          <ul> 
     3389            <xsl:apply-templates select="calendar" mode="listForMove"/> 
     3390          </ul> 
     3391        </xsl:if> 
     3392      </li> 
     3393    </xsl:if> 
     3394  </xsl:template> 
     3395 
    25393396  <xsl:template match="currentCalendar" mode="addCalendar"> 
    25403397    <h3>Add Calendar / Folder</h3> 
    2541     <form name="addCalForm" action="{$calendar-update}"> 
     3398    <form name="addCalForm" method="post" action="{$calendar-update}"> 
    25423399      <table class="eventFormTable"> 
    25433400        <tr> 
     
    25853442            <input type="submit" name="addCalendar" value="Add Calendar/Folder"/> 
    25863443            <input type="submit" name="cancelled" value="Cancel"/> 
    2587             <input type="reset" value="Clear"/> 
    25883444          </td> 
    25893445        </tr> 
     
    26053461      </xsl:otherwise> 
    26063462    </xsl:choose> 
    2607     <form name="modCalForm" action="{$calendar-update}"
     3463    <form name="modCalForm" action="{$calendar-update}" method="post"
    26083464      <table class="eventFormTable"> 
    26093465        <tr> 
     
    26113467          <td> 
    26123468            <xsl:value-of select="path"/> 
     3469            <xsl:text> </xsl:text> 
     3470            <a href="{$calendar-move}">move</a> 
    26133471          </td> 
    26143472        </tr> 
     
    26693527            </xsl:choose> 
    26703528            <input type="submit" name="cancelled" value="Cancel"/> 
    2671             <input type="reset" value="Reset"/> 
    26723529          </td> 
    26733530          <td align="right"> 
     
    26873544 
    26883545    <div id="sharingBox"> 
     3546      <xsl:apply-templates select="acl" mode="currentAccess"> 
     3547        <xsl:with-param name="action" select="$calendar-setAccess"/> 
     3548        <xsl:with-param name="calPathEncoded" select="encodedPath"/> 
     3549      </xsl:apply-templates> 
     3550      <form name="calendarShareForm" action="{$calendar-setAccess}" id="shareForm" onsubmit="setAccessHow(this)" method="post"> 
     3551        <input type="hidden" name="calPath"> 
     3552          <xsl:attribute name="value"><xsl:value-of select="path"/></xsl:attribute> 
     3553        </input> 
     3554        <xsl:call-template name="entityAccessForm"> 
     3555          <xsl:with-param name="type"> 
     3556            <xsl:choose> 
     3557              <xsl:when test="calType = '5'">inbox</xsl:when> 
     3558              <xsl:when test="calType = '6'">outbox</xsl:when> 
     3559              <xsl:otherwise>normal</xsl:otherwise> 
     3560            </xsl:choose> 
     3561          </xsl:with-param> 
     3562        </xsl:call-template> 
     3563      </form> 
     3564    </div> 
     3565 
     3566    <!--<div id="sharingBox"> 
    26893567      <xsl:variable name="calPath" select="path"/> 
    26903568      <xsl:variable name="encodedCalPath" select="encodedPath"/> 
     
    27703648                        <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)">group</xsl:when> 
    27713649                        <xsl:when test="$who='authenticated'">auth</xsl:when> 
     3650                        <xsl:when test="$who='unauthenticated'">unauth</xsl:when> 
    27723651                        <xsl:when test="invert/principal/property/owner">other</xsl:when> 
    27733652                        <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
     
    27803659                        <xsl:when test="contains($who,/bedework/syspars/userPrincipalRoot)"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/userPrincipalRoot)),'/')"/></xsl:when> 
    27813660                        <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/groupPrincipalRoot)),'/')"/></xsl:when> 
    2782                         <xsl:otherwise></xsl:otherwise> <!-- if not user or group, send no who --> 
    2783                       </xsl:choose> 
     3661                        <xsl:otherwise></xsl:otherwise>--> <!-- if not user or group, send no who --> 
     3662        <!--              </xsl:choose> 
    27843663                    </xsl:variable> 
    27853664                    <xsl:choose> 
     
    28253704                  <input type="radio" value="other" name="whoType"/> other users<br/> 
    28263705                  <input type="radio" value="owner" name="whoType"/> owner 
    2827                 </p> 
     3706                </p>--> 
    28283707                <!-- we may never use the invert action ...it is probably 
    28293708                     too confusing, and can be achieved in other ways --> 
     
    28323711                  <input type="checkbox" value="yes" name="notWho"/> invert (deny) 
    28333712                </p>--> 
    2834               </td> 
     3713              <!--</td> 
    28353714              <td> 
    28363715                <ul id="howList"> 
     
    28623741                    <input type="radio" value="N" name="how"/> 
    28633742                    <strong>None</strong> 
    2864                   </li> 
     3743                  </li>--> 
    28653744                  <!-- 
    28663745                  <li class="padTop"> 
     
    28683747                    <strong>Restore default access</strong> 
    28693748                  </li>--> 
    2870                 </ul> 
     3749                <!--</ul> 
    28713750              </td> 
    28723751            </tr> 
     
    28753754        </form> 
    28763755      </xsl:if> 
    2877     </div> 
    2878   </xsl:template> 
     3756    </div>--> 
     3757  </xsl:template> 
     3758 
    28793759 
    28803760  <xsl:template name="calendarList"> 
     
    29063786      heirarchy.</li> 
    29073787    </ul> 
    2908  
    2909     <p> 
    2910       <strong>All Calendar Descriptions:</strong> 
    2911     </p> 
    2912     <table id="flatCalendarDescriptions" cellspacing="0"> 
    2913       <tr> 
    2914         <th>Name</th> 
    2915         <th>Description</th> 
    2916       </tr> 
    2917       <xsl:for-each select="//calendar"> 
    2918         <xsl:variable name="descClass"> 
    2919           <xsl:choose> 
    2920             <xsl:when test="position() mod 2 = 0">even</xsl:when> 
    2921             <xsl:otherwise>odd</xsl:otherwise> 
    2922           </xsl:choose> 
    2923         </xsl:variable> 
    2924         <tr class="{$descClass}"> 
    2925           <td> 
    2926             <xsl:value-of select="name"/> 
    2927           </td> 
    2928           <td> 
    2929             <xsl:value-of select="desc"/> 
    2930           </td> 
    2931         </tr> 
    2932       </xsl:for-each> 
    2933     </table> 
    29343788  </xsl:template> 
    29353789 
     
    29813835    </xsl:choose> 
    29823836 
    2983     <form name="delCalForm" action="{$calendar-delete}"
     3837    <form name="delCalForm" action="{$calendar-delete}" method="post"
    29843838      <table class="eventFormTable"> 
    29853839        <tr> 
     
    30333887    <div id="calTreeBlock"> 
    30343888      <h2>Select a calendar</h2> 
    3035       <!--<form name="toggleCals" action="{$event-selectCalForEvent}"
     3889      <!--<form name="toggleCals" action="{$event-selectCalForEvent}" method="post"
    30363890        <xsl:choose> 
    30373891          <xsl:when test="/bedework/appvar[key='showAllCalsForEvent']/value = 'true'"> 
     
    30573911 
    30583912  <xsl:template match="calendar" mode="selectCalForEventCalTree"> 
    3059     <xsl:variable name="id" select="id"/> 
    3060     <li> 
    3061       <xsl:attribute name="class"> 
     3913    <xsl:variable name="calPath" select="path"/><!-- not the encodedPath when put in a form - otherwise it gets double encoded --> 
     3914      <xsl:variable name="calDisplay" select="path"/> 
     3915    <xsl:variable name="itemClass"> 
     3916      <xsl:choose> 
     3917        <xsl:when test="calendarCollection='false'">folder</xsl:when> 
     3918        <xsl:otherwise>calendar</xsl:otherwise> 
     3919      </xsl:choose> 
     3920    </xsl:variable> 
     3921    <li class="{$itemClass}"> 
     3922      <xsl:if test="calendarCollection='false'"> 
     3923        <!-- test the open state of the folder; if it's open, 
     3924             build a URL to close it and vice versa --> 
    30623925        <xsl:choose> 
    3063           <xsl:when test="calendarCollection='false'">folder</xsl:when> 
    3064           <xsl:otherwise>calendar</xsl:otherwise> 
     3926          <xsl:when test="open = 'true'"> 
     3927            <a href="{$calendar-openCloseSelect}&amp;calPath={$calPath}&amp;open=false"> 
     3928              <img src="{$resourcesRoot}/resources/minus.gif" width="9" height="9" alt="close" border="0" class="bwPlusMinusIcon"/> 
     3929            </a> 
     3930          </xsl:when> 
     3931          <xsl:otherwise> 
     3932            <a href="{$calendar-openCloseSelect}&amp;calPath={$calPath}&amp;open=true"> 
     3933              <img src="{$resourcesRoot}/resources/plus.gif" width="9" height="9" alt="open" border="0" class="bwPlusMinusIcon"/> 
     3934            </a> 
     3935          </xsl:otherwise> 
    30653936        </xsl:choose> 
    3066       </xsl:attribute> 
    3067       <xsl:variable name="calPath" select="path"/><!-- not the encodedPath when put in a form - otherwise it gets double encoded --> 
    3068       <xsl:variable name="calDisplay" select="path"/> 
     3937      </xsl:if> 
    30693938      <xsl:choose> 
    30703939        <xsl:when test="currentAccess/current-user-privilege-set/privilege/write-content and (calendarCollection = 'true')"> 
     
    30853954      </xsl:if> 
    30863955    </li> 
     3956  </xsl:template> 
     3957 
     3958  <xsl:template name="calendarMove"> 
     3959    <table id="calendarTable"> 
     3960      <tr> 
     3961        <td class="calendarContent"> 
     3962          <h3>Move Calendar/Folder</h3> 
     3963 
     3964          <table class="eventFormTable"> 
     3965            <tr> 
     3966              <th>Current Path:</th> 
     3967              <td> 
     3968                <xsl:value-of select="/bedework/currentCalendar/path"/> 
     3969              </td> 
     3970            </tr> 
     3971            <tr> 
     3972              <th>Name:</th> 
     3973              <td> 
     3974                <xsl:value-of select="/bedework/currentCalendar/name"/> 
     3975              </td> 
     3976            </tr> 
     3977            <tr> 
     3978              <th>Mailing List ID:</th> 
     3979              <td> 
     3980                <xsl:value-of select="/bedework/currentCalendar/mailListId"/> 
     3981              </td> 
     3982            </tr> 
     3983            <tr> 
     3984              <th>Summary:</th> 
     3985              <td> 
     3986                <xsl:value-of select="/bedework/currentCalendar/summary"/> 
     3987              </td> 
     3988            </tr> 
     3989            <tr> 
     3990              <th>Description:</th> 
     3991              <td> 
     3992                <xsl:value-of select="/bedework/currentCalendar/desc"/> 
     3993              </td> 
     3994            </tr> 
     3995          </table> 
     3996        </td> 
     3997        <td class="bwCalsForMove"> 
     3998          <p>Select a new parent folder:</p> 
     3999          <ul id="calendarTree"> 
     4000            <xsl:apply-templates select="/bedework/calendars/calendar" mode="listForMove"/> 
     4001          </ul> 
     4002        </td> 
     4003      </tr> 
     4004    </table> 
     4005  </xsl:template> 
     4006 
     4007  <!--==== ACCESS CONTROL TEMPLATES ====--> 
     4008 
     4009  <!--<xsl:template match="eventAccess"> 
     4010    <xsl:variable name="calPathEncoded" select="calendar/encodedPath"/> 
     4011    <xsl:variable name="calPath" select="calendar/path"/> 
     4012    <xsl:variable name="guid" select="guid"/> 
     4013    <xsl:variable name="recurrenceId" select="recurrenceId"/> 
     4014    <div id="bwEventTab-Access"> 
     4015      <div id="sharingBox"> 
     4016        <xsl:apply-templates select="access/acl" mode="currentAccess"> 
     4017          <xsl:with-param name="action" select="$event-setAccess"/> 
     4018          <xsl:with-param name="calPathEncoded" select="$calPathEncoded"/> 
     4019          <xsl:with-param name="guid" select="$guid"/> 
     4020          <xsl:with-param name="recurrenceId" select="$recurrenceId"/> 
     4021        </xsl:apply-templates> 
     4022        <form name="eventShareForm" action="{$event-setAccess}" id="shareForm" onsubmit="setAccessHow(this)" method="post"> 
     4023          <input type="hidden" name="calPath" value="{$calPath}"/> 
     4024          <input type="hidden" name="guid" value="{$guid}"/> 
     4025          <input type="hidden" name="recurid" value="{$recurrenceId}"/> 
     4026          <xsl:call-template name="entityAccessForm"/> 
     4027        </form> 
     4028      </div> 
     4029    </div> 
     4030  </xsl:template>--> 
     4031 
     4032  <xsl:template name="schedulingAccessForm"> 
     4033    <xsl:param name="what"/> 
     4034    <input type="hidden" name="what"> 
     4035      <xsl:attribute name="value"><xsl:value-of select="$what"/></xsl:attribute> 
     4036    </input> 
     4037    <p> 
     4038      <input type="text" name="who" width="40"/> 
     4039      <span class="nowrap"><input type="radio" name="whoType" value="user" checked="checked"/>user</span> 
     4040      <span class="nowrap"><input type="radio" name="whoType" value="group"/>group</span> 
     4041    </p> 
     4042    <p> 
     4043      <strong>or</strong> 
     4044      <span class="nowrap"><input type="radio" name="whoType" value="owner"/>owner</span> 
     4045      <span class="nowrap"><input type="radio" name="whoType" value="auth"/>authenticated users</span> 
     4046      <span class="nowrap"><input type="radio" name="whoType" value="other"/>anyone</span> 
     4047    </p> 
     4048 
     4049    <input type="hidden" name="how" value="S"/> 
     4050    <dl> 
     4051      <dt> 
     4052        <input type="checkbox" name="howSetter" value="S" checked="checked" onchange="toggleScheduleHow(this.form,this)"/>all scheduling 
     4053      </dt> 
     4054      <dd> 
     4055        <input type="checkbox" name="howSetter" value="t" checked="checked" disabled="disabled"/>scheduling requests<br/> 
     4056        <input type="checkbox" name="howSetter" value="y" checked="checked" disabled="disabled"/>scheduling replies<br/> 
     4057        <input type="checkbox" name="howSetter" value="s" checked="checked" disabled="disabled"/>free-busy requests 
     4058      </dd> 
     4059    </dl> 
     4060 
     4061    <input type="submit" name="modPrefs" value="Update"/> 
     4062    <input type="submit" name="cancelled" value="cancel"/> 
     4063  </xsl:template> 
     4064 
     4065  <xsl:template name="entityAccessForm"> 
     4066    <xsl:param name="type"/><!-- optional: 
     4067    currently used for inbox and outbox to conditionally 
     4068    display scheduling access --> 
     4069    <table cellpadding="0" id="shareFormTable" class="common"> 
     4070      <tr> 
     4071        <th colspan="2" class="commonHeader">Add:</th> 
     4072      </tr> 
     4073      <tr> 
     4074        <td> 
     4075          <h5>Who:</h5> 
     4076          <div class="whoTypes"> 
     4077            <input type="text" name="who" size="20"/><br/> 
     4078            <input type="radio" value="user" name="whoType" checked="checked"/> user 
     4079            <input type="radio" value="group" name="whoType"/> group 
     4080            <p>OR</p> 
     4081            <p> 
     4082              <input type="radio" value="owner" name="whoType"/> owner<br/> 
     4083              <input type="radio" value="auth" name="whoType"/> authenticated<br/> 
     4084              <input type="radio" value="unauth" name="whoType"/> unauthenticated<br/> 
     4085              <input type="radio" value="all" name="whoType"/> all users 
     4086            </p> 
     4087          </div> 
     4088        </td> 
     4089        <td> 
     4090          <h5> 
     4091            <span id="accessRightsToggle"> 
     4092              <xsl:choose> 
     4093                <xsl:when test="/bedework/appvar[key='accessRightsToggle']/value='basic'"> 
     4094                  <input type="radio" name="setappvar" value="accessRightsToggle(basic)" checked="checked" onclick="changeClass('howList','visible');changeClass('howTable','invisible');"/>basic 
     4095                  <input type="radio" name="setappvar" value="accessRightsToggle(advanced)" onclick="changeClass('howList','invisible');changeClass('howTable','visible');"/>advanced 
     4096                </xsl:when> 
     4097                <xsl:otherwise> 
     4098                  <input type="radio" name="setappvar" value="accessRightsToggle(basic)" onclick="changeClass('howList','visible');changeClass('howTable','invisible');"/>basic 
     4099                  <input type="radio" name="setappvar" value="accessRightsToggle(advanced)" checked="checked" onclick="changeClass('howList','invisible');changeClass('howTable','visible');"/>advanced 
     4100                </xsl:otherwise> 
     4101              </xsl:choose> 
     4102            </span> 
     4103            Rights: 
     4104          </h5> 
     4105          <input type="hidden" name="how" value=""/> 
     4106          <!-- Advanced Access Rights: --> 
     4107          <!-- the "how" field is set by iterating over the howItems below --> 
     4108          <table id="howTable" class="visible" cellspacing="0"> 
     4109            <xsl:if test="/bedework/appvar[key='accessRightsToggle']/value='basic'"> 
     4110              <xsl:attribute name="class">invisible</xsl:attribute> 
     4111            </xsl:if> 
     4112            <tr> 
     4113              <th>access type</th> 
     4114              <th>allow</th> 
     4115              <th>deny</th> 
     4116            </tr> 
     4117            <tr> 
     4118              <td class="level1"> 
     4119                <input type="checkbox" value="A" name="howItem" onclick="setupAccessForm(this, this.form); toggleAllowDenyFlag(this, this.form)"/>All 
     4120              </td> 
     4121              <td> 
     4122                <input type="radio" value="A" name="A" checked="checked" disabled="disabled"/> 
     4123              </td> 
     4124              <td> 
     4125                <input type="radio" value="-A" name="A" disabled="disabled"/> 
     4126              </td> 
     4127            </tr> 
     4128            <tr> 
     4129              <td class="level2"> 
     4130                <input type="checkbox" value="R" name="howItem" onclick="setupAccessForm(this, this.form); toggleAllowDenyFlag(this, this.form)" checked="checked"/> Read 
     4131              </td> 
     4132              <td> 
     4133                <input type="radio" value="R" name="R" checked="checked"/> 
     4134              </td> 
     4135              <td> 
     4136                <input type="radio" value="-R" name="R"/> 
     4137              </td> 
     4138            </tr> 
     4139            <tr> 
     4140              <td class="level3"> 
     4141                <input type="checkbox" value="r" name="howItem" disabled="disabled" onclick="toggleAllowDenyFlag(this, this.form)"/> read ACL 
     4142              </td> 
     4143              <td> 
     4144                <input type="radio" value="r" name="r" checked="checked" disabled="disabled"/> 
     4145              </td> 
     4146              <td> 
     4147                <input type="radio" value="-r" name="r" disabled="disabled"/> 
     4148              </td> 
     4149            </tr> 
     4150            <tr> 
     4151              <td class="level3"> 
     4152                <input type="checkbox" value="P" name="howItem" disabled="disabled" onclick="toggleAllowDenyFlag(this, this.form)"/> read current user privilege set 
     4153              </td> 
     4154              <td> 
     4155                <input type="radio" value="P" name="P" checked="checked" disabled="disabled"/> 
     4156              </td> 
     4157              <td> 
     4158                <input type="radio" value="-P" name="P" disabled="disabled"/> 
     4159              </td> 
     4160            </tr> 
     4161            <tr> 
     4162              <td class="level3"> 
     4163                <input type="checkbox" value="F" name="howItem" disabled="disabled" onclick="toggleAllowDenyFlag(this, this.form)"/> read freebusy 
     4164              </td> 
     4165              <td> 
     4166                <input type="radio" value="F" name="F" checked="checked" disabled="disabled"/> 
     4167              </td> 
     4168              <td> 
     4169                <input type="radio" value="-F" name="F" disabled="disabled"/> 
     4170              </td> 
     4171            </tr> 
     4172            <tr> 
     4173              <td class="level2"> 
     4174                <input type="checkbox" value="W" name="howItem" onclick="setupAccessForm(this, this.form); toggleAllowDenyFlag(this, this.form)"/> Write 
     4175              </td> 
     4176              <td> 
     4177                <input type="radio" value="W" name="W" checked="checked" disabled="disabled"/> 
     4178              </td> 
     4179              <td> 
     4180                <input type="radio" value="-W" name="W" disabled="disabled"/> 
     4181              </td> 
     4182            </tr> 
     4183            <tr> 
     4184              <td class="level3"> 
     4185                <input type="checkbox" value="a" name="howItem" onclick="toggleAllowDenyFlag(this, this.form)"/> write ACL 
     4186              </td> 
     4187              <td> 
     4188                <input type="radio" value="a" name="a" checked="checked" disabled="disabled"/> 
     4189              </td> 
     4190              <td> 
     4191                <input type="radio" value="-a" name="a" disabled="disabled"/> 
     4192              </td> 
     4193            </tr> 
     4194            <tr> 
     4195              <td class="level3"> 
     4196                <input type="checkbox" value="p" name="howItem" onclick="toggleAllowDenyFlag(this, this.form)"/> write properties 
     4197              </td> 
     4198              <td> 
     4199                <input type="radio" value="p" name="p" checked="checked" disabled="disabled"/> 
     4200              </td> 
     4201              <td> 
     4202                <input type="radio" value="-p" name="p" disabled="disabled"/> 
     4203              </td> 
     4204            </tr> 
     4205            <tr> 
     4206              <td class="level3"> 
     4207                <input type="checkbox" value="c" name="howItem" onclick="toggleAllowDenyFlag(this, this.form)"/> write content 
     4208              </td> 
     4209              <td> 
     4210                <input type="radio" value="c" name="c" checked="checked" disabled="disabled"/> 
     4211              </td> 
     4212              <td> 
     4213                <input type="radio" value="-c" name="c" disabled="disabled"/> 
     4214              </td> 
     4215            </tr> 
     4216            <tr> 
     4217              <td class="level3"> 
     4218                <input type="checkbox" value="b" name="howItem" onclick="setupAccessForm(this, this.form); toggleAllowDenyFlag(this, this.form)"/> create (bind) 
     4219              </td> 
     4220              <td> 
     4221                <input type="radio" value="b" name="b" checked="checked" disabled="disabled"/> 
     4222              </td> 
     4223              <td> 
     4224                <input type="radio" value="-b" name="b" disabled="disabled"/> 
     4225              </td> 
     4226            </tr> 
     4227            <tr> 
     4228              <td class="level4"> 
     4229                <input type="checkbox" value="S" name="howItem" onclick="setupAccessForm(this, this.form); toggleAllowDenyFlag(this, this.form)"/> schedule 
     4230              </td> 
     4231              <td> 
     4232                <input type="radio" value="S" name="S" checked="checked" disabled="disabled"/> 
     4233              </td> 
     4234              <td> 
     4235                <input type="radio" value="-S" name="S" disabled="disabled"/> 
     4236              </td> 
     4237              </tr> 
     4238              <tr> 
     4239                <td class="level5"> 
     4240                  <input type="checkbox" value="t" name="howItem" onclick="toggleAllowDenyFlag(this, this.form)"/> schedule request 
     4241                </td> 
     4242              <td> 
     4243                <input type="radio" value="t" name="t" checked="checked" disabled="disabled"/> 
     4244              </td> 
     4245              <td> 
     4246                <input type="radio" value="-t" name="t" disabled="disabled"/> 
     4247              </td> 
     4248              </tr> 
     4249              <tr> 
     4250                <td class="level5"> 
     4251                  <input type="checkbox" value="y" name="howItem" onclick="toggleAllowDenyFlag(this, this.form)"/> schedule reply 
     4252                </td> 
     4253              <td> 
     4254                <input type="radio" value="y" name="y" checked="checked" disabled="disabled"/> 
     4255              </td> 
     4256              <td> 
     4257                <input type="radio" value="-y" name="y" disabled="disabled"/> 
     4258              </td> 
     4259              </tr> 
     4260              <tr> 
     4261                <td class="level5"> 
     4262                  <input type="checkbox" value="s" name="howItem" onclick="toggleAllowDenyFlag(this, this.form)"/> schedule free-busy 
     4263                </td> 
     4264              <td> 
     4265                <input type="radio" value="s" name="s" checked="checked" disabled="disabled"/> 
     4266              </td> 
     4267              <td> 
     4268                <input type="radio" value="-s" name="s" disabled="disabled"/> 
     4269              </td> 
     4270            </tr> 
     4271            <tr> 
     4272              <td class="level3"> 
     4273                 <input type="checkbox" value="u" name="howItem" onclick="toggleAllowDenyFlag(this, this.form)"/> delete (unbind) 
     4274              </td> 
     4275              <td> 
     4276                <input type="radio" value="u" name="u" checked="checked" disabled="disabled"/> 
     4277              </td> 
     4278              <td> 
     4279                <input type="radio" value="-u" name="u" disabled="disabled"/> 
     4280              </td> 
     4281            </tr> 
     4282            <!--<tr> 
     4283              <td class="level1"> 
     4284                <input type="checkbox" value="N" name="howItem" onclick="setupAccessForm(this, this.form)"/> None 
     4285              </td> 
     4286              <td> 
     4287              </td> 
     4288              <td> 
     4289              </td> 
     4290            </tr>--> 
     4291          </table> 
     4292          <!-- Simple Access Rights: --> 
     4293          <!-- the "how" field is set by getting the selected basicHowItem --> 
     4294          <ul id="howList" class="invisible"> 
     4295            <xsl:if test="/bedework/appvar[key='accessRightsToggle']/value='basic'"> 
     4296              <xsl:attribute name="class">visible</xsl:attribute> 
     4297            </xsl:if> 
     4298            <li> 
     4299              <input type="radio" value="A" name="basicHowItem"/>All 
     4300            </li> 
     4301            <li> 
     4302              <input type="radio" value="R" name="basicHowItem" checked="checked"/>Read only 
     4303            </li> 
     4304          </ul> 
     4305 
     4306          <!-- below is a simplified listing using radio buttons only; keep for 
     4307               those who would like something inbetween the advanced and simple 
     4308               interfaces --> 
     4309          <!-- 
     4310          <ul id="howList"> 
     4311            <li><input type="radio" value="A" name="how"/> <strong>All</strong> (read, write, delete)</li> 
     4312            <li class="padTop"> 
     4313              <input type="radio" value="R" name="how" checked="checked"/> <strong>Read</strong> (content, access, freebusy) 
     4314            </li> 
     4315            <li> 
     4316              <input type="radio" value="F" name="how"/> Read freebusy only 
     4317            </li> 
     4318            <li class="padTop"> 
     4319              <input type="radio" value="W" name="how"/> <strong>Write and delete</strong> (content, access, properties) 
     4320            </li> 
     4321            <li> 
     4322              <input type="radio" value="c" name="how"/> Write content only 
     4323            </li> 
     4324            <li> 
     4325             <input type="radio" value="u" name="how"/> Delete only 
     4326            </li> 
     4327            <li class="padTop"> 
     4328              <input type="radio" value="Rc" name="how"/> <strong>Read</strong> and <strong>Write content only</strong> 
     4329            </li> 
     4330            <li class="padTop"> 
     4331              <input type="radio" value="N" name="how"/> <strong>None</strong> 
     4332            </li> 
     4333          </ul> --> 
     4334        </td> 
     4335      </tr> 
     4336    </table> 
     4337    <input type="submit" name="submit" value="Submit"/> 
     4338  </xsl:template> 
     4339 
     4340  <xsl:template match="acl" mode="currentAccess"> 
     4341    <xsl:param name="action"/> <!-- required --> 
     4342    <xsl:param name="calPathEncoded"/> <!-- optional (for entities) --> 
     4343    <xsl:param name="guid"/> <!-- optional (for entities) --> 
     4344    <xsl:param name="recurrenceId"/> <!-- optional (for entities) --> 
     4345    <xsl:param name="what"/> <!-- optional (for scheduling only) --> 
     4346    <xsl:param name="calSuiteName"/> <!-- optional (for calendar suites only) --> 
     4347    <h3>Current Access:</h3> 
     4348      <table class="common scheduling"> 
     4349        <tr> 
     4350          <th>Entry</th> 
     4351          <th>Access</th> 
     4352          <th>Inherited from</th> 
     4353          <td></td> 
     4354        </tr> 
     4355        <xsl:for-each select="ace"> 
     4356        <xsl:variable name="who"> 
     4357          <xsl:choose> 
     4358            <xsl:when test="invert"> 
     4359              <xsl:choose> 
     4360                <xsl:when test="invert/principal/href"><xsl:value-of select="normalize-space(invert/principal/href)"/></xsl:when> 
     4361                <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 
     4362                <xsl:otherwise><xsl:value-of select="name(invert/principal/*)"/></xsl:otherwise> 
     4363              </xsl:choose> 
     4364            </xsl:when> 
     4365            <xsl:otherwise> 
     4366              <xsl:choose> 
     4367                <xsl:when test="principal/href"><xsl:value-of select="normalize-space(principal/href)"/></xsl:when> 
     4368                <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
     4369                <xsl:otherwise><xsl:value-of select="name(principal/*)"/></xsl:otherwise> 
     4370              </xsl:choose> 
     4371            </xsl:otherwise> 
     4372          </xsl:choose> 
     4373        </xsl:variable> 
     4374        <xsl:variable name="whoType"> 
     4375          <xsl:choose> 
     4376            <xsl:when test="contains($who,/bedework/syspars/userPrincipalRoot)">user</xsl:when> 
     4377            <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)">group</xsl:when> 
     4378            <xsl:when test="$who='authenticated'">auth</xsl:when> 
     4379            <xsl:when test="$who='unauthenticated'">unauth</xsl:when> 
     4380            <xsl:when test="$who='all'">all</xsl:when> 
     4381            <xsl:when test="invert/principal/property/owner">other</xsl:when> 
     4382            <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
     4383            <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 
     4384            <xsl:otherwise></xsl:otherwise> 
     4385          </xsl:choose> 
     4386        </xsl:variable> 
     4387        <xsl:variable name="shortWho"> 
     4388          <xsl:choose> 
     4389            <xsl:when test="$whoType='user'"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/userPrincipalRoot)),'/')"/></xsl:when> 
     4390            <xsl:when test="$whoType='group'"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/groupPrincipalRoot)),'/')"/></xsl:when> 
     4391            <xsl:otherwise></xsl:otherwise> <!-- if not user or group, send no who --> 
     4392          </xsl:choose> 
     4393        </xsl:variable> 
     4394        <tr> 
     4395          <td> 
     4396            <xsl:choose> 
     4397              <xsl:when test="$whoType = 'user' or ($who = 'owner' and $whoType != 'other')"> 
     4398                <img src="{$resourcesRoot}/resources/userIcon.gif" width="13" height="13" border="0" alt="user"/> 
     4399              </xsl:when> 
     4400              <xsl:otherwise> 
     4401                <img src="{$resourcesRoot}/resources/groupIcon.gif" width="13" height="13" border="0" alt="group"/> 
     4402              </xsl:otherwise> 
     4403            </xsl:choose> 
     4404            <xsl:text> </xsl:text> 
     4405            <xsl:choose> 
     4406              <xsl:when test="$whoType = 'other'"> 
     4407                anyone (other) 
     4408              </xsl:when> 
     4409              <xsl:when test="$shortWho != ''"> 
     4410                <xsl:value-of select="$shortWho"/> 
     4411              </xsl:when> 
     4412              <xsl:otherwise> 
     4413                <xsl:value-of select="$who"/> 
     4414              </xsl:otherwise> 
     4415            </xsl:choose> 
     4416          </td> 
     4417          <td class="acls"> 
     4418            <xsl:if test="grant"> 
     4419              grant: 
     4420              <span class="grant"> 
     4421                <xsl:for-each select="grant/*"> 
     4422                  <xsl:value-of select="name(.)"/> 
     4423                  <xsl:if test="position() != last()">, </xsl:if> 
     4424                </xsl:for-each> 
     4425              </span><br/> 
     4426            </xsl:if> 
     4427            <xsl:if test="deny"> 
     4428              deny: 
     4429              <span class="deny"> 
     4430                <xsl:for-each select="deny/*"> 
     4431                  <xsl:value-of select="name(.)"/> 
     4432                  <xsl:if test="position() != last()">, </xsl:if> 
     4433                </xsl:for-each> 
     4434              </span> 
     4435            </xsl:if> 
     4436          </td> 
     4437          <td> 
     4438            <xsl:choose> 
     4439              <xsl:when test="inherited"> 
     4440                <xsl:value-of select="inherited/href"/> 
     4441              </xsl:when> 
     4442              <xsl:otherwise> 
     4443                local 
     4444              </xsl:otherwise> 
     4445            </xsl:choose> 
     4446          </td> 
     4447          <td> 
     4448            <xsl:if test="not(inherited)"> 
     4449              <a href="{$action}&amp;how=default&amp;what={$what}&amp;who={$shortWho}&amp;whoType={$whoType}&amp;calPath={$calPathEncoded}&amp;calSuiteName={$calSuiteName}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="reset to default"> 
     4450                <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="reset to default"/> 
     4451              </a> 
     4452            </xsl:if> 
     4453          </td> 
     4454        </tr> 
     4455      </xsl:for-each> 
     4456    </table> 
    30874457  </xsl:template> 
    30884458 
     
    31304500    </xsl:variable> 
    31314501    <li class="{$itemClass}"> 
     4502      <xsl:if test="calendarCollection='false'"> 
     4503        <!-- test the open state of the folder; if it's open, 
     4504             build a URL to close it and vice versa --> 
     4505        <xsl:choose> 
     4506          <xsl:when test="open = 'true'"> 
     4507            <a href="{$subscriptions-openCloseMod}&amp;calPath={$calPath}&amp;open=false"> 
     4508              <img src="{$resourcesRoot}/resources/minus.gif" width="9" height="9" alt="close" border="0" class="bwPlusMinusIcon"/> 
     4509            </a> 
     4510          </xsl:when> 
     4511          <xsl:otherwise> 
     4512            <a href="{$subscriptions-openCloseMod}&amp;calPath={$calPath}&amp;open=true"> 
     4513              <img src="{$resourcesRoot}/resources/plus.gif" width="9" height="9" alt="open" border="0" class="bwPlusMinusIcon"/> 
     4514            </a> 
     4515          </xsl:otherwise> 
     4516        </xsl:choose> 
     4517      </xsl:if> 
    31324518      <a href="{$subscriptions-initAdd}&amp;calPath={$calPath}"> 
    31334519        <xsl:value-of select="name"/> 
     
    31664552          <th>Display:</th> 
    31674553          <td> 
    3168             <input type="radio" value="true" name="subscription.display"/> yes 
    3169             <input type="radio" value="false" name="subscription.display" checked="checked"/> no 
     4554            <input type="radio" value="true" name="subscription.display" checked="checked"/> yes 
     4555            <input type="radio" value="false" name="subscription.display"/> no 
    31704556          </td> 
    31714557        </tr> 
     
    32094595            <input type="submit" name="addSubscription" value="Add Subscription"/> 
    32104596            <input type="submit" name="cancelled" value="Cancel"/> 
    3211             <input type="reset" value="Clear"/> 
    32124597          </td> 
    32134598        </tr> 
     
    33094694            <input type="submit" name="updateSubscription" value="Update Subscription"/> 
    33104695            <input type="submit" name="cancelled" value="Cancel"/> 
    3311             <input type="reset" value="Reset"/> 
    33124696          </td> 
    33134697          <td align="right"> 
     
    34104794  <xsl:template name="modView"> 
    34114795    <h2>Update View</h2> 
     4796 
     4797    <p class="note"> 
     4798      Note: In some configurations, changes made here will not show up in the calendar suite until 
     4799      the cache is flushed (approx. 5 minutes) or you start a new session (e.g. clear your cookies). 
     4800      Deleting a view on a production system should be followed by a server restart to clear the cache for all users. 
     4801    </p> 
     4802 
    34124803    <xsl:variable name="viewName" select="/bedework/views/view/name"/> 
    34134804    <h3 class="viewName"> 
     
    34214812          <table class="subscriptionsListSubs"> 
    34224813            <xsl:for-each select="/bedework/subscriptions/subscription"> 
    3423               <!--<xsl:sort select="name" order="ascending" case-order="upper-first"/>--
     4814              <xsl:sort select="name" order="ascending" case-order="upper-first"/
    34244815              <xsl:if test="not(/bedework/views/view/subscriptions/subscription/name=name)"> 
    34254816                <tr> 
     
    34444835          <table class="subscriptionsListView"> 
    34454836            <xsl:for-each select="/bedework/views/view/subscriptions/subscription"> 
    3446               <!--<xsl:sort select="name" order="ascending" case-order="upper-first"/>--
     4837              <xsl:sort select="name" order="ascending" case-order="upper-first"/
    34474838              <tr> 
    34484839                <td class="arrows"> 
     
    34834874 
    34844875    <xsl:variable name="viewName" select="/bedework/views/view/name"/> 
    3485     <p>The following view will be removed. Continue?</p> 
     4876    <p>The following view will be removed. <em>Be forewarned: if caching is 
     4877    enabled, removing views from a 
     4878    production system can cause the public interface to throw errors until the 
     4879    cache is flushed (a few minutes).</em> 
     4880    </p> 
     4881 
     4882    <p>Continue?</p> 
    34864883 
    34874884    <h3 class="viewName"> 
    34884885      <xsl:value-of select="$viewName"/> 
    34894886    </h3> 
    3490     <form name="removeView" action="{$view-remove}"
     4887    <form name="removeView" action="{$view-remove}" method="post"
    34914888      <input type="hidden" name="name" value="{$viewName}"/> 
    34924889      <input type="submit" name="delete" value="Yes: Remove View"/> 
     
    35244921          </td> 
    35254922        </tr> 
    3526         <!--<tr> 
     4923        <tr> 
    35274924          <td class="fieldname padMeTop"> 
    35284925            Effects free/busy: 
     
    35304927          <td align="left" class="padMeTop"> 
    35314928            <input type="radio" value="" name="transparency" checked="checked"/> accept event's settings<br/> 
    3532             <input type="radio" value="OPAQUE" name="transparency"/> yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
    3533             <input type="radio" value="TRANSPARENT" name="transparency"/> no <span class="note">(transparent: event status does not affect your free/busy)</span><br/> 
    3534           </td> 
    3535         </tr>--> 
     4929            <input type="radio" value="OPAQUE" name="transparency"/> yes <span class="note">(opaque: event status affects free/busy)</span><br/> 
     4930            <input type="radio" value="TRANSPARENT" name="transparency"/> no <span class="note">(transparent: event status does not affect free/busy)</span><br/> 
     4931          </td> 
     4932        </tr> 
    35364933        <tr> 
    35374934          <td class="fieldname padMeTop"> 
     
    35594956  <!--+++++++++++++++ System Parameters (preferences) ++++++++++++++++++++--> 
    35604957  <xsl:template name="modSyspars"> 
    3561     <h2>Modify System Preferences/Parameters</h2> 
     4958    <h2>Manage System Preferences/Parameters</h2> 
    35624959    <p> 
    35634960      Do not change unless you know what you're doing.<br/> 
     
    35974994          </td> 
    35984995        </tr> 
     4996        <!--<tr> 
     4997          <th>12 or 24 hour clock/time:</th> 
     4998          <td> 
     4999            <select name=""> 
     5000              <option value="-1">select preference...</option> 
     5001              <option value="true"> 
     5002                <xsl:if test="/bedework/system/NEEDPARAM = 'true'"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
     5003                Use 24 hour clock/time 
     5004              </option> 
     5005              <option value="false"> 
     5006                <xsl:if test="/bedework/system/NEEDPARAM = 'false'"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
     5007                Use 12 Hour clock/time + am/pm 
     5008              </option> 
     5009            </select> 
     5010            <div class="desc"> 
     5011              Affects the time fields when adding and editing events 
     5012            </div> 
     5013          </td> 
     5014        </tr>--> 
    35995015        <tr> 
    36005016          <th>System id:</th> 
     
    36045020            <div class="desc"> 
    36055021              System id used when building uids and identifying users. Should not be changed. 
    3606             </div> 
    3607           </td> 
    3608         </tr> 
    3609         <tr> 
    3610           <th>Principal Root:</th> 
    3611           <td> 
    3612             <xsl:variable name="proot" select="/bedework/system/principalRoot"/> 
    3613             <input value="{$proot}" name="principalRoot" size="0"/> 
    3614             <div class="desc"> 
    3615               Used in WebDAV and CalDAV access to define root of user and group principal trees. 
    3616             </div> 
    3617           </td> 
    3618         </tr> 
    3619         <tr> 
    3620           <th>User Principal Root:</th> 
    3621           <td> 
    3622             <xsl:variable name="uproot" select="/bedework/system/userPrincipalRoot"/> 
    3623             <input value="{$uproot}" name="userPrincipalRoot" size="0"/> 
    3624             <div class="desc"> 
    3625               Used in WebDAV and CalDAV access to define root of user principal subtree. 
    3626             </div> 
    3627           </td> 
    3628         </tr> 
    3629         <tr> 
    3630           <th>Group Principal Root:</th> 
    3631           <td> 
    3632             <xsl:variable name="gproot" select="/bedework/system/groupPrincipalRoot"/> 
    3633             <input value="{$gproot}" name="groupPrincipalRoot" size="0"/> 
    3634             <div class="desc"> 
    3635               Used in WebDAV and CalDAV access to define root of group principal subtree. 
    36365022            </div> 
    36375023          </td> 
     
    38745260        </tr> 
    38755261        <tr> 
    3876           <th>Locale list:</th> 
     5262          <th>Supported Locales:</th> 
    38775263          <td> 
    38785264            <xsl:variable name="localeList" select="/bedework/system/localeList"/> 
    38795265            <input value="{$localeList}" name="localeList" class="wide"/> 
    38805266            <div class="desc"> 
    3881               Comma separated list of supported locales 
     5267              List of supported locales. The format is rigid, comma separated list of 2 letter language, underscore, 2 letter country. No spaces. 
    38825268            </div> 
    38835269          </td> 
    38845270        </tr> 
    38855271        <tr> 
    3886           <th>Root users:</th> 
     5272          <th>Super Users:</th> 
    38875273          <td> 
    38885274            <xsl:variable name="rootUsers" select="/bedework/system/rootUsers"/> 
    38895275            <input value="{$rootUsers}" name="rootUsers" class="wide"/> 
    38905276            <div class="desc"> 
    3891               Comman separated list of super uses for the calendar system 
     5277              Comma separated list of super users. No spaces. 
    38925278            </div> 
    38935279          </td> 
     
    38995285            <input type="submit" name="updateSystemParams" value="Update"/> 
    39005286            <input type="submit" name="cancelled" value="Cancel"/> 
    3901             <input type="reset" value="Reset"/> 
    39025287          </td> 
    39035288        </tr> 
     
    39655350            <input type="submit" name="updateCalSuite" value="Add"/> 
    39665351            <input type="submit" name="cancelled" value="Cancel"/> 
    3967             <input type="reset" value="Reset"/> 
    39685352          </td> 
    39695353        </tr> 
     
    40125396            <input type="submit" name="updateCalSuite" value="Update"/> 
    40135397            <input type="submit" name="cancelled" value="Cancel"/> 
    4014             <input type="reset" value="Reset"/> 
     5398          </td> 
     5399          <td align="right"> 
     5400            <input type="submit" name="delete" value="Delete Calendar Suite"/> 
    40155401          </td> 
    40165402        </tr> 
    40175403      </table> 
    40185404    </form> 
     5405 
     5406    <div id="sharingBox"> 
     5407      <xsl:apply-templates select="acl" mode="currentAccess"> 
     5408        <xsl:with-param name="action" select="$calsuite-setAccess"/> 
     5409        <xsl:with-param name="calSuiteName" select="$calSuiteName"/> 
     5410      </xsl:apply-templates> 
     5411      <form name="calendarShareForm" action="{$calsuite-setAccess}" id="shareForm" onsubmit="setAccessHow(this)" method="post"> 
     5412        <input type="hidden" name="calSuiteName" value="{$calSuiteName}"/> 
     5413        <xsl:call-template name="entityAccessForm"> 
     5414          <xsl:with-param name="type"> 
     5415            <xsl:choose> 
     5416              <xsl:when test="calType = '5'">inbox</xsl:when> 
     5417              <xsl:when test="calType = '6'">outbox</xsl:when> 
     5418              <xsl:otherwise>normal</xsl:otherwise> 
     5419            </xsl:choose> 
     5420          </xsl:with-param> 
     5421        </xsl:call-template> 
     5422      </form> 
     5423    </div> 
     5424 
    40195425    <!--<div id="sharingBox"> 
    4020       <h3>Manage suite administrators</h3> 
    4021       <table class="common"> 
    4022         <tr> 
    4023           <th class="commonHeader" colspan="2">Current access:</th> 
    4024         </tr> 
    4025  
    4026         <xsl:for-each select="acl/ace"> 
    4027           <tr> 
    4028             <th class="thin"> 
    4029               <xsl:choose> 
    4030                 <xsl:when test="invert"> 
    4031                   <em>Deny to 
    4032                   <xsl:choose> 
    4033                     <xsl:when test="invert/principal/href"> 
    4034                       <xsl:value-of select="invert/principal/href"/> 
    4035                       </xsl:when> 
    4036                       <xsl:when test="invert/principal/property"> 
    4037                         <xsl:value-of select="name(invert/principal/property/*)"/> 
    4038                       </xsl:when> 
    4039                       <xsl:otherwise> 
    4040                         <xsl:value-of select="name(invert/principal/*)"/> 
    4041                       </xsl:otherwise> 
    4042                     </xsl:choose> 
    4043                   </em> 
    4044                 </xsl:when> 
    4045                 <xsl:otherwise> 
    4046                   <xsl:choose> 
    4047                     <xsl:when test="principal/href"> 
    4048                       <xsl:value-of select="principal/href"/> 
    4049                     </xsl:when> 
    4050                     <xsl:when test="principal/property"> 
    4051                       <xsl:value-of select="name(principal/property/*)"/> 
    4052                     </xsl:when> 
    4053                     <xsl:otherwise> 
    4054                       <xsl:value-of select="name(principal/*)"/> 
    4055                     </xsl:otherwise> 
    4056                   </xsl:choose> 
    4057                 </xsl:otherwise> 
    4058               </xsl:choose> 
    4059             </th> 
    4060             <td> 
    4061               <xsl:for-each select="grant/node()"> 
    4062                 <xsl:value-of select="name(.)"/>&#160;&#160; 
    4063               </xsl:for-each> 
    4064             </td> 
    4065           </tr> 
    4066         </xsl:for-each> 
    4067       </table> 
    4068       <form name="calsuiteShareForm" action="{$calsuite-setAccess}" id="shareForm" method="post"> 
    4069         <input type="hidden" name="calSuiteName" value="{$calSuiteName}"/> 
    4070         <input type="hidden" name="how" value="RW" /> 
    4071         <p> 
    4072           Add administrator:<br/> 
    4073           <input type="text" name="who" size="20"/> 
    4074           <input type="radio" value="user" name="whoType" checked="checked"/> user 
    4075           <input type="radio" value="group" name="whoType"/> group 
    4076         </p> 
    4077         <input type="submit" name="submit" value="Submit"/> 
    4078       </form> 
    4079     </div>--> 
    4080  
    4081     <div id="sharingBox"> 
    40825426      <xsl:variable name="calPath" select="path"/> 
    40835427      <xsl:variable name="encodedCalPath" select="encodedPath"/> 
     
    41635507                        <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)">group</xsl:when> 
    41645508                        <xsl:when test="$who='authenticated'">auth</xsl:when> 
     5509                        <xsl:when test="$who='unauthenticated'">unauth</xsl:when> 
    41655510                        <xsl:when test="invert/principal/property/owner">other</xsl:when> 
    41665511                        <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
     
    41735518                        <xsl:when test="contains($who,/bedework/syspars/userPrincipalRoot)"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/userPrincipalRoot)),'/')"/></xsl:when> 
    41745519                        <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/groupPrincipalRoot)),'/')"/></xsl:when> 
    4175                         <xsl:otherwise></xsl:otherwise> <!-- if not user or group, send no who --> 
     5520                        <xsl:otherwise></xsl:otherwise> 
    41765521                      </xsl:choose> 
    41775522                    </xsl:variable> 
     
    42195564                  <input type="radio" value="owner" name="whoType"/> owner 
    42205565                </p> 
    4221                 <!-- we may never use the invert action ...it is probably 
    4222                      too confusing, and can be achieved in other ways --> 
    4223                 <!-- 
    42245566                <p class="padTop"> 
    42255567                  <input type="checkbox" value="yes" name="notWho"/> invert (deny) 
    4226                 </p>--> 
     5568                </p> 
    42275569              </td> 
    42285570              <td> 
     
    42635605        </form> 
    42645606      </xsl:if> 
    4265     </div> 
     5607    </div>--> 
    42665608  </xsl:template> 
    42675609 
     
    43395681          </td> 
    43405682        </tr> 
     5683        <!-- 
    43415684        <tr> 
    43425685          <td class="fieldName"> 
     
    43575700          </td> 
    43585701        </tr> 
     5702        --> 
    43595703      </table> 
    43605704      <br /> 
    43615705 
    43625706      <input type="submit" name="modPrefs" value="Update"/> 
    4363       <input type="reset" value="Reset"/> 
    43645707      <input type="submit" name="cancelled" value="Cancel"/> 
    43655708    </form> 
     
    43685711  <!--+++++++++++++++ Timezones ++++++++++++++++++++--> 
    43695712  <xsl:template name="uploadTimezones"> 
    4370     <h2>Upload Timezones</h2> 
     5713    <h2>Manage Timezones</h2> 
     5714 
    43715715    <form name="peForm" method="post" action="{$timezones-upload}" enctype="multipart/form-data"> 
    43725716      <input type="file" name="uploadFile" size="40" value=""/> 
     
    43745718      <input type="submit" name="cancelled" value="Cancel"/> 
    43755719    </form> 
     5720 
     5721    <p> 
     5722      <a href="{$timezones-fix}">Fix Timezones</a> (recalculate UTC values)<br/> 
     5723      <span class="note">Run this to make sure no UTC values have changed due 
     5724      to this upload (e.g. DST changes).</span> 
     5725    </p> 
     5726 
    43765727  </xsl:template> 
    43775728 
     
    44865837 
    44875838      <input type="submit" name="modAuthUser" value="Update"/> 
    4488       <input type="reset" value="Reset"/> 
    44895839      <input type="submit" name="cancelled" value="Cancel"/> 
    44905840    </form> 
     
    45675917          </td> 
    45685918        </tr> 
     5919        <!-- 
    45695920        <tr> 
    45705921          <td class="fieldName"> 
     
    45855936          </td> 
    45865937        </tr> 
     5938        --> 
    45875939      </table> 
    45885940      <br /> 
    45895941 
    45905942      <input type="submit" name="modPrefs" value="Update"/> 
    4591       <input type="reset" value="Reset"/> 
    45925943      <input type="submit" name="cancelled" value="Cancel"/> 
    45935944    </form> 
     
    47326083          </td> 
    47336084          <td> 
    4734             <xsl:copy-of select="/bedework/formElements/form/eventsOwner/*"/> 
     6085           <xsl:choose> 
     6086              <xsl:when test="/bedework/creating = 'true'"> 
     6087                <xsl:copy-of select="/bedework/formElements/form/eventsOwner/*"/> 
     6088              </xsl:when> 
     6089              <xsl:otherwise> 
     6090                <xsl:value-of select="/bedework/formElements/form/eventsOwner/input/@value"/> 
     6091              </xsl:otherwise> 
     6092            </xsl:choose> 
    47356093          </td> 
    47366094        </tr> 
     
    47436101                <input type="submit" name="updateAdminGroup" value="Add Admin Group"/> 
    47446102                <input type="submit" name="cancelled" value="Cancel"/> 
    4745                 <input type="reset" value="Clear"/> 
    47466103              </xsl:when> 
    47476104              <xsl:otherwise> 
    47486105                <input type="submit" name="updateAdminGroup" value="Update Admin Group"/> 
    47496106                <input type="submit" name="cancelled" value="Cancel"/> 
    4750                 <input type="reset" value="Reset"/> 
    47516107              </xsl:otherwise> 
    47526108            </xsl:choose> 
    47536109          </td> 
    47546110          <td align="right"> 
    4755             <input type="submit" name="delete" value="Delete"/> 
     6111            <xsl:if test="/bedework/creating = 'false'"> 
     6112              <input type="submit" name="delete" value="Delete"/> 
     6113            </xsl:if> 
    47566114          </td> 
    47576115        </tr> 
     
    48576215  </xsl:template> 
    48586216 
     6217  <!--+++++++++++++++ Filters ++++++++++++++++++++--> 
     6218  <xsl:template name="addFilter"> 
     6219    <h2>Add a Named CalDAV Filter (<a href="http://bedework.org/trac/bedework/wiki/Bedework/DevDocs/Filters">examples</a>)</h2> 
     6220    <form name="peForm" method="post" action="{$filter-add}"> 
     6221      <table id="addFilterFormTable" class="eventFormTable"> 
     6222        <tr> 
     6223          <th> 
     6224            Name: 
     6225          </th> 
     6226          <td> 
     6227            <input type="text" name="name" value="" size="40"/> 
     6228          </td> 
     6229        </tr> 
     6230        <tr> 
     6231          <th> 
     6232            Description: 
     6233          </th> 
     6234          <td> 
     6235            <input type="text" name="desc" value="" size="40"/> 
     6236          </td> 
     6237        </tr> 
     6238        <tr> 
     6239          <th> 
     6240            Filter Definition: 
     6241          </th> 
     6242          <td> 
     6243            <textarea name="def" rows="30" cols="80"></textarea> 
     6244          </td> 
     6245        </tr> 
     6246        <tr> 
     6247          <td> 
     6248          </td> 
     6249          <td> 
     6250            <input type="submit" name="add" value="Add Filter"/> 
     6251            <input type="submit" name="cancelled" value="Cancel"/> 
     6252          </td> 
     6253        </tr> 
     6254      </table> 
     6255    </form> 
     6256    <xsl:if test="/bedework/filters/filter"> 
     6257      <h2>Current Filters</h2> 
     6258      <table id="filterTable"> 
     6259        <tr> 
     6260          <th>Filter Name</th> 
     6261          <th>Description/Definition</th> 
     6262          <th>Delete</th> 
     6263        </tr> 
     6264        <xsl:for-each select="/bedework/filters/filter"> 
     6265          <xsl:variable name="filterName" select="name"/> 
     6266          <tr> 
     6267            <td><xsl:value-of select="$filterName"/></td> 
     6268            <td> 
     6269              <xsl:if test="description != ''"><xsl:value-of select="description"/><br/></xsl:if> 
     6270              <a href="javascript:toggleVisibility('bwfilter-{$filterName}','filterdef')"> 
     6271                show/hide filter definition 
     6272              </a> 
     6273              <div id="bwfilter-{$filterName}" class="invisible"> 
     6274                <xsl:value-of select="definition"/> 
     6275              </div> 
     6276            </td> 
     6277            <td> 
     6278              <a href="{$filter-delete}&amp;name={$filterName}" title="delete filter"> 
     6279                <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete filter"/> 
     6280              </a> 
     6281            </td> 
     6282          </tr> 
     6283        </xsl:for-each> 
     6284      </table> 
     6285    </xsl:if> 
     6286  </xsl:template> 
     6287 
    48596288  <!--+++++++++++++++ System Stats ++++++++++++++++++++--> 
    48606289 
     
    50636492  </xsl:template> 
    50646493 
    5065   <!--==== HEADER TEMPLATES and NAVIGATION  ====--> 
    5066  
    5067   <xsl:template name="header"> 
    5068     <div id="header"> 
    5069       <a href="{$urlPrefix}"> 
    5070         <img id="logo" 
    5071             alt="logo" 
    5072             src="{$resourcesRoot}/resources/bedeworkLogo.gif" 
    5073             width="217" 
    5074             height="40" 
    5075             border="0"/> 
    5076       </a> 
    5077       <!-- set the page heading: --> 
    5078       <h1> 
    5079         <xsl:choose> 
    5080           <xsl:when test="/bedework/page='modEvent' or /bedework/page='eventList' or /bedework/page='displayEvent'"> 
    5081             Manage Events 
    5082           </xsl:when> 
    5083           <xsl:when test="/bedework/page='contactList' or /bedework/page='modContact' or /bedework/page='deleteContactConfirm'"> 
    5084             Manage Contacts 
    5085           </xsl:when> 
    5086           <xsl:when test="/bedework/page='locationList' or /bedework/page='modLocation' or /bedework/page='deleteLocationConfirm'"> 
    5087             Manage Locations 
    5088           </xsl:when> 
    5089           <xsl:when test="/bedework/page='calendarList' or /bedework/page='modCalendar' or /bedework/page='calendarReferenced' or /bedework/page='deleteCalendarConfirm'"> 
    5090             Manage Calendars 
    5091           </xsl:when> 
    5092           <xsl:when test="/bedework/page='calendarDescriptions' or /bedework/page='displayCalendar'"> 
    5093             Public Calendars 
    5094           </xsl:when> 
    5095           <xsl:when test="/bedework/page='subscriptions' or /bedework/page='modSubscription'"> 
    5096             Manage Subscriptions 
    5097           </xsl:when> 
    5098           <xsl:when test="/bedework/page='views' or /bedework/page='modView'"> 
    5099             Manage Views 
    5100           </xsl:when> 
    5101           <xsl:when test="/bedework/page='modSyspars'"> 
    5102             Manage System Preferences 
    5103           </xsl:when> 
    5104           <xsl:when test="/bedework/page='authUserList' or /bedework/page='modAuthUser'"> 
    5105             Manage Public Events Administrators 
    5106           </xsl:when> 
    5107           <xsl:when test="/bedework/page='chooseGroup'"> 
    5108             Choose Administrative Group 
    5109           </xsl:when> 
    5110           <xsl:when test="/bedework/page='adminGroupList' or /bedework/page='modAdminGroup' or /bedework/page='modAdminGroup' or /bedework/page='modAdminGroupMembers'"> 
    5111             Manage Administrative Groups 
    5112           </xsl:when> 
    5113           <xsl:when test="/bedework/page='noGroup'"> 
    5114             No Administrative Group 
    5115           </xsl:when> 
    5116           <xsl:when test="/bedework/page='uploadTimezones'"> 
    5117             Manage Time Zones 
    5118           </xsl:when> 
    5119           <xsl:when test="/bedework/page='noAccess'"> 
    5120             Access Denied 
    5121           </xsl:when> 
    5122           <xsl:when test="/bedework/page='error'"> 
    5123             Error 
    5124           </xsl:when> 
    5125           <xsl:otherwise> 
    5126             Bedework Calendar Administration 
    5127           </xsl:otherwise> 
    5128         </xsl:choose> 
    5129       </h1> 
    5130  
    5131       <xsl:if test="/bedework/message"> 
    5132         <div id="messages"> 
    5133           <p> 
    5134             <xsl:apply-templates select="/bedework/message"/> 
    5135           </p> 
    5136         </div> 
    5137       </xsl:if> 
    5138       <xsl:if test="/bedework/error"> 
    5139         <div id="errors"> 
    5140           <p> 
    5141             <xsl:apply-templates select="/bedework/error"/> 
    5142           </p> 
    5143         </div> 
    5144       </xsl:if> 
    5145  
    5146     </div> 
    5147     <table id="statusBarTable"> 
    5148       <tr> 
    5149         <td class="leftCell"> 
    5150           <a href="{$setup}">Main Menu</a> | 
    5151           <a href="{$publicCal}" target="calendar">Launch Calendar</a> | 
    5152           <a href="{$logout}">Log Out</a> 
    5153         </td> 
    5154         <xsl:if test="/bedework/userInfo/user"> 
    5155           <td class="rightCell"> 
    5156             <xsl:if test="/bedework/currentCalSuite/name"> 
    5157               Calendar Suite: 
    5158               <span class="status"> 
    5159                 <xsl:value-of select="/bedework/currentCalSuite/name"/> 
    5160               </span> 
    5161               &#160; 
    5162             </xsl:if> 
    5163             Logged in as: 
    5164             <span class="status"> 
    5165               <xsl:value-of select="/bedework/userInfo/user"/> 
    5166             </span> 
    5167             &#160; 
    5168             <xsl:if test="/bedework/userInfo/group"> 
    5169               Group: 
    5170               <span class="status"> 
    5171                 <xsl:value-of select="/bedework/userInfo/group"/> 
    5172               </span> 
    5173             </xsl:if> 
    5174           </td> 
    5175         </xsl:if> 
    5176       </tr> 
    5177     </table> 
    5178     <div id="titleBar"> 
    5179       CALENDAR of EVENTS 
    5180     </div> 
    5181   </xsl:template> 
    5182  
    51836494  <!--==== FOOTER ====--> 
    51846495  <xsl:template name="footer"> 
     
    51906501    </div> 
    51916502  </xsl:template> 
     6503 
    51926504</xsl:stylesheet> 
  • trunk/deployment/webadmin/webapp/resources/default/default/default.xsl

    r1977 r1979  
    4343  <xsl:include href="../../../bedework-common/default/default/errors.xsl"/> 
    4444  <xsl:include href="../../../bedework-common/default/default/messages.xsl"/> 
     45  <xsl:include href="../../../bedework-common/default/default/util.xsl"/> 
    4546 
    4647  <!-- DEFINE GLOBAL CONSTANTS --> 
     
    65016502  </xsl:template> 
    65026503 
    6503   <!--==== Utility Templates ====--> 
    6504   <xsl:template name="escapeApos"> 
    6505     <xsl:param name="str"/> 
    6506     <xsl:variable name="apos" select='"&apos;"'/> 
    6507     <xsl:choose> 
    6508       <xsl:when test="contains($str, $apos)"> 
    6509          <xsl:value-of select="substring-before($str, $apos)" /> 
    6510          <xsl:text>\'</xsl:text> 
    6511          <xsl:call-template name="escapeApos"> 
    6512             <xsl:with-param name="str" select="substring-after($str, $apos)" /> 
    6513          </xsl:call-template> 
    6514       </xsl:when> 
    6515       <xsl:otherwise> 
    6516          <xsl:value-of select="$str" /> 
    6517       </xsl:otherwise> 
    6518     </xsl:choose> 
    6519   </xsl:template> 
    6520  
    65216504</xsl:stylesheet> 
  • trunk/deployment/websubmit/webapp/resources/demoskins/default/default/default.xsl

    r1967 r1979  
    4242  <xsl:include href="../../../bedework-common/default/default/errors.xsl"/> 
    4343  <xsl:include href="../../../bedework-common/default/default/messages.xsl"/> 
     44  <xsl:include href="../../../bedework-common/default/default/util.xsl"/> 
    4445 
    4546  <!-- DEFINE GLOBAL CONSTANTS --> 
     
    15691570  </xsl:template> 
    15701571 
    1571   <!--==== Utility Templates ====--> 
    1572  
    1573   <xsl:template name="escapeApos"> 
    1574     <xsl:param name="str"/> 
    1575     <xsl:variable name="apos" select='"&apos;"'/> 
    1576     <xsl:choose> 
    1577       <xsl:when test="contains($str, $apos)"> 
    1578          <xsl:value-of select="substring-before($str, $apos)" /> 
    1579          <xsl:text>\'</xsl:text> 
    1580          <xsl:call-template name="escapeApos"> 
    1581             <xsl:with-param name="str" select="substring-after($str, $apos)" /> 
    1582          </xsl:call-template> 
    1583       </xsl:when> 
    1584       <xsl:otherwise> 
    1585          <xsl:value-of select="$str" /> 
    1586       </xsl:otherwise> 
    1587     </xsl:choose> 
    1588   </xsl:template> 
    1589  
    1590   <!-- search and replace template taken from 
    1591      http://www.biglist.com/lists/xsl-list/archives/200211/msg00337.html --> 
    1592   <xsl:template name="replace"> 
    1593     <xsl:param name="string" select="''"/> 
    1594     <xsl:param name="pattern" select="''"/> 
    1595     <xsl:param name="replacement" select="''"/> 
    1596     <xsl:choose> 
    1597       <xsl:when test="$pattern != '' and $string != '' and contains($string, $pattern)"> 
    1598         <xsl:value-of select="substring-before($string, $pattern)"/> 
    1599         <xsl:copy-of select="$replacement"/> 
    1600         <xsl:call-template name="replace"> 
    1601           <xsl:with-param name="string" select="substring-after($string, $pattern)"/> 
    1602           <xsl:with-param name="pattern" select="$pattern"/> 
    1603           <xsl:with-param name="replacement" select="$replacement"/> 
    1604         </xsl:call-template> 
    1605       </xsl:when> 
    1606       <xsl:otherwise> 
    1607         <xsl:value-of select="$string"/> 
    1608       </xsl:otherwise> 
    1609     </xsl:choose> 
    1610   </xsl:template> 
    16111572</xsl:stylesheet> 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.css

    r1975 r1979  
    5353  font-size: 0.8em; 
    5454} 
    55 #bedework div.eventSubmitButtons { 
     55#bedework div.eventSubmitButtons, 
     56#bedework div.submitButtons { 
    5657  clear: both; 
    5758  text-align: right; 
     
    18971898  background-color: #eee; 
    18981899} 
     1900#bedework #subscriptionTypes { 
     1901  font-size: 0.9em; 
     1902} 
    18991903/*   LINKS    */ 
    19001904#bedework a:link, 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r1978 r1979  
    45264526      <a href="javascript:changeClass('calSelectWidget','invisible')" id="calSelectWidgetCloser" title="close">x</a> 
    45274527      <ul class="calendarTree"> 
    4528         <xsl:apply-templates select="/bedework/calendars/calendar/calendar[canAlias='true']" mode="selectCalForPublicAliasCalTree"/> 
     4528        <xsl:apply-templates select="/bedework/publicCalendars/calendar" mode="selectCalForPublicAliasCalTree"/> 
    45294529      </ul> 
    45304530      <!-- Uncomment the following to use a three column format 
     
    45504550      <xsl:attribute name="class"> 
    45514551        <xsl:choose> 
    4552           <xsl:when test="/bedework/selectionState/selectionType = 'calendar' 
    4553                           and name = /bedework/selectionState/subscriptions/subscription/calendar/name">selected</xsl:when> 
    45544552          <xsl:when test="name='Trash'">trash</xsl:when> 
    45554553          <xsl:when test="calendarCollection='false'">folder</xsl:when> 
     
    45604558      <xsl:variable name="calDisplay" select="path"/> 
    45614559      <xsl:variable name="calendarCollection" select="calendarCollection"/> 
    4562       <a href="javascript:updateEventFormCalendar('{$calPath}','{$calDisplay}','{$calendarCollection}')"> 
    4563         <strong><xsl:value-of select="name"/></strong> 
    4564       </a> 
     4560      <xsl:choose> 
     4561        <xsl:when test="canAlias = 'true'"> 
     4562          <a href="javascript:updatePublicCalendarAlias('{$calPath}','{$calDisplay}','{$calendarCollection}')"> 
     4563            <xsl:value-of select="name"/> 
     4564          </a> 
     4565        </xsl:when> 
     4566        <xsl:otherwise> 
     4567          <xsl:value-of select="name"/> 
     4568        </xsl:otherwise> 
     4569      </xsl:choose> 
    45654570      <xsl:if test="calendar"> 
    45664571        <ul> 
     
    45724577 
    45734578  <xsl:template match="currentCalendar" mode="addCalendar"> 
    4574     <h3>Add Calendar / Folder</h3> 
    4575     <form name="addCalForm" method="post" action="{$calendar-update}"
     4579    <h3>Add Calendar, Folder, or Subscription</h3> 
     4580    <form name="addCalForm" method="post" action="{$calendar-update}" onsubmit="setCalendarAlias(this)"
    45764581      <table class="common"> 
    45774582        <tr> 
     
    46034608        </tr> 
    46044609        <tr> 
    4605           <th>Calendar/Folder:</th> 
     4610          <th>Type:</th> 
    46064611          <td> 
    4607             <input type="radio" value="true" name="calendarCollection" checked="checked"/> Calendar 
    4608             <input type="radio" value="false" name="calendarCollection"/> Folder 
    4609           </td> 
    4610         </tr> 
    4611         <tr> 
    4612           <th>URL: (for external subscriptions only)</th> 
    4613           <td> 
    4614             <input name="aliasUri" value="" size="40"/> 
    4615           </td> 
    4616         </tr> 
    4617         <tr> 
    4618           <th>Id: (for external subscriptions only)</th> 
    4619           <td> 
    4620             <input name="remoteId" value="" size="40"/> 
    4621           </td> 
    4622         </tr> 
    4623         <tr> 
    4624           <th>Password: (for external subscriptions only)</th> 
    4625           <td> 
    4626             <input type="password" name="remotePw" value="" size="40"/> 
     4612            <!-- we will set the value of "calendarCollection on submit. 
     4613                 Value is false only for folders, so we default it to true here.  --> 
     4614            <input type="hidden" value="true" name="calendarCollection"/> 
     4615            <input type="hidden" value="" name="type" id="bwCalType"/> 
     4616            <input type="radio" value="calendar" name="typeSwitch" checked="checked" onclick="changeClass('subscriptionTypes','invisible');setField('bwCalType',this.value);"/> Calendar 
     4617            <input type="radio" value="folder" name="typeSwitch" onclick="changeClass('subscriptionTypes','invisible');setField('bwCalType',this.value);"/> Folder 
     4618            <input type="radio" value="subscription" name="typeSwitch" onclick="changeClass('subscriptionTypes','visible');setField('bwCalType',this.value);"/> Subscription 
    46274619          </td> 
    46284620        </tr> 
    46294621      </table> 
    4630  
    4631       <table border="0" id="submitTable"> 
    4632         <tr> 
    4633           <td> 
    4634             <input type="submit" name="addCalendar" value="Add Calendar/Folder"/> 
    4635             <input type="submit" name="cancelled" value="cancel"/> 
    4636           </td> 
    4637         </tr> 
    4638       </table> 
     4622      <div id="subscriptionTypes" class="invisible"> 
     4623        <!-- If we are making a subscription, we will set the hidden value of "aliasUri" based 
     4624             on the subscription type. --> 
     4625        <input type="hidden" name="aliasUri" value=""/> 
     4626        <p> 
     4627          <strong>Subscription Type:</strong><br/> 
     4628          <input type="hidden" value="" name="subType" id="bwSubType"/> 
     4629          <input type="radio" name="subTypeSwitch" value="public" checked="checked" onclick="changeClass('subscriptionTypePublic','visible');changeClass('subscriptionTypeExternal','invisible');changeClass('subscriptionTypeUser','invisible');setField('bwSubType',this.value);"/> Public calendar 
     4630          <input type="radio" name="subTypeSwitch" value="user" onclick="changeClass('subscriptionTypePublic','invisible');changeClass('subscriptionTypeExternal','invisible');changeClass('subscriptionTypeUser','visible');setField('bwSubType',this.value);"/> User calendar 
     4631          <input type="radio" name="subTypeSwitch" value="external" onclick="changeClass('subscriptionTypePublic','invisible');changeClass('subscriptionTypeExternal','visible');changeClass('subscriptionTypeUser','invisible');setField('bwSubType',this.value);"/> External / URL 
     4632        </p> 
     4633 
     4634        <div id="subscriptionTypePublic"> 
     4635          <input type="hidden" value="" name="publicAliasHolder" id="publicAliasHolder"/> 
     4636          <div id="bwPublicCalDisplay"> 
     4637            Select the public calendar or folder: 
     4638          </div> 
     4639          <ul id="publicSubscriptionTree"> 
     4640            <xsl:apply-templates select="/bedework/publicCalendars/calendar" mode="selectCalForPublicAliasCalTree"/> 
     4641          </ul> 
     4642        </div> 
     4643 
     4644        <div id="subscriptionTypeUser" class="invisible"> 
     4645          <table class="common"> 
     4646            <tr> 
     4647              <th>User's ID:</th> 
     4648              <td> 
     4649                <input type="text" name="userIdHolder" value="" size="40"/> 
     4650              </td> 
     4651            </tr> 
     4652            <tr> 
     4653              <th>Calendar Path:</th> 
     4654              <td> 
     4655                <input type="text" name="userCalHolder" value="calendar" size="40"/><br/> 
     4656                <span class="note">E.g. "calendar" (default) or "someFolder/someCalendar"</span> 
     4657              </td> 
     4658            </tr> 
     4659          </table> 
     4660        </div> 
     4661 
     4662 
     4663        <div class="invisible" id="subscriptionTypeExternal"> 
     4664          <table class="common"> 
     4665            <tr> 
     4666              <th>URL to external calendar:</th> 
     4667              <td> 
     4668                <input type="text" name="aliasUriHolder" id="aliasUriHolder" value="" size="40"/> 
     4669              </td> 
     4670            </tr> 
     4671            <tr> 
     4672              <th>ID (if required):</th> 
     4673              <td> 
     4674                <input type="text" name="remoteId" value="" size="40"/> 
     4675              </td> 
     4676            </tr> 
     4677            <tr> 
     4678              <th>Password (if required):</th> 
     4679              <td> 
     4680                <input type="password" name="remotePw" value="" size="40"/> 
     4681              </td> 
     4682            </tr> 
     4683          </table> 
     4684        </div> 
     4685      </div> 
     4686 
     4687      <div class="submitButtons"> 
     4688        <input type="submit" name="addCalendar" value="Add"/> 
     4689        <input type="submit" name="cancelled" value="cancel"/> 
     4690      </div> 
    46394691    </form> 
    46404692 
  • trunk/deployment/webuser/webapp/resources/demoskins/resources/bedework.js

    r1959 r1979  
    3434  } 
    3535  identity.className=newClass; 
     36} 
     37// set a field's value by ID 
     38// typically used to set the value of a hidden field 
     39function setField(id,val) { 
     40  field = document.getElementById(id); 
     41  field.value = val; 
    3642} 
    3743 
     
    177183  changeClass("calSelectWidget","invisible"); 
    178184} 
     185// used to update a calendar subscription (alias) We must do two things: update the hidden 
     186// calendar input field and update the displayed text 
     187function updatePublicCalendarAlias(newCalPath,calDisplay,calendarCollection) { 
     188  calendarAliasHolder = document.getElementById("publicAliasHolder"); 
     189  calendarAliasHolder.value = "bwcal://" + newCalPath; 
     190  bwCalDisplay = document.getElementById("bwPublicCalDisplay"); 
     191  bwCalDisplay.innerHTML = "Selected calendar: <strong>" + calDisplay + "</strong>"; 
     192} 
     193// set the subscription URI when creating or updating a subscription 
     194function setCalendarAlias(formObj) { 
     195  // set the aliasUri to an empty string.  Only set it if user 
     196  // has requested a subscription. 
     197  formObj.aliasUri.value == ""; 
     198  if (formObj.type.value == "folder") { 
     199    formObj.calendarCollection.value = "false"; 
     200  } else if (formObj.type.value == "subscription") { 
     201    switch (formObj.subType.value) { 
     202      case "public": 
     203        formObj.aliasUri.value = formObj.publicAliasHolder.value; 
     204        break; 
     205      case "user": 
     206        //the "/user/" string is temporary; it needs to be passed as a param. 
     207        formObj.aliasUri.value = "bwcal:///user/" + formObj.userIdHolder.value + "/" + formObj.userCalHolder.value; 
     208        break; 
     209      case "external": 
     210        formObj.aliasUri.value = formObj.aliasUriHolder.value; 
     211        break; 
     212    } 
     213  } 
     214} 
    179215// build a uri based on user and path in the subscription form 
    180216function setBwSubscriptionUri(formObj, publicUri) {