Changeset 403

Show
Ignore:
Timestamp:
03/19/07 22:50:33 (2 years ago)
Author:
mikey
Message:

added support for password fields
bugfix: add name to input fields (no name, no use :)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/resources/xsl/stub.xsl

    r338 r403  
    242242      </xsl:if> 
    243243      <xsl:choose> 
    244         <xsl:when test="@type = 'text'"> 
     244        <xsl:when test="@type = 'text' or @type = 'password'"> 
    245245          <input> 
    246246            <xsl:attribute name="id"> 
     247              <xsl:value-of select="$id"/> 
     248              <xsl:text>_</xsl:text> 
     249              <xsl:value-of select="@name"/> 
     250            </xsl:attribute> 
     251            <xsl:attribute name="name"> 
    247252              <xsl:value-of select="$id"/> 
    248253              <xsl:text>_</xsl:text> 
     
    255260          <select> 
    256261            <xsl:attribute name="id"> 
     262              <xsl:value-of select="$id"/> 
     263              <xsl:text>_</xsl:text> 
     264              <xsl:value-of select="@name"/> 
     265            </xsl:attribute> 
     266            <xsl:attribute name="name"> 
    257267              <xsl:value-of select="$id"/> 
    258268              <xsl:text>_</xsl:text> 
     
    272282              <xsl:value-of select="@name"/> 
    273283            </xsl:attribute> 
     284            <xsl:attribute name="name"> 
     285              <xsl:value-of select="$id"/> 
     286              <xsl:text>_</xsl:text> 
     287              <xsl:value-of select="@name"/> 
     288            </xsl:attribute> 
    274289            <xsl:copy-of select="@*[local-name() != 'id' and local-name() != 'name' and local-name() != 'mandatory' and local-name() != 'type']"/> 
    275290            <xsl:apply-templates select="text()"/> 
     
    278293        <xsl:when test="@type = 'submit'"> 
    279294          <input> 
    280             <xsl:copy-of select="@*"/>       
     295            <xsl:attribute name="name"> 
     296              <xsl:value-of select="$id"/> 
     297              <xsl:text>_</xsl:text> 
     298              <xsl:value-of select="@name"/> 
     299            </xsl:attribute> 
     300            <xsl:copy-of select="@*[local-name() != 'name']"/> 
    281301          </input> 
    282302        </xsl:when>