Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Commit

Permalink
changed: output guidance hint as details element,
Browse files Browse the repository at this point in the history
  • Loading branch information
MartijnR committed Aug 1, 2019
1 parent 73c6b94 commit 677ccf1
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion xsl/openrosa2html5form.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ XSLT Stylesheet that transforms OpenRosa style (X)Forms into valid HTMl5 forms
</xsl:variable>
<!-- text labels get priority -->
<xsl:for-each select="./xf:value" >
<xsl:if test="not(@form = 'image' or @form = 'video' or @form = 'audio' or @form='big-image')">
<xsl:if test="not(@form = 'image' or @form = 'video' or @form = 'audio' or @form='big-image' or @form='guidance')">
<span>
<xsl:attribute name="lang">
<xsl:value-of select="$lang"/>
Expand All @@ -1263,6 +1263,21 @@ XSLT Stylesheet that transforms OpenRosa style (X)Forms into valid HTMl5 forms
</span>
</xsl:if>
</xsl:for-each>
<!-- guidance is next -->
<xsl:for-each select="./xf:value[@form = 'guidance']">
<details>
<xsl:attribute name="lang">
<xsl:value-of select="$lang"/>
</xsl:attribute>
<xsl:if test="string($class) or @form or string($active)">
<xsl:attribute name="class">
<xsl:value-of select="concat($class, ' or-form-', @form, ' ', $active)" />
</xsl:attribute>
</xsl:if>
<summary data-i18n="hint.guidance.details">more details</summary>
<xsl:call-template name="text-content" />
</details>
</xsl:for-each>
<!-- media labels in document order -->
<xsl:for-each select="./xf:value[@form = 'image' or @form = 'video' or @form = 'audio' and not($class = 'or-hint')]" >
<xsl:choose>
Expand Down

0 comments on commit 677ccf1

Please sign in to comment.