<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:dyn="http://exslt.org/dynamic" extension-element-prefixes="dyn">
    <xsl:output method="html" indent="no" doctype-system="" encoding="utf-8" />

    <!-- used only for change password and view terms pages -->

    <xsl:include href="/app/tools/bookpub/templates/global.xsl" />
    <xsl:include href="/app/tools/appuser/templates/user/changepw.xsl" />
    <xsl:include href="/app/tools/appuser/templates/user/terms.xsl" />
    <xsl:include href="/app/tools/appuser/templates/user/view_terms.xsl" />
    <xsl:include href="/app/tools/appuser/templates/passwordtoggle.xsl" />

    <xsl:template name="pickLayout">
        <xsl:choose>
            <xsl:when test="$cmd = 'changepw'">
                <xsl:call-template name="changePWLayout" />
            </xsl:when>
            <xsl:when test="$cmd = 'resetmfa'">
                <div class="MainBaseSection">
                    <xsl:call-template name="userMFAResetShowLayout" />
                </div>
            </xsl:when>
            <xsl:otherwise>
                <xsl:call-template name="viewTermsLayout" />
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>

    <xsl:template name="submitButton">
        <xsl:choose>
            <xsl:when test="$cmd = 'changepw'">
                <xsl:call-template name="uiButton">
                    <xsl:with-param name="type" select="'primary'" />
                    <xsl:with-param name="name" select="'submit'" />
                    <xsl:with-param name="elemType" select="'submit'" />
                    <xsl:with-param name="id" select="'submitButton'" />
                    <xsl:with-param name="content" select="'Update'" />
                    <xsl:with-param name="className" select="'Form-button'" />
                </xsl:call-template>
            </xsl:when>
            <xsl:otherwise>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>

    <xsl:template name="cancelButton">
        <xsl:choose>
            <xsl:when test="$cmd = 'changepw' or $cmd = 'view_terms'">
                <xsl:call-template name="uiButton">
                    <xsl:with-param name="type" select="'default'" />
                    <xsl:with-param name="elemType" select="'button'" />
                    <xsl:with-param name="content" select="'Back to Profile'" />
                    <xsl:with-param name="className" select="'Form-button'" />
                    <xsl:with-param name="onClick">location.href='user?c=profile'</xsl:with-param>
                </xsl:call-template>
            </xsl:when>
            <xsl:otherwise>
                <xsl:call-template name="uiButton">
                    <xsl:with-param name="type" select="'default'" />
                    <xsl:with-param name="elemType" select="'button'" />
                    <xsl:with-param name="content" select="'Back to User List'" />
                    <xsl:with-param name="className" select="'Form-button'" />
                    <xsl:with-param name="onClick">location.href='user'</xsl:with-param>
                </xsl:call-template>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>

</xsl:stylesheet>
