Fix "Browse Chants" page "Source" drop-down bug #1362
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses the bug that was found on the chant-list page.
When the user would select a different source from the drop-down menu, instead of being redirected to
source/<int:source_id>/chants/
they get sent to/source/<int:source_id>/chants/?folio=&feast=&search_text=&genre=&source=<int:new_source_id>
There was some discussion in #1336 about whether this functionality is useful to users on the site. Perhaps the best option is to remove it altogether, but in the meantime it should work as expected for users that might be browsing this way.
The code modified includes the chant_list.js file which handles the filters. The page will now redirect correctly and the source parameter is no longer used in the URL. Additionally, the current source that the user is browsing is correctly displayed as the selected option in the drop-down menu.
Example after selecting a new source from the drop-down menu:
Fixes #1336, Fixes #717