Changeset 3592

Show
Ignore:
Timestamp:
07/24/12 10:16:39
Author:
johnsa
Message:

web admin: add labels to add/edit event form for improved ux

Files:

Legend:

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

    r3591 r3592  
    15821582              </xsl:choose> 
    15831583            </xsl:variable> 
    1584             <xsl:choose> 
    1585               <xsl:when test="form/allDay/input/@checked='checked'"
    1586                 <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/
    1587                 <input type="hidden" name="eventStartDate.dateOnly" value="on" id="allDayStartDateField"/
    1588                 <input type="hidden" name="eventEndDate.dateOnly" value="on" id="allDayEndDateField"/
    1589               </xsl:when
    1590               <xsl:otherwise
    1591                 <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/
    1592                 <input type="hidden" name="eventStartDate.dateOnly" value="off" id="allDayStartDateField"/> 
    1593                 <input type="hidden" name="eventEndDate.dateOnly" value="off" id="allDayEndDateField"/> 
    1594               </xsl:otherwise
    1595             </xsl:choose
    1596             <xsl:copy-of select="$bwStr-AEEF-AllDay"/
     1584             
     1585            <!-- All day flag --
     1586            <input type="checkbox" name="allDayFlag" id="allDayFlag" onclick="swapAllDayEvent(this)" value="off"
     1587              <xsl:if test="form/allDay/input/@checked='checked'"
     1588                <xsl:attribute name="checked">checked</xsl:attribute
     1589                <xsl:attribute name="value">on</xsl:attribute
     1590              </xsl:if
     1591            </input
     1592            <input type="hidden" name="eventStartDate.dateOnly" value="on" id="allDayStartDateField"/> 
     1593            <input type="hidden" name="eventEndDate.dateOnly" value="on" id="allDayEndDateField"/> 
     1594            <label for="allDayFlag"
     1595              <xsl:copy-of select="$bwStr-AEEF-AllDay"/
     1596            </label
    15971597 
    15981598            <!-- floating event: no timezone (and not UTC) --> 
     
    16001600                 (e.g. from import); to restore this field, remove the if  --> 
    16011601            <xsl:if test="form/floating/input/@checked='checked'"> 
    1602               <xsl:choose> 
    1603                 <xsl:when test="form/floating/input/@checked='checked'"> 
    1604                   <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="on" checked="checked"/> 
    1605                   <input type="hidden" name="eventStartDate.floating" value="on" id="startFloating"/> 
    1606                   <input type="hidden" name="eventEndDate.floating" value="on" id="endFloating"/> 
    1607                 </xsl:when> 
    1608                 <xsl:otherwise> 
    1609                   <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="off"/> 
    1610                   <input type="hidden" name="eventStartDate.floating" value="off" id="startFloating"/> 
    1611                   <input type="hidden" name="eventEndDate.floating" value="off" id="endFloating"/> 
    1612                 </xsl:otherwise> 
    1613               </xsl:choose> 
    1614               <xsl:copy-of select="$bwStr-AEEF-Floating"/> 
     1602              <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="off"> 
     1603                      <xsl:if test="form/floating/input/@checked='checked'"> 
     1604                        <xsl:attribute name="checked">checked</xsl:attribute> 
     1605                        <xsl:attribute name="value">on</xsl:attribute> 
     1606                      </xsl:if> 
     1607              </input> 
     1608              <input type="hidden" name="eventStartDate.floating" value="off" id="startFloating"/> 
     1609              <input type="hidden" name="eventEndDate.floating" value="off" id="endFloating"/> 
     1610              <label for="floatingFlag"> 
     1611                <xsl:copy-of select="$bwStr-AEEF-Floating"/> 
     1612              </label> 
    16151613            </xsl:if> 
    16161614 
     
    16201618                 to restore this field, remove the if --> 
    16211619            <xsl:if test="form/storeUTC/input/@checked='checked'"> 
    1622               <xsl:choose> 
    1623                 <xsl:when test="form/storeUTC/input/@checked='checked'"> 
    1624                   <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="on" checked="checked"/> 
    1625                   <input type="hidden" name="eventStartDate.storeUTC" value="on" id="startStoreUTC"/> 
    1626                   <input type="hidden" name="eventEndDate.storeUTC" value="on" id="endStoreUTC"/> 
    1627                 </xsl:when> 
    1628                 <xsl:otherwise> 
    1629                   <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="off"/> 
    1630                   <input type="hidden" name="eventStartDate.storeUTC" value="off" id="startStoreUTC"/> 
    1631                   <input type="hidden" name="eventEndDate.storeUTC" value="off" id="endStoreUTC"/> 
    1632                 </xsl:otherwise> 
    1633               </xsl:choose> 
     1620              <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="off"> 
     1621                <xsl:if test="form/storeUTC/input/@checked='checked'"> 
     1622                  <xsl:attribute name="checked">checked</xsl:attribute> 
     1623                  <xsl:attribute name="value">on</xsl:attribute> 
     1624                </xsl:if> 
     1625              </input> 
     1626              <input type="hidden" name="eventStartDate.storeUTC" value="off" id="startStoreUTC"/> 
     1627              <input type="hidden" name="eventEndDate.storeUTC" value="off" id="endStoreUTC"/> 
    16341628              <xsl:copy-of select="$bwStr-AEEF-StoreAsUTC"/> 
    16351629            </xsl:if> 
     
    17211715                </xsl:otherwise> 
    17221716              </xsl:choose> 
    1723               <xsl:copy-of select="$bwStr-AEEF-Date"/> 
     1717              <label for="bwEndDateTimeButton"> 
     1718                <xsl:copy-of select="$bwStr-AEEF-Date"/> 
     1719              </label> 
    17241720              <xsl:variable name="endDateTimeClass"> 
    17251721                <xsl:choose> 
     
    18081804                <xsl:choose> 
    18091805                  <xsl:when test="form/end/type='D'"> 
    1810                     <input type="radio" name="eventEndType" value="D" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
     1806                    <input type="radio" name="eventEndType" id="bwEndDurationButton" value="D" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    18111807                  </xsl:when> 
    18121808                  <xsl:otherwise> 
    1813                     <input type="radio" name="eventEndType" value="D" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
     1809                    <input type="radio" name="eventEndType" id="bwEndDurationButton" value="D" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    18141810                  </xsl:otherwise> 
    18151811                </xsl:choose> 
    1816                 <xsl:copy-of select="$bwStr-AEEF-Duration"/> 
     1812                <label for="bwEndDurationButton"> 
     1813                  <xsl:copy-of select="$bwStr-AEEF-Duration"/> 
     1814                </label> 
    18171815                <xsl:variable name="endDurationClass"> 
    18181816                  <xsl:choose> 
     
    18821880                <xsl:choose> 
    18831881                  <xsl:when test="form/end/type='N'"> 
    1884                     <input type="radio" name="eventEndType" value="N" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
     1882                    <input type="radio" name="eventEndType" id="bwEndNoneButton" value="N" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    18851883                  </xsl:when> 
    18861884                  <xsl:otherwise> 
    1887                     <input type="radio" name="eventEndType" value="N" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
     1885                    <input type="radio" name="eventEndType" id="bwEndNoneButton" value="N" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    18881886                  </xsl:otherwise> 
    18891887                </xsl:choose> 
    1890                 <xsl:copy-of select="$bwStr-AEEF-ThisEventHasNoDurationEndDate"/> 
     1888                <label for="bwEndNoneButton"> 
     1889                  <xsl:copy-of select="$bwStr-AEEF-ThisEventHasNoDurationEndDate"/> 
     1890                </label> 
    18911891              </div> 
    18921892            </div> 
     
    19491949                                  <xsl:if test="$canEdit = 'false'"><xsl:attribute name="class">invisible</xsl:attribute></xsl:if> 
    19501950                                  <!-- set or remove "recurring" and show or hide all recurrence fields: --> 
    1951                                   <input type="radio" name="recurring" value="true" onclick="swapRecurrence(this)"> 
     1951                                  <input type="radio" name="recurring" id="bwRecurringOnButton" value="true" onclick="swapRecurrence(this)"> 
    19521952                                    <xsl:if test="form/recurringEntity = 'true'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    1953                                   </input><xsl:text> </xsl:text><xsl:copy-of select="$bwStr-AEEF-EventRecurs"/> 
    1954                                   <input type="radio" name="recurring" value="false" onclick="swapRecurrence(this)"> 
     1953                                  </input> 
     1954                                  <label for="bwRecurringOnButton"> 
     1955                                    <xsl:copy-of select="$bwStr-AEEF-EventRecurs"/> 
     1956                                  </label> 
     1957                                  <input type="radio" name="recurring" id="bwRecurringOffButton" value="false" onclick="swapRecurrence(this)"> 
    19551958                                    <xsl:if test="form/recurringEntity = 'false'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    1956                                   </input><xsl:text> </xsl:text><xsl:copy-of select="$bwStr-AEEF-EventDoesNotRecur"/> 
     1959                                  </input> 
     1960                                  <label for="bwRecurringOffButton"> 
     1961                                    <xsl:copy-of select="$bwStr-AEEF-EventDoesNotRecur"/> 
     1962                                  </label> 
    19571963                                </div> 
    19581964                              </xsl:when> 
     
    19851991                      <xsl:attribute name="class">invisible</xsl:attribute> 
    19861992                    </xsl:if> 
    1987                     <input type="checkbox" name="rrulesUiSwitch" value="advanced" onchange="swapVisible(this,'advancedRrules')"/> 
    1988                     <xsl:copy-of select="$bwStr-AEEF-ShowAdvancedRecurrenceRules"/> 
     1993                    <input type="checkbox" name="rrulesUiSwitch" id="bwRrulesAdvancedButton" value="advanced" onchange="swapVisible(this,'advancedRrules')"/> 
     1994                    <label for="bwRrulesAdvancedButton"> 
     1995                      <xsl:copy-of select="$bwStr-AEEF-ShowAdvancedRecurrenceRules"/> 
     1996                    </label> 
    19891997                  </span> 
    19901998 
     
    21322140                      <td id="recurrenceFrequency" rowspan="2"> 
    21332141                        <em><xsl:copy-of select="$bwStr-AEEF-Frequency"/></em><br/> 
    2134                         <input type="radio" name="freq" value="NONE" onclick="showRrules(this.value)" checked="checked"/><xsl:copy-of select="$bwStr-AEEF-None"/><br/> 
     2142                        <input type="radio" name="freq" id="bwFreqNone" value="NONE" onclick="showRrules(this.value)" checked="checked"/> 
     2143                        <label for="bwFreqNone"> 
     2144                          <xsl:copy-of select="$bwStr-AEEF-None"/> 
     2145                        </label><br/> 
    21352146                        <!--<input type="radio" name="freq" value="HOURLY" onclick="showRrules(this.value)"/>hourly<br/>--> 
    2136                         <input type="radio" name="freq" value="DAILY" onclick="showRrules(this.value)"/><xsl:copy-of select="$bwStr-AEEF-Daily"/><br/> 
    2137                         <input type="radio" name="freq" value="WEEKLY" onclick="showRrules(this.value)"/><xsl:copy-of select="$bwStr-AEEF-Weekly"/><br/> 
    2138                         <input type="radio" name="freq" value="MONTHLY" onclick="showRrules(this.value)"/><xsl:copy-of select="$bwStr-AEEF-Monthly"/><br/> 
    2139                         <input type="radio" name="freq" value="YEARLY" onclick="showRrules(this.value)"/><xsl:copy-of select="$bwStr-AEEF-Yearly"/> 
     2147                        <input type="radio" name="freq" id="bwFreqDaily" value="DAILY" onclick="showRrules(this.value)"/> 
     2148                        <label for="bwFreqDaily"> 
     2149                          <xsl:copy-of select="$bwStr-AEEF-Daily"/> 
     2150                        </label><br/> 
     2151                        <input type="radio" name="freq" id="bwFreqWeekly" value="WEEKLY" onclick="showRrules(this.value)"/> 
     2152                        <label for="bwFreqWeekly"> 
     2153                          <xsl:copy-of select="$bwStr-AEEF-Weekly"/> 
     2154                        </label><br/> 
     2155                        <input type="radio" name="freq" id="bwFreqMonthly" value="MONTHLY" onclick="showRrules(this.value)"/> 
     2156                        <label for="bwFreqMonthly"> 
     2157                          <xsl:copy-of select="$bwStr-AEEF-Monthly"/> 
     2158                        </label><br/> 
     2159                        <input type="radio" name="freq" id="bwFreqYearly" value="YEARLY" onclick="showRrules(this.value)"/> 
     2160                        <label for="bwFreqYearly"> 
     2161                          <xsl:copy-of select="$bwStr-AEEF-Yearly"/> 
     2162                        </label> 
    21402163                      </td> 
    21412164                      <!-- recurrence count, until, forever --> 
     
    25652588            <span> 
    25662589              <xsl:if test="$canEdit = 'false'"><xsl:attribute name="class">invisible</xsl:attribute></xsl:if> 
    2567               <input type="radio" name="eventStatus" value="CONFIRMED" checked="checked"> 
     2590              <input type="radio" name="eventStatus" id="bwStatusConfirmedButton" value="CONFIRMED" checked="checked"> 
    25682591                <xsl:if test="form/status = 'CONFIRMED'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    2569               </input><xsl:copy-of select="$bwStr-AEEF-Confirmed"/> 
    2570               <input type="radio" name="eventStatus" value="TENTATIVE"> 
     2592              </input> 
     2593              <label for="bwStatusConfirmedButton"> 
     2594                <xsl:copy-of select="$bwStr-AEEF-Confirmed"/> 
     2595              </label> 
     2596              <input type="radio" name="eventStatus" id="bwStatusTentativeButton" value="TENTATIVE"> 
    25712597                <xsl:if test="form/status = 'TENTATIVE'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    2572               </input><xsl:copy-of select="$bwStr-AEEF-Tentative"/> 
    2573               <input type="radio" name="eventStatus" value="CANCELLED"> 
     2598              </input> 
     2599              <label for="bwStatusTentativeButton"> 
     2600                <xsl:copy-of select="$bwStr-AEEF-Tentative"/> 
     2601              </label> 
     2602              <input type="radio" name="eventStatus" id="bwStatusCancelledButton" value="CANCELLED"> 
    25742603                <xsl:if test="form/status = 'CANCELLED'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    2575               </input><xsl:copy-of select="$bwStr-AEEF-Canceled"/> 
     2604              </input> 
     2605              <label for="bwStatusCancelledButton"> 
     2606                <xsl:copy-of select="$bwStr-AEEF-Canceled"/> 
     2607              </label> 
    25762608            </span> 
    25772609            <xsl:if test="$canEdit = 'false'"> 
     
    27472779                   locations exist --> 
    27482780              <xsl:if test="form/location/preferred/select/option"> 
    2749                 <input type="radio" name="toggleLocationLists" value="preferred" onclick="changeClass('bwPreferredLocationList','shown');changeClass('bwAllLocationList','invisible');"> 
     2781                <input type="radio" name="toggleLocationLists" id="bwLocationPreferredButton" value="preferred" onclick="changeClass('bwPreferredLocationList','shown');changeClass('bwAllLocationList','invisible');"> 
    27502782                  <xsl:if test="form/location/preferred/select/option and not(form/location/all/select/option/@selected and not(form/location/preferred/select/option/@selected))"> 
    27512783                    <xsl:attribute name="checked">checked</xsl:attribute> 
    27522784                  </xsl:if> 
    27532785                </input> 
    2754                 <xsl:copy-of select="$bwStr-AEEF-Preferred"/> 
    2755                 <input type="radio" name="toggleLocationLists" value="all" onclick="changeClass('bwPreferredLocationList','invisible');changeClass('bwAllLocationList','shown');"> 
     2786                <label for="bwLocationPreferredButton"> 
     2787                  <xsl:copy-of select="$bwStr-AEEF-Preferred"/> 
     2788                </label> 
     2789                <input type="radio" name="toggleLocationLists" id="bwLocationAllButton" value="all" onclick="changeClass('bwPreferredLocationList','invisible');changeClass('bwAllLocationList','shown');"> 
    27562790                  <xsl:if test="form/location/all/select/option/@selected and not(form/location/preferred/select/option/@selected)"> 
    27572791                    <xsl:attribute name="checked">checked</xsl:attribute> 
    27582792                  </xsl:if> 
    27592793                </input> 
    2760                 <xsl:copy-of select="$bwStr-AEEF-All"/> 
     2794                <label for="bwLocationAllButton"> 
     2795                  <xsl:copy-of select="$bwStr-AEEF-All"/> 
     2796                </label> 
    27612797              </xsl:if> 
    27622798            </span> 
     
    28342870                   contacts exist --> 
    28352871              <xsl:if test="form/contact/preferred/select/option"> 
    2836                 <input type="radio" name="toggleContactLists" value="preferred" onclick="changeClass('bwPreferredContactList','shown');changeClass('bwAllContactList','invisible');"> 
     2872                <input type="radio" name="toggleContactLists" id="bwContactPreferredButton" value="preferred" onclick="changeClass('bwPreferredContactList','shown');changeClass('bwAllContactList','invisible');"> 
    28372873                  <xsl:if test="form/contact/preferred/select/option and not(form/contact/all/select/option/@selected and not(form/contact/preferred/select/option/@selected))"> 
    28382874                    <xsl:attribute name="checked">checked</xsl:attribute> 
    28392875                  </xsl:if> 
    28402876                </input> 
    2841                 <xsl:copy-of select="$bwStr-AEEF-Preferred"/> 
    2842                 <input type="radio" name="toggleContactLists" value="all" onclick="changeClass('bwPreferredContactList','invisible');changeClass('bwAllContactList','shown');"> 
     2877                <label for="bwContactPreferredButton"> 
     2878                  <xsl:copy-of select="$bwStr-AEEF-Preferred"/> 
     2879                </label> 
     2880                <input type="radio" name="toggleContactLists" id="bwContactAllButton" value="all" onclick="changeClass('bwPreferredContactList','invisible');changeClass('bwAllContactList','shown');"> 
    28432881                  <xsl:if test="form/contact/all/select/option/@selected and not(form/contact/preferred/select/option/@selected)"> 
    28442882                    <xsl:attribute name="checked">checked</xsl:attribute> 
    28452883                  </xsl:if> 
    28462884                </input> 
    2847                 <xsl:copy-of select="$bwStr-AEEF-All"/> 
     2885                <label for="bwContactAllButton"> 
     2886                  <xsl:copy-of select="$bwStr-AEEF-All"/> 
     2887                </label> 
    28482888              </xsl:if> 
    28492889            </span>