Skip to content

Commit

Permalink
Merge pull request #2318 from alphagov/hide-clear-search
Browse files Browse the repository at this point in the history
Only show Clear search link if there's a search
  • Loading branch information
joelanman authored Aug 30, 2023
2 parents 0bffed5 + 5dcd6f1 commit 92d5ec5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Fixes

- [#2318: Only show Clear search link if there's a search](https://github.com/alphagov/govuk-prototype-kit/pull/2318)

## 13.13.0

### New features
Expand Down
8 changes: 5 additions & 3 deletions lib/nunjucks/views/manage-prototype/plugins.njk
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,14 @@
attributes: { id: "search-button", formaction: "#" }
}) }}

<a class="govuk-link govuk-link--no-visited-state" href="?">Clear search</a>
{% if search %}
<a class="govuk-link govuk-link--no-visited-state" href="?">Clear search</a>
{% endif %}
</div>
</div>
<h4 class="govuk-body govuk-!-font-weight-bold">
<h3 class="govuk-body govuk-!-font-weight-bold">
{{ foundMessage }}
</h4>
</h3>
</div>
{% endif %}

Expand Down

0 comments on commit 92d5ec5

Please sign in to comment.