Skip to content

Commit

Permalink
MIR-1362 fix initialCondQuery hidden input field value
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksiy 'Alex' Levshyn committed Dec 17, 2024
1 parent 8c45bb1 commit e1ae52c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 12 additions & 8 deletions mir-layout/src/main/resources/xsl/mir-flatmir-layout-utils.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,18 @@
aria-label="Search" />

<input type="hidden" id="initialCondQueryMirFlatmirLayout" name="initialCondQuery">
<xsl:choose>
<xsl:when test="$initialCondQuery">
<xsl:value-of select="$initialCondQuery"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'*'"/>
</xsl:otherwise>
</xsl:choose>
<xsl:attribute name="value">
<xsl:choose>
<xsl:when test="$initialCondQuery">
<xsl:value-of select="$initialCondQuery"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'*'"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</input>

<xsl:choose>
<xsl:when test="contains($isSearchAllowedForCurrentUser, 'true')">
<input name="owner" type="hidden" value="createdby:*" />
Expand All @@ -95,6 +98,7 @@
<input name="owner" type="hidden" value="createdby:{$CurrentUser}" />
</xsl:when>
</xsl:choose>

<button type="submit" class="btn btn-primary my-2 my-sm-0">
<i class="fas fa-search"></i>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,6 @@
const selectMods = "#select_mods";
// ID of the hidden element with the fq parameter
const fqElement = "#fq";
// ID of the hidden element with the initial condQuery parameter in the mir-cosmol-layout-utils.xsl search form
const initialCondQueryMirCosmolLayout = "#initialCondQueryMirCosmolLayout";
// ID of the hidden element with the initial condQuery parameter in the mir-flatmir-layout-utils.xsl search form
const initialCondQueryMirFlatmirLayout = "#initialCondQueryMirFlatmirLayout";
// ID of the hidden element with the initial condQuery parameter in the second search form
Expand Down

0 comments on commit e1ae52c

Please sign in to comment.