Console design 2

last modified: 01 June 2015

Introduction

It's going to happen... I will be removing the field group and replacing it with a standard fieldset and legend. Both in the frontend as well as the backend.

While I was looking through the source trying to find where fieldgroups where rendered I stumbled on the transformation filters. And the masterfilter.xsl did parse the fieldgroup for not containing an id (for the updatemanager). Allthough xslt is not my strongpoint, with the help of Google and the content already there I managed to use the transformation to replace the 'ui:fieldgroup' with the fieldset element and add the legend element when a label attribute was set. I split up the original xsl template for generating an id when not present (originally for fields or fieldgroups).
I added the same, but simpler, template to also replace fieldgroups that do have an id. So far it seems to work just fine:

<xsl:template match="ui:fieldgroup">
	<xsl:element name="fieldset">
		<xsl:if test="@label">
			<legend>
				<xsl:value-of select="@label"/>
			</legend>
		</xsl:if>
		<xsl:apply-templates select="*|@*[name()!='label']|text()"/>
	</xsl:element>
</xsl:template>

published on: 01 June 2015