Content form dashboard


This page should only be used if script asks you to manually migrate skin.20240730.FORMS.ContentFormsDashboard

Further to the ticket https://issues.ametys.org/browse/FORMS-655 some changes have been made which may require a migration of the "My submissions (content)" service.

You have overloaded the common-service-head-css and common-service-head-js templates to add your own css or js, they need to make a single call to a dashboard template ( dashboard-css and dashboard-js respectively).

<xsl:template name="common-service-head-css">
      <xsl:call-template name="dashboard-css"/>
<!-- Vos propres css -->
</xsl:template>
<xsl:template name="common-service-head-js">
      <xsl:call-template name="dashboard-js"/>
<!-- Vos propres JS -->
</xsl:template>

The structure of the dashboard-css and dashboard-js templates has been modified and it is not recommended to overload them!

<xsl:template name="dashboard-css">
<xsl:call-template name="select2-css" />
</xsl:template>
<xsl:template name="dashboard-js">
        <xsl:call-template name="select2-js"/>
        <xsl:call-template name="dashboard-helper-js" />
        <xsl:call-template name="dashboard-dialog-js" />
        <xsl:call-template name="dashboard-initialize-js"/>
</xsl:template>

The dashboard-initialize-js template is the one that calls DashboardHelper.initializeContentForms. It is now inadvisable to overload it, just respect the JS method names in the event of overloading.

<xsl:template name="dashboard-initialize-js">
        <script type="text/javascript">
        $j().ready(function() {
            DashboardHelper.initializeContentForms("<xsl:value-of select="$uniqueId" />", {
                siteName: "<xsl:value-of select="$site"/>",
                lang: "<xsl:value-of select="$lang"/>",
                contextPath: "<xsl:value-of select="$site-uri-prefix"/>",
                entryUrl: "<xsl:value-of select="$get-entry-fields-url"/>",
                onShowEntry: onShowEntry_<xsl:value-of select="$uniqueId" />,
                onShowHistory: onShowHistory_<xsl:value-of select="$uniqueId" />,
                onShowError: onShowError_<xsl:value-of select="$uniqueId" />,
                zoneItemId: "<xsl:value-of select="ametys:zoneItemId()" />"
            });
        });
        </script>
    </xsl:template>

Any overloading of dialog boxes during actions (history, view entries) must be in the "dashboard-dialog-js" template.

In case of doubt, please refer to the JIRA https://issues issue commits.ametys.org/browse/FORMS-655

Back to top